Guest User

Untitled

a guest
Aug 4th, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 15.74 KB | None | 0 0
  1. #define AQQ_SYSTEM_MSGCOMPOSING L"AQQ/System/MsgComposing"
  2. #define AQQ_SYSTEM_ERROR L"AQQ/System/Error"
  3. #define AQQ_SYSTEM_MODULESLOADED L"AQQ/System/ModulesLoaded"
  4. #define AQQ_SYSTEM_ADDSMSGATE L"AQQ/System/AddSMSGate"
  5. #define AQQ_SYSTEM_REMOVESMSGATE L"AQQ/System/RemoveSMSGate"
  6. #define AQQ_SYSTEM_GETAGENTS L"AQQ/System/GetAgents"
  7. #define AQQ_SYSTEM_SETAGENT L"AQQ/System/SetAgent"
  8. #define AQQ_SYSTEM_ISAGENTENABLED L"AQQ/System/IsAgentEnabled"
  9. #define AQQ_SYSTEM_REMOVEAGENT L"AQQ/System/RemoveAgent"
  10. #define AQQ_SYSTEM_GETIMPEXP L"AQQ/System/GetImpExp"
  11. #define AQQ_SYSTEM_ADDIMPEXP L"AQQ/System/AddImpExp"
  12. #define AQQ_SYSTEM_QUERY L"AQQ/System/Query"
  13. #define AQQ_SYSTEM_QUERYEX L"AQQ/System/QueryEx"
  14. #define AQQ_SYSTEM_SMSSUPPORTED L"AQQ/System/SMSSupported"
  15. #define AQQ_SYSTEM_SMSCONFIG L"AQQ/System/SMSConfig"
  16. #define AQQ_SYSTEM_SMSSEND L"AQQ/System/SMSSend"
  17. #define AQQ_SYSTEM_SETNOTE L"AQQ/System/SetNote"
  18. //#define AQQ_SYSTEM_DESTROYSERIVCEFUNCTION L"AQQ/System/DestroyServiceFunction"
  19. #define AQQ_SYSTEM_STATECHANGE L"AQQ/System/StateChange"
  20. #define AQQ_SYSTEM_SETLASTSTATE L"AQQ/System/SetLastState"
  21. #define AQQ_SYSTEM_RUNACTION L"AQQ/System/RunAction"
  22. #define AQQ_SYSTEM_SENDXML L"AQQ/System/SendXML"
  23. #define AQQ_SYSTEM_XMLIDDEBUG L"AQQ/System/XMLIDDebug"
  24. #define AQQ_SYSTEM_ONLINECHECK L"AQQ/System/OnlineCheck"
  25.  
  26. #define AQQ_SYSTEM_DEBUG_XML L"AQQ/System/Debug/XML"
  27. #define AQQ_SYSTEM_DISCONNECT L"AQQ/System/Disconnect"
  28. #define AQQ_SYSTEM_AUTOMATION_AUTOAWAY_ON L"AQQ/System/Automation/AutoAway/On"
  29. #define AQQ_SYSTEM_AUTOMATION_AUTOAWAY_OFF L"AQQ/System/Automation/AutoAway/Off"
  30. #define AQQ_SYSTEM_ONCONNECT_SILENCE L"AQQ/System/OnConnect/Silence"
  31. #define AQQ_SYSTEM_GETCURRENTSHOWTYPE_PATH L"AQQ/System/GetCurrentShowType/Path"
  32. #define AQQ_SYSTEM_GETCURRENTJID L"AQQ/System/GetCurrentJID"
  33. #define AQQ_SYSTEM_THEMECHANGED L"AQQ/System/ThemeChanged"
  34. #define AQQ_SYSTEM_MAXSTATUSLENGTH L"AQQ/System/MaxStatusLength"
  35. #define AQQ_SYSTEM_MAXMSGLENGTH L"AQQ/System/MaxMsgLength"
  36. #define AQQ_SYSTEM_GETNEWCACHEITEMPATH L"AQQ/System/GetNewCacheItemPath"
  37. #define AQQ_SYSTEM_PERFORM_COPYDATA L"AQQ/System/Perform/CopyData"
  38. #define AQQ_SYSTEM_FORCESTATUS L"AQQ/System/ForceStatus"
  39. #define AQQ_SYSTEM_CLIPBOARD_JID L"AQQ/System/Clipboard/JID"
  40. #define AQQ_SYSTEM_TABCHANGE L"AQQ/System/TabChange"
  41. #define AQQ_SYSTEM_INTERPRET_XML L"AQQ/System/Interpret/XML"
  42. #define AQQ_SYSTEM_TRANSFER_STATUS_CHANGE L"AQQ/System/Transfer/Status/Change"
  43. #define AQQ_SYSTEM_AUTOMATION_AUTOSECURE L"AQQ/System/Automation/AutoSecure"
  44. #define AQQ_SYSTEM_AUTOSECURE_ON L"AQQ/System/AutoSecure/On"
  45. #define AQQ_SYSTEM_AUTOSECURE_OFF L"AQQ/System/AutoSecure/Off"
  46. #define AQQ_SYSTEM_MSGCONTEXT_POPUP L"AQQ/System/OnMsgContent/Popup"
  47. #define AQQ_SYSTEM_MSGCONTEXT_CLOSE L"AQQ/System/OnMsgContent/Close"
  48. //#define AQQ_SYSTEM_PLUGIN_NETWORKS L"AQQ/System/GetPlugin/Networks"
  49.  
  50. //Tabs
  51. #define TAB_JABBER 1
  52.  
  53. //Windows
  54. #define AQQ_WINDOW_SETNOTE_PUTNOTE L"AQQ/Window/SetNote/PutNote"
  55. #define AQQ_WINDOW_SETNOTE_NOTE L"AQQ/Window/SetNote/Note"
  56. #define AQQ_WINDOW_SETNOTE_CLOSE L"AQQ/Window/SetNote/Close"
  57.  
  58. //Services
  59. #define AQQ_CONTROLS_TOOLBAR L"AQQ/Controls/Toolbar/"
  60. #define AQQ_CONTROLS_CREATEBUTTON L"/CreateButton"
  61. #define AQQ_CONTROLS_DESTROYBUTTON L"/DestroyButton"
  62. #define AQQ_CONTROLS_UPDATEBUTTON L"/UpdateButton"
  63. #define AQQ_CONTROLS_GETPOPUPMENUITEM L"AQQ/Controls/GetPopupMenuItem"
  64. #define AQQ_CONTROLS_CREATEPOPUPMENU L"AQQ/Controls/CreatePopUpMenu"
  65. #define AQQ_CONTROLS_CREATEPOPUPMENUITEM L"AQQ/Controls/CreatePopUpMenuItem"
  66. #define AQQ_CONTROLS_DESTROYPOPUPMENU L"AQQ/Controls/DestroyPopUpMenu"
  67. #define AQQ_CONTROLS_DESTROYPOPUPMENUITEM L"AQQ/Controls/DestroyPopUpMenuItem"
  68. #define AQQ_CONTROLS_MAINSTATUS_SETPANELTEXT L"AQQ/Controls/MainStatus/SetPanelText"
  69.  
  70. #define AQQ_CONTROLS_WEBBROWSER_CREATE L"AQQ/Controls/WebBrowser/Create"
  71. #define AQQ_CONTROLS_WEBBROWSER_NAVIGATE L"AQQ/Controls/WebBrowser/Navigate"
  72. #define AQQ_CONTROLS_WEBBROWSER_NAVCOMPLETE L"AQQ/Controls/WebBrowser/NavComplete"
  73. #define AQQ_CONTROLS_WEBBROWSER_SETID L"AQQ/Controls/WebBrowser/SetID"
  74. #define AQQ_CONTROLS_WEBBROWSER_BEFORENAV L"AQQ/Controls/WebBrowser/BeforeNav"
  75. #define AQQ_CONTROLS_WEBBROWSER_STATUSCHANGE L"AQQ/Controls/WebBrowser/StatusChange"
  76. #define AQQ_CONTROLS_WEBBROWSER_TITLECHANGE L"AQQ/Controls/WebBrowser/TitleChange"
  77. #define AQQ_CONTROLS_WEBBROWSER_DESTROY L"AQQ/Controls/WebBrowser/Destroy"
  78.  
  79. #define AQQ_CONTACTS_ADD L"AQQ/Contacts/Add"
  80. #define AQQ_CONTACTS_CREATE L"AQQ/Contacts/Create"
  81. #define AQQ_CONTACTS_UPDATEGROUPS L"AQQ/Contacts/UpdateGroups"
  82. #define AQQ_CONTACTS_DELETE L"AQQ/Contacts/Delete"
  83. #define AQQ_CONTACTS_DESTROYDOMAIN L"AQQ/Contacts/DestroyDomain"
  84. #define AQQ_CONTACTS_UPDATE L"AQQ/Contacts/Update"
  85. #define AQQ_CONTACTS_MESSAGE L"AQQ/Contacts/Message"
  86. #define AQQ_CONTACTS_PRESENDMSG L"AQQ/Contacts/PreSendMsg"
  87. #define AQQ_CONTACTS_SENDMSG L"AQQ/Contacts/SendMsg"
  88. #define AQQ_CONTACTS_RECVMSG L"AQQ/Contacts/RecvMsg"
  89. #define AQQ_CONTACTS_SENDPIC L"AQQ/Contacts/SendPic"
  90. #define AQQ_CONTACTS_SENDPIC_SIZECHECK L"AQQ/Contacts/SendPic/SizeCheck"
  91. #define AQQ_CONTACTS_SENDFILE L"AQQ/Contacts/SendFile"
  92. #define AQQ_CONTACTS_ICONSHOWTYPE_PATH L"AQQ/Contacts/IconShowType/Path"
  93. #define AQQ_CONTACTS_ICONSHOWTYPE_INDEX L"AQQ/Contacts/IconShowType/Index"
  94. #define AQQ_CONTACTS_SETOFFLINE L"AQQ/Contacts/SetOffline"
  95. #define AQQ_CONTACTS_OFFLINE L"AQQ/Contacts/Offline"
  96. #define AQQ_CONTACTS_GETSEARCHXML L"AQQ/Contacts/GetSearchXML"
  97. #define AQQ_CONTACTS_SETSEARCHXML L"AQQ/Contacts/SetSearchXML"
  98. #define AQQ_CONTACTS_RESSEARCHXML L"AQQ/Contacts/ResSearchXML"
  99. #define AQQ_CONTACTS_ERRSEARCHXML L"AQQ/Contacts/ErrSearchXML"
  100. #define AQQ_CONTACTS_LASTSEARCHID L"AQQ/Contacts/LastSearchID"
  101. #define AQQ_CONTACTS_CHANGENAME L"AQQ/Contacts/ChangeName"
  102. #define AQQ_CONTACTS_CHANGEGROUPNAME L"AQQ/Contacts/ChangeGroupName"
  103. #define AQQ_CONTACTS_GETVCARD L"AQQ/Contacts/GetVCard"
  104. #define AQQ_CONTACTS_RESVCARD L"AQQ/Contacts/ResVCard"
  105. #define AQQ_CONTACTS_BUDDY_SELECTED L"AQQ/Contacts/Buddy/Selected"
  106. #define AQQ_CONTACTS_BUDDY_ACTIVETAB L"AQQ/Contacts/Buddy/ActiveTab"
  107.  
  108. #define AQQ_ICONS_LOADPNGICON L"AQQ/Icons/LoadPNGIcon"
  109. #define AQQ_ICONS_REPLACEPNGICON L"AQQ/Icons/ReplacePNGIcon"
  110. #define AQQ_ICONS_DESTROYPNGICON L"AQQ/Icons/DestroyPNGIcon"
  111.  
  112. #define AQQ_FUNCTION_GETPLUGINDIR L"AQQ/Function/GetPluginDir"
  113. #define AQQ_FUNCTION_GETUSERDIR L"AQQ/Function/GetUserDir"
  114. #define AQQ_FUNCTION_GETPLUGINUSERDIR L"AQQ/Function/GetPluginUserDir"
  115. #define AQQ_FUNCTION_GETLANGSTR L"AQQ/Function/GetLangStr"
  116. #define AQQ_FUNCTION_GETTOKEN L"AQQ/Function/GetToken"
  117. #define AQQ_FUNCTION_GETSTRID L"AQQ/Function/GetStrID"
  118. #define AQQ_FUNCTION_GETNUMID L"AQQ/Function/GetNumID"
  119. #define AQQ_FUNCTION_GETUSERUID L"AQQ/Function/GetUserUID"
  120. #define AQQ_FUNCTION_GETTHEMEDIRRW L"AQQ/Function/GetThemeDirRW"
  121. #define AQQ_FUNCTION_GETTHEMEDIR L"AQQ/Function/GetThemeDir"
  122. #define AQQ_FUNCTION_GETPROXY L"AQQ/Function/GetProxy"
  123. #define AQQ_FUNCTION_GETAPPPATH L"AQQ/Function/GetAppPath"
  124. #define AQQ_FUNCTION_GETAPPFILEPATH L"AQQ/Function/GetAppFilePath"
  125. #define AQQ_FUNCTION_EXECUTEMSG L"AQQ/Function/ExecuteMsg"
  126. #define AQQ_FUNCTION_OPENURL L"AQQ/Function/OpenURL"
  127. #define AQQ_FUNCTION_GETEXTERNALIP L"AQQ/Function/GetExternalIP"
  128. #define AQQ_FUNCTION_GETUSEREXCOUNT L"AQQ/Function/GetUserExCount"
  129. #define AQQ_FUNCTION_GETNETWORKINFO L"AQQ/Function/GetNetworkInfo"
  130. #define AQQ_FUNCTION_CONVERTTOXML L"AQQ/Function/ConvertToXML"
  131.  
  132. #define AQQ_CACHE_ITEM L"AQQ_CACHE_ITEM"
  133.  
  134. #define AQQ_QUERY_DELETE 1
  135. #define AQQ_QUERY_MESSAGE 2
  136. #define AQQ_QUERY_SENDFILE 3
  137. #define AQQ_QUERY_AUTHREQUEST 4
  138. #define AQQ_QUERY_SENDPIC 5
  139. #define AQQ_QUERY_AUTH 6
  140. #define AQQ_QUERY_CANCELAUTH 7
  141. #define AQQ_QUERY_SMS 8
  142. #define AQQ_QUERY_VCARD 9
  143. #define AQQ_QUERY_ARCHIVE 10
  144. #define AQQ_QUERY_NETWORK 11
  145. #define AQQ_QUERY_HAVEVCARD 12
  146.  
  147. #define SOCKS_5 0
  148. #define SOCKS_4A 1
  149. #define SOCKS_4 2
  150.  
  151. #define CONTACT_OFFLINE 0
  152. #define CONTACT_ONLINE 1
  153. #define CONTACT_FFC 2
  154. #define CONTACT_AWAY 3
  155. #define CONTACT_NA 4
  156. #define CONTACT_DND 5
  157. #define CONTACT_INV 6
  158.  
  159. #define DEBUG_XMLIN 0
  160. #define DEBUG_XMLOUT 1
  161.  
  162. #define ONCHECK_COPYTO 1
  163. #define ONCHECK_DELETE 2
  164. #define ONCHECK_MOVETO 3
  165. #define ONCHECK_CHANGENAME 4
  166. #define ONCHECK_SENDMESSAGE 5
  167. #define ONCHECK_SENDIMAGE 6
  168. #define ONCHECK_SETGROUPS 7
  169. #define ONCHECK_VCARD 8
  170.  
  171. #define CHAT_NONE 0
  172. #define CHAT_ACTIVE 1
  173. #define CHAT_COMPOSING 2
  174. #define CHAT_GONE 3
  175. #define CHAT_INACTIVE 4
  176. #define CHAT_PAUSED 5
  177.  
  178. #define SMS_STATUS_FAILED 0
  179. #define SMS_STATUS_OK 1
  180. #define SMS_STATUS_DELIVERED 2
  181.  
  182. #define SMS_SEND_OK 1
  183. #define SMS_SEND_FAILED 2
  184. #define SMS_SEND_FAILED_SET 3
  185. #define SMS_SEND_FAILED_AUTH 4
  186. #define SMS_SEND_FAILED_CONNECT 5
  187. #define SMS_SEND_FAILED_LIMIT 6
  188. #define SMS_SEND_FAILED_TOKEN 7
  189. #define SMS_SEND_FAILED_NOSUPPORT 8
  190. #define SMS_SEND_FAILED_UNKNOWN 9
  191. #define SMS_SEND_OK_SILENT 10
  192.  
  193. #define SOUND_FIRSTIN 0
  194. #define SOUND_IN 1
  195. #define SOUND_OUT 2
  196. #define SOUND_STATUS 3
  197. #define SOUND_TRANSFER 4
  198. #define SOUND_ENDTRANSFER 5
  199. #define SOUND_LOCK 6
  200.  
  201. #define IMP_TYPE_EXPORT 0
  202. #define IMP_TYPE_IMPORT 1
  203. #define IMP_TYPE_OTHER 2
  204.  
  205. #define ALIGN_TOP 0
  206. #define ALIGN_BOTTOM 1
  207. #define ALIGN_LEFT 2
  208. #define ALIGN_RIGHT 3
  209. #define ALIGN_CLIENT 4
  210.  
  211. #define TRANSFER_DECLINE 0
  212. #define TRANSFER_ACCEPT 1
  213. #define TRANSFER_CONNECTING 2
  214. #define TRANSFER_ACTIVE 3
  215. #define TRANSFER_DISCONNECT 4
  216. #define TRANSFER_FINISHED 5
  217. #define TRANSFER_PAUSED 6
  218.  
  219. struct TPluginItemDescriber
  220. {
  221.     int cbSize;
  222.     unsigned int FormHandle;
  223.     wchar_t* ParentName;
  224.     wchar_t* Name;
  225. };
  226.  
  227. struct TPluginTriple
  228. {
  229.     int cbSize;
  230.     unsigned int Handle1;
  231.     unsigned int Handle2;
  232.     unsigned int Handle3;
  233.     int Param1;
  234.     int Param2;
  235. };
  236.  
  237. struct TPluginError
  238. {
  239.     int cbSize;
  240.     wchar_t* ID;
  241.     wchar_t* Desc;
  242.     wchar_t* LangID;
  243.     int ErrorCode;
  244. };
  245.  
  246. struct TPluginTransfer
  247. {
  248.     int cbSize;
  249.     wchar_t* ID;
  250.     wchar_t* FileName;
  251.     wchar_t* Location;
  252.     int Status;
  253.     wchar_t* TextInfo;
  254.     unsigned int FileSize;
  255.     unsigned int Position;
  256.     unsigned int LastDataSize;
  257. };
  258.  
  259. struct TPluginChatState
  260. {
  261.     int cbSize;
  262.     wchar_t* Text;
  263.     int Length;
  264.     int SelStart;
  265.     int SelLength;
  266.     unsigned int ParentHandle;
  267.     unsigned int Handle;
  268.     int ChatState;
  269. };
  270.  
  271. struct TPluginWebItem
  272. {
  273.     int cbSize;
  274.     wchar_t* ID;
  275.     wchar_t* Text;
  276. };
  277.  
  278. struct TPluginWebBeforeNavEvent
  279. {
  280.     int cbSize;
  281.     unsigned int Handle;
  282.     wchar_t* URL;
  283.     wchar_t* Flags;
  284.     wchar_t* TargetFrameName;
  285.     wchar_t* PostData;
  286.     wchar_t* Headers;
  287. };
  288.  
  289.  
  290. struct TPluginWebBrowser
  291. {
  292.     int cbSize;
  293.     unsigned int Handle;
  294.     int Top, Left, Width, Height;
  295.     int Align;
  296.     int RegisterAsDropTarget;
  297.     bool SetVisible;
  298.     bool SetEnabled;
  299. };
  300.  
  301. struct TPluginDebugInfo
  302. {
  303.     int cbSize;
  304.     wchar_t* JID;
  305.     wchar_t* XML;
  306.     char Mode;
  307. };
  308.  
  309. struct TPluginMaxStatus
  310. {
  311.     int cbSize;
  312.     int IconIndex;
  313.     wchar_t* Name;
  314.     int Max;
  315. };
  316.  
  317. struct TPluginProxy
  318. {
  319.     int cbSize;
  320.     bool ProxyEnabled;
  321.     wchar_t* ProxyServer;
  322.     int ProxyPort;
  323.     int ProxyType;
  324.     bool ProxyAuth;
  325.     wchar_t* ProxyLogin;
  326.     wchar_t* ProxyPass;
  327. };
  328.  
  329. struct TPluginImpExp
  330. {
  331.     int cbSize;
  332.     int ImportType;
  333.     wchar_t* Name;
  334.     wchar_t* Service;
  335.     int IconIndex;
  336. };
  337.  
  338. struct TPluginAutomation
  339. {
  340.     int cbSize;
  341.     int Flags;
  342.     int NewState;
  343.     double LastActive;
  344. };
  345.  
  346. struct TPluginStateChange
  347. {
  348.     int cbSize;
  349.     int OldState;
  350.     int NewState;
  351.     wchar_t* Status;
  352.     bool ByHand;
  353.     int UserIdx;
  354.     wchar_t* JID;
  355.     bool Force;
  356.     wchar_t* Server;
  357.     bool Authorized;
  358.     bool FromPlugin;
  359. };
  360.  
  361. struct TPluginSMS
  362. {
  363.     int cbSize;
  364.     wchar_t* CellPhone;
  365.     wchar_t* Msg;
  366.     wchar_t* Sign;
  367.     int GateID;
  368. };
  369.  
  370. struct TPluginTwoFlagParams
  371. {
  372.     int cbSize;
  373.     wchar_t* Param1;
  374.     wchar_t* Param2;
  375.     int Flag1;
  376.     int Flag2;
  377. };
  378.  
  379. struct TPluginAddUser
  380. {
  381.     int cbSize;
  382.     wchar_t* UID;
  383.     wchar_t* Server;
  384.     wchar_t* Nick;
  385.     wchar_t* Group;
  386.     wchar_t* Reason;
  387. };
  388.  
  389. struct TPluginSMSGate
  390. {
  391.     int cbSize;
  392.     wchar_t* Name;
  393.     wchar_t* Prompt;
  394.     bool IsConfig;
  395.     int MaxLength;
  396.     int SignMaxLength;
  397. };
  398.  
  399.  
  400. struct TPluginAgent
  401. {
  402.     int cbSize;
  403.     wchar_t* JID;
  404.     wchar_t* Name;
  405.     wchar_t* Prompt;
  406.     int Transport;
  407.     bool Search;
  408.     bool Groupchat;
  409.     bool Agents;
  410.     wchar_t* Service;
  411.     bool CanRegister;
  412.     wchar_t* Description;
  413.     bool RequiredID;
  414.     int IconIndex;
  415. };
  416.  
  417. struct TPluginMessage
  418. {
  419.     int cbSize;
  420.     wchar_t* JID;
  421.     double Date;
  422.     int ChatState;
  423.     wchar_t* Body;
  424.     bool Offline;
  425.     wchar_t* DefaultNick;
  426.     bool Store;
  427. };
  428.  
  429. struct TPluginMsgPic
  430. {
  431.     int cbSize;
  432.     wchar_t* FilePath;
  433.     wchar_t* Description;
  434.     wchar_t* ID;
  435. };
  436.  
  437.  
  438.  
  439. struct TPluginFileTransfer
  440. {
  441.     int cbSize;
  442.     wchar_t* FilePath;
  443.     wchar_t* Description;
  444.     wchar_t* ID;
  445. };
  446.  
  447. struct TPluginInfo
  448. {
  449.     int cbSize;
  450.     wchar_t* ShortName;
  451.     int Version;
  452.     wchar_t* Description;
  453.     wchar_t* Author;
  454.     wchar_t* AuthorMail;
  455.     wchar_t* Copyright;
  456.     wchar_t* Homepage;
  457.     char Flag; 
  458.     int ReplaceDefaultModule;
  459. };
  460.  
  461. struct TPluginAction
  462. {
  463.     int cbSize;
  464.     wchar_t* Action;
  465.     wchar_t* pszName;
  466.     wchar_t* pszCaption;
  467.     int Flags;
  468.     int Position;
  469.     int IconIndex;
  470.     wchar_t* pszService;
  471.     wchar_t* pszPopupName;
  472.     int popupPosition;
  473.     int hotKey;
  474.     wchar_t* pszContactOwner;
  475.     int GroupIndex;
  476.     int Grouped;
  477.     bool AutoCheck;
  478.     bool Checked;
  479.     unsigned int Handle;
  480.     wchar_t* ShortCut;
  481. };
  482.  
  483. struct TPluginContact
  484. {
  485.     int cbSize;
  486.     wchar_t* JID;
  487.     wchar_t* Nick;
  488.     wchar_t* Resource;
  489.     wchar_t* Groups;
  490.     int State;
  491.     wchar_t* Status;
  492.     bool Temporary;
  493.     bool FromPlugin;
  494.     int UserIdx;
  495. };
  496.  
  497.  
  498. #define CMIF_GRAYED 1
  499. #define CMIF_CHECKED 2
  500. #define CMIF_HIDDEN 4
  501. #define CMIF_NOTOFFLINE 8
  502. #define CMIF_NOTONLINE 16
  503.  
  504. typedef int (*TAQQHook)         (int wParam, int lParam);
  505. typedef int (*TAQQService)  (int wParam, int lParam);
  506.  
  507. #define CALLSERVICE_NOTFOUND 0x80000000
  508. #define MAXMODULELABELLENGTH 64
  509.  
  510. typedef int THandle;
  511.  
  512. typedef THandle (*CreateHookableEventHandler)           (const wchar_t* Name);
  513. typedef int         (*DestroyHookableEventHandler)      (THandle hEvent);
  514. typedef int         (*NotifyEventHooksHandler)              (THandle hEvent, int wParam, int lParam);
  515. typedef THandle (*HookEventHandler)                             (const wchar_t* Name, TAQQHook HookProc);
  516. typedef THandle (*HookEventMessageHandler)              (const wchar_t* Name, int Handle, unsigned int Msg);
  517. typedef int         (*UnhookEventHandler)                           (THandle hHook);
  518. typedef THandle (*CreateServiceFunctionHandler)     (const wchar_t* Name, TAQQService ServiceProc);
  519. typedef int         (*DestroyServiceFunctionHandler)    (THandle hService);
  520. typedef int         (*CallServiceHandler)                           (const wchar_t* Name, int wParam, int lParam);
  521. typedef int         (*ServiceExistsHandler)                     (const wchar_t* Name);
  522.  
  523. struct TPluginLink
  524. {
  525.     wchar_t*                                            Path;
  526.     CreateHookableEventHandler      CreateHookableEvent;
  527.     DestroyHookableEventHandler     DestroyHookableEvent;
  528.     NotifyEventHooksHandler             NotifyEventHooks;
  529.     HookEventHandler                            HookEvent;
  530.     HookEventMessageHandler             HookEventMessage;
  531.     UnhookEventHandler                      UnhookEvent;
  532.     CreateServiceFunctionHandler    CreateServiceFunction;
  533.   void*                                                 CreateTransientServiceFunction;
  534.     DestroyServiceFunctionHandler DestroyServiceFunction;
  535.     CallServiceHandler                      CallService;
  536.     ServiceExistsHandler                    ServiceExists;
  537. };
  538.  
  539. struct TVersionInfo
  540. {
  541.     int a, b, c, d;
  542.  
  543.     TVersionInfo (): a(0), b(0), c(0), d(0) { }
  544.     TVersionInfo (int _a, int _b, int _c, int _d): a(_a), b(_b), c(_c), d(_d) { }
  545. };
  546.  
  547. #define PLUGIN_MAKE_VERSION(a,b,c,d) (((a & 0xFF) << 24) | ((b & 0xFF) << 16) | ((c & 0xFF) << 8) | (d & 0xFF))
  548. TVersionInfo PLUGIN_GET_VERSION (int ver)
  549. {
  550.     return TVersionInfo (
  551.         (ver & 0xFF000000) >> 24,
  552.         (ver & 0x00FF0000) >> 16,
  553.         (ver & 0x0000FF00) >> 8,
  554.         (ver & 0x000000FF));
  555. }
  556.  
  557. int CompareVersion (int vera, int verb)
  558. {
  559.     TVersionInfo v1 = PLUGIN_GET_VERSION (vera);
  560.     TVersionInfo v2 = PLUGIN_GET_VERSION (verb);
  561.  
  562.     if          (v1.a < v2.a)   return -1;
  563.     else if (v1.a > v2.a) return 1;
  564.  
  565.     if          (v1.b < v2.b)   return -1;
  566.     else if (v1.b > v2.b) return 1;
  567.  
  568.     if          (v1.c < v2.c)   return -1;
  569.     else if (v1.c > v2.c) return 1;
  570.  
  571.     if          (v1.d < v2.d)   return -1;
  572.     else if (v1.d > v2.d) return 1;
  573.  
  574.     return 0;
  575. }
Advertisement
Add Comment
Please, Sign In to add comment