summaryrefslogtreecommitdiff
path: root/init.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-06-13 21:09:27 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-06-13 21:09:27 +0300
commitf7fdb4ef4e5021b2f96d96af9aa0d467ece9660f (patch)
tree98e0f94cc25ca4770748ff789b2207ade75734fe /init.cpp
parent16b58b001d519a36ec7584d09face4def90f36e4 (diff)
gettings jabber api's code )
Diffstat (limited to 'init.cpp')
-rw-r--r--init.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/init.cpp b/init.cpp
index 8b380d7..260aa8c 100644
--- a/init.cpp
+++ b/init.cpp
@@ -20,16 +20,19 @@
#define PLUGIN_NAME "juick"
HINSTANCE hInst;
+HANDLE hAccountsChanges;
PLUGINLINK *pluginLink;
BOOL bWatrackService = FALSE;
static int OnModulesLoaded(WPARAM wParam,LPARAM lParam);
extern char *date();
-extern int WaMpdOptInit(WPARAM wParam,LPARAM lParam);
+IJabberInterface *JabberInterface[10];
+int JabberAccountsCount = 0;
struct MM_INTERFACE mmi;
struct UTF8_INTERFACE utfi;
+
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
0,
@@ -50,17 +53,16 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
return TRUE;
}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
- {
- static char plugname[52];
- strcpy(plugname, PLUGIN_NAME" [");
- strcat(plugname, date());
- strcat(plugname, " ");
- strcat(plugname, __TIME__);
- strcat(plugname, "]");
- pluginInfo.shortName = plugname;
- }
+ static char plugname[52];
+ strcpy(plugname, PLUGIN_NAME" [");
+ strcat(plugname, date());
+ strcat(plugname, " ");
+ strcat(plugname, __TIME__);
+ strcat(plugname, "]");
+ pluginInfo.shortName = plugname;
return &pluginInfo;
}
@@ -83,14 +85,23 @@ void InitVars()
{
}
+extern int JuickOptInit(WPARAM wParam,LPARAM lParam);
+extern int GetJabberInterface(WPARAM, LPARAM);
static int OnModulesLoaded(WPARAM wParam,LPARAM lParam)
{
+ GetJabberInterface(0,0);
+ HANDLE hHookOptionInit = HookEvent(ME_OPT_INITIALISE, JuickOptInit);
+ hAccountsChanges = HookEvent(ME_PROTO_ACCLISTCHANGED, GetJabberInterface);
return 0;
}
+extern int GetJabberAPIs(WPARAM, LPARAM);
+
+
+
-int __declspec(dllexport) Unload(void)
+extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
}