00001 /***************************************************************** 00002 00003 Copyright (c) 2000 Matthias Elter <elter@kde.org> 00004 00005 Permission is hereby granted, free of charge, to any person obtaining a copy 00006 of this software and associated documentation files (the "Software"), to deal 00007 in the Software without restriction, including without limitation the rights 00008 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00009 copies of the Software, and to permit persons to whom the Software is 00010 furnished to do so, subject to the following conditions: 00011 00012 The above copyright notice and this permission notice shall be included in 00013 all copies or substantial portions of the Software. 00014 00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00018 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00019 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00020 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00021 00022 ******************************************************************/ 00023 00024 #ifndef __extensionproxy_h__ 00025 #define __extensionproxy_h__ 00026 00027 #include <tqcstring.h> 00028 #include <tqobject.h> 00029 00030 #include <dcopobject.h> 00031 00032 #include "appletinfo.h" 00033 00034 class KPanelExtension; 00035 00036 class ExtensionProxy : public TQObject, DCOPObject 00037 { 00038 Q_OBJECT 00039 00040 public: 00041 ExtensionProxy(TQObject* parent, const char* name = 0); 00042 ~ExtensionProxy(); 00043 00044 void loadExtension(const TQCString& desktopFile, const TQCString& configFile); 00045 KPanelExtension* loadExtension(const AppletInfo& info); 00046 void dock(const TQCString& callbackID); 00047 00048 bool process(const TQCString &fun, const TQByteArray &data, 00049 TQCString& replyType, TQByteArray &replyData); 00050 00051 protected slots: 00052 void slotUpdateLayout(); 00053 void slotApplicationRemoved(const TQCString&); 00054 00055 private: 00056 AppletInfo *_info; 00057 KPanelExtension *_extension; 00058 TQCString _callbackID; 00059 }; 00060 00061 #endif
1.6.1