From df91299c0082a489e3a45f06b1cb52f2162b883d Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 11 Sep 2012 01:33:53 +0300 Subject: ported changes from miranda_ng branch --- init.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'init.cpp') diff --git a/init.cpp b/init.cpp index 43f12d5..1ba5ab1 100755 --- a/init.cpp +++ b/init.cpp @@ -79,11 +79,11 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) return interfaces; } -int LoadKey(WPARAM w, LPARAM l); -int ToggleEncryption(WPARAM w, LPARAM l); -int SendKey(WPARAM w, LPARAM l); -int ExportGpGKeys(WPARAM w, LPARAM l); -int ImportGpGKeys(WPARAM w, LPARAM l); +INT_PTR LoadKey(WPARAM w, LPARAM l); +INT_PTR ToggleEncryption(WPARAM w, LPARAM l); +INT_PTR SendKey(WPARAM w, LPARAM l); +INT_PTR ExportGpGKeys(WPARAM w, LPARAM l); +INT_PTR ImportGpGKeys(WPARAM w, LPARAM l); void init_vars() { @@ -125,11 +125,12 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) mir_getUTFI(&utfi); mir_getXI(&xi); //TODO: check if we have access to api init_vars(); - CreateServiceFunction("/LoadPubKey",(MIRANDASERVICE)LoadKey); - CreateServiceFunction("/ToggleEncryption",(MIRANDASERVICE)ToggleEncryption); - CreateServiceFunction("/SendKey",(MIRANDASERVICE)SendKey); - CreateServiceFunction("/ExportGPGKeys",(MIRANDASERVICE)ExportGpGKeys); - CreateServiceFunction("/ImportGPGKeys",(MIRANDASERVICE)ImportGpGKeys); + CreateServiceFunction("/LoadPubKey",LoadKey); + CreateServiceFunction("/ToggleEncryption",ToggleEncryption); + CreateServiceFunction("/SendKey",SendKey); + CreateServiceFunction("/ExportGPGKeys",ExportGpGKeys); + CreateServiceFunction("/ImportGPGKeys",ImportGpGKeys); + CLISTMENUITEM mi = {0}; mi.cbSize=sizeof(mi); mi.position=-0x7FFFFFFF; @@ -237,7 +238,7 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) if(bJabberAPI && bIsMiranda09) HookEvent(ME_PROTO_ACCLISTCHANGED, GetJabberInterface); - HookEvent(ME_PROTO_ACK, onProtoAck); //filetransfer unimplemented now + HookEvent(ME_PROTO_ACK, onProtoAck); HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPreBuildContactMenu); @@ -289,6 +290,6 @@ extern "C" int __declspec(dllexport) Unload(void) mir_free(outopentag); mir_free(outclosetag); if(password) - delete [] password; + mir_free(password); return 0; } -- cgit v1.2.3