summaryrefslogtreecommitdiff
path: root/init.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-05-28 02:54:36 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-05-28 02:54:36 +0300
commit072e6741acb7323279beaf516107a5d09d91cf09 (patch)
tree5823c27f221342a6865ec28e38a3f9867134b06a /init.cpp
parent9f3797b01596d50ad2df063c1860eb3a5eb0b8e0 (diff)
keys export
//TODO: keys import
Diffstat (limited to 'init.cpp')
-rwxr-xr-xinit.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/init.cpp b/init.cpp
index 49f372a..5388f0f 100755
--- a/init.cpp
+++ b/init.cpp
@@ -23,7 +23,7 @@ TCHAR *inopentag = NULL, *inclosetag = NULL, *outopentag = NULL, *outclosetag =
list <JabberAccount*> Accounts;
HINSTANCE hInst;
-HANDLE hLoadPubKey = NULL, hToggleEncryption = NULL, hOnPreBuildContactMenu = NULL, hSendKey = NULL, g_hCLIcon = NULL;
+HANDLE hLoadPubKey = NULL, hToggleEncryption = NULL, hOnPreBuildContactMenu = NULL, hSendKey = NULL, g_hCLIcon = NULL, hExportGpgKeys = NULL, hImportGpgKeys = NULL;
PLUGINLINK *pluginLink;
IconExtraColumn g_IEC = {0};
static int OnModulesLoaded(WPARAM wParam,LPARAM lParam);
@@ -81,6 +81,8 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
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);
void init_vars()
{
@@ -124,6 +126,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
CreateServiceFunction("/LoadPubKey",(MIRANDASERVICE)LoadKey);
CreateServiceFunction("/ToggleEncryption",(MIRANDASERVICE)ToggleEncryption);
CreateServiceFunction("/SendKey",(MIRANDASERVICE)SendKey);
+ CreateServiceFunction("/ExportGPGKeys",(MIRANDASERVICE)ExportGpGKeys);
+ CreateServiceFunction("/ImportGPGKeys",(MIRANDASERVICE)ImportGpGKeys);
CLISTMENUITEM mi = {0};
mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFF;
@@ -148,6 +152,23 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
mi.pszName="Send public key";
mi.pszService="/SendKey";
hSendKey = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi);
+ ZeroMemory(&mi,sizeof(mi));
+ mi.cbSize=sizeof(mi);
+ mi.position=-0x7FFFFFFF;
+ mi.flags=0;
+ mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.pszName="Export GPG Public keys from all users";
+ mi.pszService="/ExportGPGKeys";
+ hExportGpgKeys = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ ZeroMemory(&mi,sizeof(mi));
+ mi.cbSize=sizeof(mi);
+ mi.position=-0x7FFFFFFF;
+ mi.flags=0;
+ mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.pszName="Import GPG Public keys from all users";
+ mi.pszService="/ImportGPGKeys";
+ hImportGpgKeys = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+
return 0;
}