summaryrefslogtreecommitdiff
path: root/plugins/MyDetails
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-18 21:04:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-18 21:04:10 +0000
commit02413392a2b40fcebe5f178c776402a9ce148604 (patch)
tree300d3327a04f932138fa820e9e10755bc58b7235 /plugins/MyDetails
parentc9700ede2ef5444c6f754322e7c255441d6d6721 (diff)
compilation fix for MyDetails
git-svn-id: http://svn.miranda-ng.org/main/trunk@1027 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails')
-rw-r--r--plugins/MyDetails/commons.h7
-rw-r--r--plugins/MyDetails/data.cpp5
-rw-r--r--plugins/MyDetails/frame.cpp94
-rw-r--r--plugins/MyDetails/m_simpleaway.h20
-rw-r--r--plugins/MyDetails/mydetails.cpp151
-rw-r--r--plugins/MyDetails/mydetails.h23
-rw-r--r--plugins/MyDetails/options.cpp23
-rw-r--r--plugins/MyDetails/sdk/m_NewAwaySys.h119
-rw-r--r--plugins/MyDetails/sdk/m_avatars.h297
-rw-r--r--plugins/MyDetails/sdk/m_cluiframes.h338
-rw-r--r--plugins/MyDetails/sdk/m_ersatz.h40
-rw-r--r--plugins/MyDetails/sdk/m_listeningto.h56
-rw-r--r--plugins/MyDetails/sdk/m_metacontacts.h162
-rw-r--r--plugins/MyDetails/sdk/m_proto_listeningto.h137
-rw-r--r--plugins/MyDetails/sdk/m_smileyadd.h172
-rw-r--r--plugins/MyDetails/sdk/m_statusplugins.h156
-rw-r--r--plugins/MyDetails/sdk/m_updater.h146
-rw-r--r--plugins/MyDetails/sdk/m_variables.h668
18 files changed, 95 insertions, 2519 deletions
diff --git a/plugins/MyDetails/commons.h b/plugins/MyDetails/commons.h
index e553fee299..cc176e193a 100644
--- a/plugins/MyDetails/commons.h
+++ b/plugins/MyDetails/commons.h
@@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA.
#ifndef __COMMONS_H__
# define __COMMONS_H__
+#define _CRT_SECURE_NO_WARNINGS
#define _WIN32_WINNT 0x0501
#include <windows.h>
@@ -45,12 +46,10 @@ Boston, MA 02111-1307, USA.
#include <m_listeningto.h>
#include <m_NewAwaySys.h>
-#include <m_updater.h>
#include <m_fontservice.h>
#include <m_variables.h>
#include <m_avatars.h>
#include <m_statusplugins.h>
-#include <m_ersatz.h>
#include <m_icq.h>
#include <m_icolib.h>
#include "m_cluiframes.h"
@@ -63,20 +62,16 @@ Boston, MA 02111-1307, USA.
#include "resource.h"
-
#define MODULE_NAME "MyDetails"
#define SETTING_FRAME_VISIBLE "FrameVisible"
#define SETTING_DEFAULT_NICK "DefaultNick"
-
extern HINSTANCE hInst;
-extern PLUGINLINK *pluginLink;
extern long nickname_dialog_open;
extern long status_msg_dialog_open;
-
#include "m_mydetails.h"
#include "data.h"
#include "options.h"
diff --git a/plugins/MyDetails/data.cpp b/plugins/MyDetails/data.cpp
index 62192aa42e..728e601a06 100644
--- a/plugins/MyDetails/data.cpp
+++ b/plugins/MyDetails/data.cpp
@@ -158,7 +158,7 @@ int Protocol::GetStatus()
if (custom_status == 0)
{
- TCHAR *tmp = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, status, GCMDF_TCHAR);
+ TCHAR *tmp = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, status, GSMDF_TCHAR);
lcopystr(status_name, tmp, MAX_REGS(status_name));
}
else
@@ -659,8 +659,7 @@ Protocol * ProtocolArray::Get(const char *name)
bool ProtocolArray::CanSetStatusMsgPerProtocol()
{
- return ServiceExists(MS_ERSATZ_ENABLED) ||
- ServiceExists(MS_NAS_INVOKESTATUSWINDOW) || ServiceExists(MS_SA_CHANGESTATUSMSG);
+ return ServiceExists(MS_NAS_INVOKESTATUSWINDOW) || ServiceExists(MS_SA_CHANGESTATUSMSG);
}
diff --git a/plugins/MyDetails/frame.cpp b/plugins/MyDetails/frame.cpp
index a14883c639..7610da8f32 100644
--- a/plugins/MyDetails/frame.cpp
+++ b/plugins/MyDetails/frame.cpp
@@ -222,59 +222,35 @@ int SmileyAddOptionsChangedHook(WPARAM wParam,LPARAM lParam)
int CreateFrame()
{
- if(ServiceExists(MS_FONT_REGISTER))
- {
- HDC hdc = GetDC(NULL);
-
- for (int i = 0 ; i < NUM_FONTS ; i++ )
- {
- ZeroMemory(&font_id[i], sizeof(font_id[i]));
-
- font_id[i].cbSize = sizeof(FontID);
- strncpy(font_id[i].group, Translate("My Details"), sizeof(font_id[i].group));
- strncpy(font_id[i].name, Translate(font_names[i]), sizeof(font_id[i].name));
- strncpy(font_id[i].dbSettingsGroup, MODULE_NAME, sizeof(font_id[i].dbSettingsGroup));
-
- char tmp[128];
- mir_snprintf(tmp, sizeof(tmp), "%sFont", font_names[i]);
- strncpy(font_id[i].prefix, tmp, sizeof(font_id[i].prefix));
-
- font_id[i].deffontsettings.colour = font_colors[i];
- font_id[i].deffontsettings.size = -MulDiv(font_sizes[i], GetDeviceCaps(hdc, LOGPIXELSY), 72);
- font_id[i].deffontsettings.style = font_styles[i];
- font_id[i].deffontsettings.charset = DEFAULT_CHARSET;
- strncpy(font_id[i].deffontsettings.szFace, "Tahoma", sizeof(font_id[i].deffontsettings.szFace));
- font_id[i].order = i;
- font_id[i].flags = FIDF_DEFAULTVALID;
-
- CallService(MS_FONT_REGISTER, (WPARAM)&font_id[i], 0);
- }
-
- ReleaseDC(NULL, hdc);
+ HDC hdc = GetDC(NULL);
- ReloadFont(0,0);
- HookEvent(ME_FONT_RELOAD, ReloadFont);
- }
- else
+ for (int i = 0 ; i < NUM_FONTS ; i++ )
{
- LOGFONT lf;
- ZeroMemory(&lf, sizeof(lf));
- lf.lfCharSet = DEFAULT_CHARSET;
-
- HDC hdc = GetDC(NULL);
-
- for (int i = 0 ; i < NUM_FONTS ; i++ )
- {
- lf.lfHeight = -MulDiv(font_sizes[i], GetDeviceCaps(hdc, LOGPIXELSY), 72);
- lf.lfWeight = font_styles[i] == DBFONTF_BOLD ? FW_BOLD : FW_NORMAL;
- lf.lfItalic = font_styles[i] == DBFONTF_ITALIC ? TRUE : FALSE;
- strncpy(lf.lfFaceName, "Tahoma", sizeof(lf.lfFaceName));
-
- hFont[i] = CreateFontIndirect(&lf);
- font_colour[i] = font_colors[i];
- }
+ ZeroMemory(&font_id[i], sizeof(font_id[i]));
+
+ font_id[i].cbSize = sizeof(FontID);
+ strncpy(font_id[i].group, Translate("My Details"), sizeof(font_id[i].group));
+ strncpy(font_id[i].name, Translate(font_names[i]), sizeof(font_id[i].name));
+ strncpy(font_id[i].dbSettingsGroup, MODULE_NAME, sizeof(font_id[i].dbSettingsGroup));
+
+ char tmp[128];
+ mir_snprintf(tmp, sizeof(tmp), "%sFont", font_names[i]);
+ strncpy(font_id[i].prefix, tmp, sizeof(font_id[i].prefix));
+
+ font_id[i].deffontsettings.colour = font_colors[i];
+ font_id[i].deffontsettings.size = -MulDiv(font_sizes[i], GetDeviceCaps(hdc, LOGPIXELSY), 72);
+ font_id[i].deffontsettings.style = font_styles[i];
+ font_id[i].deffontsettings.charset = DEFAULT_CHARSET;
+ strncpy(font_id[i].deffontsettings.szFace, "Tahoma", sizeof(font_id[i].deffontsettings.szFace));
+ font_id[i].order = i;
+ font_id[i].flags = FIDF_DEFAULTVALID;
+ FontRegister(&font_id[i]);
}
+ ReleaseDC(NULL, hdc);
+
+ ReloadFont(0,0);
+ HookEvent(ME_FONT_RELOAD, ReloadFont);
WNDCLASS wndclass;
wndclass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; //CS_PARENTDC | CS_HREDRAW | CS_VREDRAW;
@@ -363,7 +339,7 @@ int CreateFrame()
menu.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
menu.pszName = Translate("Show My Details");
menu.pszService= MODULE_NAME "/ShowHideMyDetails";
- hMenuShowHideFrame = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&menu);
+ hMenuShowHideFrame = Menu_AddMainMenuItem(&menu);
if(DBGetContactSettingByte(0, MODULE_NAME, SETTING_FRAME_VISIBLE, 1) == 1)
{
@@ -549,7 +525,7 @@ RECT GetRect(HDC hdc, RECT rc, const char *text, const char *def_text, Protocol
RECT r_tmp = rc;
// Only first line
- char *tmp2 = strdup(tmp);
+ char *tmp2 = _strdup(tmp);
char *pos = strchr(tmp2, '\r');
if (pos != NULL) pos[0] = '\0';
pos = strchr(tmp2, '\n');
@@ -1172,7 +1148,7 @@ void DrawTextWithRect(HDC hdc, const char *text, const char *def_text, RECT rc,
tmp = text;
// Only first line
- char *tmp2 = strdup(tmp);
+ char *tmp2 = _strdup(tmp);
char *pos = strchr(tmp2, '\r');
if (pos != NULL) pos[0] = '\0';
pos = strchr(tmp2, '\n');
@@ -1346,11 +1322,11 @@ void Draw(HWND hwnd, HDC hdc_orig)
HRGN rgn = CreateRectRgnIndirect(&rc);
SelectClipRgn(hdc, rgn);
- HICON icon = LoadIconEx("MYDETAILS_NEXT_PROTOCOL");
+ HICON icon = Skin_GetIcon("MYDETAILS_NEXT_PROTOCOL");
if (icon == NULL)
icon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RIGHT_ARROW));
DrawIconEx(hdc, data->next_proto_rect.left, data->next_proto_rect.top, icon, ICON_SIZE, ICON_SIZE, 0, NULL, DI_NORMAL);
- ReleaseIconEx(icon);
+ Skin_ReleaseIcon(icon);
SelectClipRgn(hdc, NULL);
DeleteObject(rgn);
@@ -1359,11 +1335,11 @@ void Draw(HWND hwnd, HDC hdc_orig)
rgn = CreateRectRgnIndirect(&rc);
SelectClipRgn(hdc, rgn);
- icon = LoadIconEx("MYDETAILS_PREV_PROTOCOL");
+ icon = Skin_GetIcon("MYDETAILS_PREV_PROTOCOL");
if (icon == NULL)
icon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RIGHT_ARROW));
DrawIconEx(hdc, data->prev_proto_rect.left, data->prev_proto_rect.top, icon, ICON_SIZE, ICON_SIZE, 0, NULL, DI_NORMAL);
- ReleaseIconEx(icon);
+ Skin_ReleaseIcon(icon);
SelectClipRgn(hdc, NULL);
DeleteObject(rgn);
@@ -1494,11 +1470,11 @@ void Draw(HWND hwnd, HDC hdc_orig)
HRGN rgn = CreateRectRgnIndirect(&rc);
SelectClipRgn(hdc, rgn);
- HICON icon = LoadIconEx("LISTENING_TO_ICON");
+ HICON icon = Skin_GetIcon("LISTENING_TO_ICON");
if (icon == NULL)
icon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LISTENINGTO));
DrawIconEx(hdc, data->listening_to_icon_rect.left, data->listening_to_icon_rect.top, icon, ICON_SIZE, ICON_SIZE, 0, NULL, DI_NORMAL);
- ReleaseIconEx(icon);
+ Skin_ReleaseIcon(icon);
SelectClipRgn(hdc, NULL);
DeleteObject(rgn);
@@ -2820,7 +2796,7 @@ int PluginCommand_ShowProtocol(WPARAM wParam,LPARAM lParam)
for(int i = 0 ; i < protocols->GetSize() ; i++)
{
- if (stricmp(protocols->Get(i)->name, proto) == 0)
+ if (_stricmp(protocols->Get(i)->name, proto) == 0)
{
proto_num = i;
break;
diff --git a/plugins/MyDetails/m_simpleaway.h b/plugins/MyDetails/m_simpleaway.h
deleted file mode 100644
index 698a6f038d..0000000000
--- a/plugins/MyDetails/m_simpleaway.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// lParam = (char *)status message
-// wParam = new status, from statusmodes.h
-#define MS_SA_SETSTATUSMODE "SimpleAway/SetStatusMode"
-#define MS_AWAYSYS_SETSTATUSMODE MS_SA_SETSTATUSMODE //for compatibility with some plugins
-
-//Internal use only
-#define MS_SA_TTCHANGESTATUSMSG "SimpleAway/TTChangeStatusMessage"
-
-//wParam=new status, from statusmodes.h
-//lParam=protocol name, NULL if for all protocols (added in v0.3.1alpha)
-#define MS_SA_CHANGESTATUSMSG "SimpleAway/ChangeStatusMessage"
-
-// wParam = 0
-// lParam = 0
-// allways returns 1
-#define MS_SA_ISSARUNNING "SimpleAway/IsSARunning"
-
-// wParam = 0
-// lParam = 0
-#define MS_SA_COPYAWAYMSG "SimpleAway/CopyAwayMsg" \ No newline at end of file
diff --git a/plugins/MyDetails/mydetails.cpp b/plugins/MyDetails/mydetails.cpp
index 4eb11c4119..f990f6e129 100644
--- a/plugins/MyDetails/mydetails.cpp
+++ b/plugins/MyDetails/mydetails.cpp
@@ -21,12 +21,10 @@ Boston, MA 02111-1307, USA.
#include "commons.h"
#include "mydetails.h"
-
// Prototypes /////////////////////////////////////////////////////////////////////////////////////
-
HINSTANCE hInst;
-PLUGINLINK *pluginLink;
+int hLangpack = 0;
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
@@ -37,8 +35,7 @@ PLUGININFOEX pluginInfo={
"",
"© 2005-2008 Ricardo Pescuma Domenecci, Drugwash",
"http://pescuma.org/miranda/mydetails",
- 0, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
{ 0xa82baeb3, 0xa33c, 0x4036, { 0xb8, 0x37, 0x78, 0x3, 0xa5, 0xb6, 0xc2, 0xab } } // {A82BAEB3-A33C-4036-B837-7803A5B6C2AB}
};
@@ -83,39 +80,20 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
return TRUE;
}
-
-extern "C" __declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
-{
- pluginInfo.cbSize = sizeof(PLUGININFO);
- return (PLUGININFO*) &pluginInfo;
-}
-
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
- pluginInfo.cbSize = sizeof(PLUGININFOEX);
return &pluginInfo;
}
-
extern "C" __declspec(dllexport) const MUUID interfaces[] = { MIID_MDETAILS, MIID_LAST };
-extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
-{
- return interfaces;
-}
-
-int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" __declspec(dllexport) int Load()
{
- // Copy data
- pluginLink = link;
-
- init_mir_malloc();
- init_list_interface();
+ mir_getLP(&pluginInfo);
// Hook event to load messages and show first one
- hModulesLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
- hPreShutdownHook = HookEvent(ME_SYSTEM_PRESHUTDOWN, MainUninit);
+ HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, MainUninit);
nickname_dialog_open = 0;
status_msg_dialog_open = 0;
@@ -139,8 +117,7 @@ int __declspec(dllexport) Load(PLUGINLINK *link)
return 0;
}
-
-int __declspec(dllexport) Unload(void)
+extern "C" __declspec(dllexport) int Unload(void)
{
DestroyServiceFunction(MS_MYDETAILS_SETMYNICKNAME);
DestroyServiceFunction(MS_MYDETAILS_SETMYNICKNAMEUI);
@@ -154,8 +131,6 @@ int __declspec(dllexport) Unload(void)
DestroyServiceFunction(MS_MYDETAILS_SHOWPROTOCOL);
DestroyServiceFunction(MS_MYDETAILS_CYCLE_THROUGH_PROTOCOLS);
- if (hModulesLoadedHook) UnhookEvent(hModulesLoadedHook);
-
DeInitProtocolData();
DeInitOptions();
@@ -185,8 +160,7 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
// Add options to menu
CLISTMENUITEM mi;
- if (protocols->CanSetAvatars())
- {
+ if (protocols->CanSetAvatars()) {
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = 0;
@@ -196,8 +170,7 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
mi.pszName = Translate("Set My Avatar...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYAVATARUI, Menu_SetMyAvatarUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYAVATARUI;
-
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
}
ZeroMemory(&mi,sizeof(mi));
@@ -209,8 +182,7 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
mi.pszName = Translate("Set My Nickname...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYNICKNAMEUI, Menu_SetMyNicknameUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYNICKNAMEUI;
-
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -221,8 +193,7 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
mi.pszName = Translate("Set My Status Message...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI, Menu_SetMyStatusMessageUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI;
-
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
// Set protocols to show frame
ZeroMemory(&mi,sizeof(mi));
@@ -233,73 +204,39 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
mi.position = 200001;
mi.pszName = Translate("Show next protocol");
mi.pszService = MS_MYDETAILS_SHOWNEXTPROTOCOL;
-
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
InitFrames();
- if (ServiceExists(MS_SKIN2_ADDICON))
+ if (CallService(MS_SKIN2_GETICON, 0, (LPARAM) "LISTENING_TO_ICON") == NULL) {
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.pszSection = LPGEN("Contact List");
+ sid.pszDescription = LPGEN("Listening to");
+ sid.pszName = "LISTENING_TO_ICON";
+ sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LISTENINGTO));
+ Skin_AddIcon(&sid);
+ }
{
- if (CallService(MS_SKIN2_GETICON, 0, (LPARAM) "LISTENING_TO_ICON") == NULL)
- {
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
- sid.flags = SIDF_TCHAR;
- sid.ptszSection = TranslateT("Contact List");
- sid.ptszDescription = TranslateT("Listening to");
- sid.pszName = "LISTENING_TO_ICON";
- sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LISTENINGTO));
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- }
-
- {
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
- sid.flags = SIDF_TCHAR;
- sid.ptszSection = TranslateT("My Details");
- sid.ptszDescription = TranslateT("Previous protocol");
- sid.pszName = "MYDETAILS_PREV_PROTOCOL";
- sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LEFT_ARROW));
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- }
-
- {
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
- sid.flags = SIDF_TCHAR;
- sid.ptszSection = TranslateT("My Details");
- sid.ptszDescription = TranslateT("Next protocol");
- sid.pszName = "MYDETAILS_NEXT_PROTOCOL";
- sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RIGHT_ARROW));
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- }
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.pszSection = LPGEN("My Details");
+ sid.pszDescription = LPGEN("Previous protocol");
+ sid.pszName = "MYDETAILS_PREV_PROTOCOL";
+ sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LEFT_ARROW));
+ Skin_AddIcon(&sid);
}
-
- // updater plugin support
- if(ServiceExists(MS_UPDATE_REGISTER))
{
- Update upd = {0};
- char szCurrentVersion[30];
-
- upd.cbSize = sizeof(upd);
- upd.szComponentName = pluginInfo.shortName;
-
- upd.szUpdateURL = UPDATER_AUTOREGISTER;
-
- upd.szBetaVersionURL = "http://pescuma.org/miranda/mydetails_version.txt";
- upd.szBetaChangelogURL = "http://pescuma.org/miranda/mydetails_changelog.txt";
- upd.pbBetaVersionPrefix = (BYTE *)"My Details ";
- upd.cpbBetaVersionPrefix = strlen((char *)upd.pbBetaVersionPrefix);
- upd.szBetaUpdateURL = "http://pescuma.org/miranda/mydetails.zip";
-
- upd.pbVersion = (BYTE *)CreateVersionStringPlugin((PLUGININFO*) &pluginInfo, szCurrentVersion);
- upd.cpbVersion = strlen((char *)upd.pbVersion);
-
- CallService(MS_UPDATE_REGISTER, 0, (LPARAM)&upd);
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.pszSection = LPGEN("My Details");
+ sid.pszDescription = LPGEN("Next protocol");
+ sid.pszName = "MYDETAILS_NEXT_PROTOCOL";
+ sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RIGHT_ARROW));
+ Skin_AddIcon(&sid);
}
-
- return 0;
+ return 0;
}
static int MainUninit(WPARAM wParam, LPARAM lParam)
@@ -343,7 +280,7 @@ static BOOL CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam, L
bool foundDefNick = true;
for(int i = 1 ; foundDefNick && i < protocols->GetSize() ; i++)
{
- if (stricmp(protocols->Get(i)->nickname, nick) != 0)
+ if (_stricmp(protocols->Get(i)->nickname, nick) != 0)
{
foundDefNick = false;
break;
@@ -352,7 +289,7 @@ static BOOL CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (foundDefNick)
{
- if (stricmp(protocols->default_nick, nick) != 0)
+ if (_stricmp(protocols->default_nick, nick) != 0)
lstrcpy(protocols->default_nick, nick);
}
}
@@ -435,7 +372,7 @@ static int PluginCommand_SetMyNicknameUI(WPARAM wParam,LPARAM lParam)
int i;
for(i = 0 ; i < protocols->GetSize() ; i++)
{
- if (stricmp(protocols->Get(i)->name, proto) == 0)
+ if (_stricmp(protocols->Get(i)->name, proto) == 0)
{
proto_num = i;
break;
@@ -475,7 +412,7 @@ static int PluginCommand_SetMyNickname(WPARAM wParam,LPARAM lParam)
{
for(int i = 0 ; i < protocols->GetSize() ; i++)
{
- if (stricmp(protocols->Get(i)->name, proto) == 0)
+ if (_stricmp(protocols->Get(i)->name, proto) == 0)
{
if (!protocols->Get(i)->CanSetNick())
{
@@ -544,7 +481,7 @@ static int PluginCommand_SetMyAvatarUI(WPARAM wParam,LPARAM lParam)
int i;
for(i = 0 ; i < protocols->GetSize() ; i++)
{
- if (stricmp(protocols->Get(i)->name, proto) == 0)
+ if (_stricmp(protocols->Get(i)->name, proto) == 0)
{
proto_num = i;
break;
@@ -581,7 +518,7 @@ static int PluginCommand_SetMyAvatar(WPARAM wParam,LPARAM lParam)
{
for(int i = 0 ; i < protocols->GetSize() ; i++)
{
- if (stricmp(protocols->Get(i)->name, proto) == 0)
+ if (_stricmp(protocols->Get(i)->name, proto) == 0)
{
if (!protocols->Get(i)->CanSetAvatar())
{
@@ -649,7 +586,7 @@ static int PluginCommand_GetMyAvatar(WPARAM wParam,LPARAM lParam)
{
for(int i = 0 ; i < protocols->GetSize() ; i++)
{
- if (stricmp(protocols->Get(i)->name, proto) == 0)
+ if (_stricmp(protocols->Get(i)->name, proto) == 0)
{
if (!protocols->Get(i)->CanGetAvatar())
{
@@ -819,7 +756,7 @@ static int PluginCommand_SetMyStatusMessageUI(WPARAM wParam,LPARAM lParam)
{
proto = protocols->Get(i);
- if (stricmp(proto->name, proto_name) == 0)
+ if (_stricmp(proto->name, proto_name) == 0)
{
proto_num = i;
break;
diff --git a/plugins/MyDetails/mydetails.h b/plugins/MyDetails/mydetails.h
index 0780f7335e..dd2d8050d3 100644
--- a/plugins/MyDetails/mydetails.h
+++ b/plugins/MyDetails/mydetails.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Ricardo Pescuma Domenecci
This is free software; you can redistribute it and/or
@@ -14,29 +14,12 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this file; see the file license.txt. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
+Boston, MA 02111-1307, USA.
*/
#ifndef __MYDETAILS_H__
-# define __MYDETAILS_H__
-
-
-extern "C"
-{
-
-// Dll init
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved);
-
-// Exports:
-__declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion);
-int __declspec(dllexport) Load(PLUGINLINK *link);
-int __declspec(dllexport) Unload(void);
-
-
-}
-
-
+#define __MYDETAILS_H__
#endif // __MYDETAILS_H__ \ No newline at end of file
diff --git a/plugins/MyDetails/options.cpp b/plugins/MyDetails/options.cpp
index 5865010683..05d38aa6cc 100644
--- a/plugins/MyDetails/options.cpp
+++ b/plugins/MyDetails/options.cpp
@@ -83,19 +83,16 @@ void LoadOptions()
int InitOptionsCallback(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize=sizeof(odp);
- odp.position=-200000000;
- odp.hInstance=hInst;
- odp.pfnDlgProc=DlgProcOpts;
- odp.pszTemplate=MAKEINTRESOURCE(IDD_OPTS);
- odp.pszGroup=Translate("Customize");
- odp.pszTitle=Translate("My Details");
- odp.flags=ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
-
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = -200000000;
+ odp.hInstance = hInst;
+ odp.pfnDlgProc = DlgProcOpts;
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTS);
+ odp.pszGroup = LPGEN("Customize");
+ odp.pszTitle = LPGEN("My Details");
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/MyDetails/sdk/m_NewAwaySys.h b/plugins/MyDetails/sdk/m_NewAwaySys.h
deleted file mode 100644
index 4038fadaa7..0000000000
--- a/plugins/MyDetails/sdk/m_NewAwaySys.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- New Away System plugin for Miranda IM
- Copyright (c) 2005-2006 Chervov Dmitry
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#ifndef __M_NEWAWAYSYS_H
-#define __M_NEWAWAYSYS_H
-
-// NAS_PROTOINFO::Flags constants
-#define PIF_NO_CLIST_SETSTATUSMODE 1 // NAS won't call MS_CLIST_SETSTATUSMODE service on a global status change, if this flag is set. it's useful if you want to change the global message and status in NAS without changing current "real" protocol statuses. NAS ignores this flag if szProto != NULL
-#define PIF_NOTTEMPORARY 2
-// usually you should NOT set this flag
-// for MS_NAS_SETSTATE: NAS will overwrite current user-defined message for szProto if this flag is specified; otherwise (if the flag isn't specified), your szMsg will be stored only until the next szProto status change, and won't overwrite any messages specified by user
-// for MS_NAS_GETSTATE: NAS ignores any temporary messages and returns only non-temporary ones. this flag affects something only when status == 0
-
-typedef struct {
- int cbSize;
- char *szProto; // pointer to protocol modulename (NULL means global)
- union
- {
- char *szMsg;
- WCHAR *wszMsg;
- TCHAR *tszMsg;
- }; // pointer to the status message _format_ (i.e. it's an unparsed message containing variables, in any case. NAS takes care of parsing) (may be NULL - means that there's no specific message for this protocol - then the global status message will be used)
-/*
- Be aware that MS_NAS_GETSTATE allocates memory for szMsg through Miranda's
- memory management interface (MS_SYSTEM_GET_MMI). And MS_NAS_SETSTATE
- expects szMsg to be allocated through the same service. MS_NAS_SETSTATE deallocates szMsg.
-*/
- WORD status; // status mode. 0 means current (NAS will overwrite 0 with the current status mode)
-// for MS_NAS_GETSTATE if the specified status is not 0, MS_NAS_GETSTATE will return the default/last status message (depends on settings) - i.e. the same message that will be shown by default when user changes status to the specified one. please note that, for example, if current status mode is ID_STATUS_AWAY, then status messages returned by MS_NAS_GETSTATE for status=0 and status=ID_STATUS_AWAY may be different! for status=ID_STATUS_AWAY it always returns the default/last status message, and for status=0 it returns _current_ status message.
- int Flags;
-} NAS_PROTOINFO;
-
-// MS_NAS_GETSTATE
-// Fills specified array of NAS_PROTOINFO items with protocol data.
-// You must construct the array and specify cbSize and szProto fields of
-// all items in the array before calling this service.
-// Remember to free szMsg fields through Miranda's MMI if you don't pass them back to NAS through MS_NAS_SETSTATE later.
-// wParam = (WPARAM)(NAS_PROTOINFO*)pi - pointer to an array of NAS_PROTOINFO items to be filled.
-// lParam = (LPARAM)(int)protoCount - number of items in pi.
-// returns 0 on success
-#define MS_NAS_GETSTATEA "NewAwaySystem/GetStateA"
-#define MS_NAS_GETSTATEW "NewAwaySystem/GetStateW"
-#ifdef _UNICODE
- #define MS_NAS_GETSTATE MS_NAS_GETSTATEW
-#else
- #define MS_NAS_GETSTATE MS_NAS_GETSTATEA
-#endif
-
-// MS_NAS_SETSTATE
-// Changes status mode and message of specified protocols.
-// (Note that this service deallocates szMsg field of the specified items through
-// Miranda's MMI, so the array is not valid anymore after MS_NAS_SETSTATE returns!)
-// wParam = (WPARAM)(NAS_PROTOINFO*)pi - pointer to an array of NAS_PROTOINFO items.
-// lParam = (LPARAM)(int)protoCount - number of items in pi.
-// returns 0 on success
-#define MS_NAS_SETSTATEA "NewAwaySystem/SetStateA"
-#define MS_NAS_SETSTATEW "NewAwaySystem/SetStateW"
-#ifdef _UNICODE
- #define MS_NAS_SETSTATE MS_NAS_SETSTATEW
-#else
- #define MS_NAS_SETSTATE MS_NAS_SETSTATEA
-#endif
-
-// NAS_ISWINFO::Flags constants
-#define ISWF_NOCOUNTDOWN 1 // don't start the countdown to close the window
-#define ISWF_UNICODE 2 // specifies that NAS_ISWINFO::szMsg is a WCHAR*
-#ifdef _UNICODE
- #define ISWF_TCHAR ISWF_UNICODE // will use WCHAR* instead of char*
-#else
- #define ISWF_TCHAR 0 // will use char*, as usual
-#endif
-
-typedef struct {
- int cbSize;
- char *szProto; // pointer to initial protocol modulename (NULL means global); ignored when hContact is not NULL.
- HANDLE hContact; // NAS will select this contact in the window initially, if it's not NULL.
- union
- {
- char *szMsg;
- WCHAR *wszMsg;
- TCHAR *tszMsg;
- }; // pointer to an initial status message (may be NULL, NAS will use the default message then)
- WORD status; // status mode. 0 means current.
- int Flags; // a combination of ISWF_ constants
-} NAS_ISWINFO;
-
-// MS_NAS_INVOKESTATUSWINDOW
-// Invokes the status message change window.
-// Though if the window is open already, this service just activates an existing window and changes protocol status (i.e. it ignores szMsg and hContact). This behavior may change in future.
-// wParam = (WPARAM)(NAS_ISWINFO*)iswi - pointer to a NAS_ISWINFO structure.
-// lParam = 0
-// returns HWND of the window on success, or NULL on failure.
-#define MS_NAS_INVOKESTATUSWINDOW "NewAwaySystem/InvokeStatusWindow"
-
-/* An example:
- NAS_ISWINFO iswi = {0}; // for C you may use ZeroMemory() instead
- iswi.cbSize = sizeof(iswi);
- iswi.tszMsg = _T("New global status message.");
- iswi.Flags = ISWF_TCHAR;
- CallService(MS_NAS_INVOKESTATUSWINDOW, (WPARAM)&iswi, 0);
-*/
-
-#endif // __M_NEWAWAYSYS_H \ No newline at end of file
diff --git a/plugins/MyDetails/sdk/m_avatars.h b/plugins/MyDetails/sdk/m_avatars.h
deleted file mode 100644
index 46c6d2b614..0000000000
--- a/plugins/MyDetails/sdk/m_avatars.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2004 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-Avatar service
-
-- load and maintain a cache of contact avatars.
-- draw avatars to a given target device context
-- maintain per protocol fallback images
-
-The avatar service builds on top of Mirandas core bitmap loading service (MS_UTILS_LOADBITMAP).
-However, if imgdecoder.dll is installed in mirandas main or Plugins directory, it can be used
-to support PNG images. The avatar service loads 32bit PNG images and peforms alpha channel
-premultiplication so that these images can be rendered by using the Win32 AlphaBlend() API.
-
-The cache grows on demand only, that is, no avatars are PREloaded. An avatar is only loaded
-if a plugin requests this by using the MS_AV_GETAVATAR service. Since avatars may update
-asynchronously, the avatar iamge may not be ready when a plugin calls the service. In that
-case, an event (ME_AV_AVATARCHANGED) is fired when a contacts avatar changes. This event
-is also fired, when a contact avatar changes automatically.
-
-The service takes care about protocol capabilites (does not actively fetch avatars for
-protocols which do not report avatar capabilities via PF4_AVATARS or for protocols which
-have been disabled in the option dialog). It also does not actively fetch avatars for
-protocols which are in invisible status mode (may cause privacy issues and some protocols
-like MSN don't allow any outbound client communication when in invisible status mode).
-
-- TODO
-- maintain recent avatars (store the last hashes to avoid re-fetching)
-- cache expiration, based on least recently used algorithm.
-
-(c) 2005 by Nightwish, silvercircle@gmail.com
-
-*/
-
-#ifndef _M_AVATARS_H
-#define _M_AVATARS_H
-
-#define AVS_BITMAP_VALID 1
-#define AVS_BITMAP_EXPIRED 2 // the bitmap has been expired from the cache. (unused, currently.
-#define AVS_HIDEONCLIST 4
-#define AVS_PREMULTIPLIED 8 // set in the dwFlags member of the struct avatarCacheEntry for 32 bit transparent
- // images when loaded with imgdecoder. These images can be rendered transparently
- // using the AlphaBlend() API with AC_SRC_ALPHA
-#define AVS_PROTOPIC 16 // picture is a protocol picture
-#define AVS_CUSTOMTRANSPBKG 32 // Bitmap was changed to set the background color transparent
-#define AVS_HASTRANSPARENCY 64 // Bitmap has at least one pixel transparent
-#define AVS_OWNAVATAR 128 // is own avatar entry
-#define AVS_NOTREADY 4096
-
-struct avatarCacheEntry {
- DWORD cbSize; // set to sizeof(struct)
- HANDLE hContact; // contacts handle, 0, if it is a protocol avatar
- HBITMAP hbmPic; // bitmap handle of the picutre itself
- DWORD dwFlags; // see above for flag values
- LONG bmHeight, bmWidth; // bitmap dimensions
- DWORD t_lastAccess; // last access time (currently unused, but plugins should still
- // use it whenever they access the avatar. may be used in the future
- // to implement cache expiration
- LPVOID lpDIBSection; // unused field
- char szFilename[MAX_PATH]; // filename of the avatar (absolute path)
-};
-
-typedef struct avatarCacheEntry AVATARCACHEENTRY;
-
-struct CacheNode {
- struct CacheNode *pNextNode;
- struct avatarCacheEntry ace;
- //CRITICAL_SECTION cs;
- BOOL loaded;
- int mustLoad;
- DWORD dwFlags;
- int pa_format;
-};
-
-#define AVDRQ_FALLBACKPROTO 1 // use the protocol picture as fallback (currently not used)
-#define AVDRQ_FAILIFNOTCACHED 2 // don't create a cache entry if it doesn't already exist. (currently not working)
-#define AVDRQ_ROUNDEDCORNER 4 // draw with rounded corners
-#define AVDRQ_DRAWBORDER 8 // draw a border around the picture
-#define AVDRQ_PROTOPICT 16 // draw a protocol picture (if available).
-#define AVDRQ_HIDEBORDERONTRANSPARENCY 32 // hide border if bitmap has transparency
-#define AVDRQ_OWNPIC 64 // draw own avatar (szProto is valid)
-#define AVDRQ_RESPECTHIDDEN 128 // don't draw images marked as hidden
-
-// request to draw a contacts picture. See MS_AV_DRAWAVATAR service description
-
-typedef struct _avatarDrawRequest {
- DWORD cbSize; // set this to sizeof(AVATARDRAWREQUEST) - mandatory, service will return failure code if
- // cbSize is wrong
- HANDLE hContact; // the contact for which the avatar should be drawn. set it to 0 to draw a protocol picture
- HDC hTargetDC; // target device context
- RECT rcDraw; // target rectangle. The avatar will be centered within the rectangle and scaled to fit.
- DWORD dwFlags; // flags (see above for valid bitflags)
- DWORD dwReserved; // for future use
- DWORD dwInternal; // don't use it
- COLORREF clrBorder; // color for the border (used with AVDRQ_DRAWBORDER)
- UCHAR radius; // radius (used with AVDRQ_ROUNDEDCORNER)
- UCHAR alpha; // alpha value for semi-transparent avatars (valid values form 1 to 255, if it is set to 0
- // the avatar won't be transparent.
- char *szProto; // only used when AVDRQ_PROTOPICT or AVDRQ_OWNPIC is set
-} AVATARDRAWREQUEST;
-
-#define CACHE_BLOCKSIZE 20
-
-#define AVS_MODULE "AVS_Settings" // db settings module path
-#define PPICT_MODULE "AVS_ProtoPics" // protocol pictures are saved here
-
-// obtain the bitmap handle of the avatar for the given contact
-// wParam = (HANDLE)hContact
-// lParam = 0;
-// returns: pointer to a struct avatarCacheEntry *, NULL on failure
-// if it returns a failure, the avatar may be ready later and the caller may receive
-// a notification via ME_AV_AVATARCHANGED
-// DONT modify the contents of the returned data structure
-
-#define MS_AV_GETAVATARBITMAP "SV_Avatars/GetAvatar"
-
-// obtain a avatar cache entry for one of my own avatars
-// wParam = 0
-// lParam = (char *)szProto (protocol for which we need to obtain the own avatar information)
-// returns: pointer to a struct avatarCacheEntry *, NULL on failure
-// DONT modify the contents of the returned data structure
-
-#define MS_AV_GETMYAVATAR "SV_Avatars/GetMyAvatar"
-
-// protect the current contact picture from being overwritten by automatic
-// avatar updates. Actually, it only backups the contact picture filename
-// and will used the backuped version until the contact picture gets unlocked
-// again. So this service does not disable avatar updates, but it "fakes"
-// a locked contact picture to the users of the GetAvatar service.
-//
-// wParam = (HANDLE)hContact
-// lParam = 1 -> lock the avatar, lParam = 0 -> unlock
-
-#define MS_AV_PROTECTAVATAR "SV_Avatars/ProtectAvatar"
-
-// set (and optionally protect) a local contact picture for the given hContact
-//
-// wParam = (HANDLE)hContact
-// lParam = either a full picture filename or NULL. If lParam == NULL, the service
-// will open a file selection dialog.
-
-#define MS_AV_SETAVATAR "SV_Avatars/SetAvatar"
-
-// set a local picture for the given protocol
-//
-// wParam = (char *) protocol name
-// lParam = either a full picture filename or NULL. If lParam == NULL, the service
-// will open a file selection dialog.
-
-#define MS_AV_SETMYAVATAR "SV_Avatars/SetMyAvatar"
-
-// see if is possible to set the avatar for the expecified protocol
-//
-// wParam = (char *) protocol name
-// lParam = 0
-// return = 1 if can set, 0 if can't
-
-#define MS_AV_CANSETMYAVATAR "SV_Avatars/CanSetMyAvatar"
-
-// Call avatar option dialog for contact
-//
-// wParam = (HANDLE)hContact
-
-#define MS_AV_CONTACTOPTIONS "SV_Avatars/ContactOptions"
-
-// draw an avatar picture
-//
-// wParam = 0 (not used)
-// lParam = AVATARDRAWREQUEST *avdr
-// draw a contact picture to a destination device context. see description of
-// the AVATARDRAWREQUEST structure for more information on how to use this
-// service.
-// return value: 0 -> failure, avatar probably not available, or not ready. The drawing
-// service DOES schedule an avatar update so your plugin will be notified by the ME_AV_AVATARCHANGED
-// event when the requested avatar is ready for use.
-// 1 -> success. avatar was found and drawing should be ok.
-
-#define MS_AV_DRAWAVATAR "SV_Avatars/Draw"
-
-// fired when a contacts avatar cached by avs changes
-// it includes changes made by the user
-// wParam = hContact
-// lParam = struct avatarCacheEntry *cacheEntry
-// the event CAN pass a NULL pointer in lParam which means that the avatar has changed,
-// but is no longer valid (happens, when a contact removes his avatar, for example).
-// DONT DESTROY the bitmap handle passed in the struct avatarCacheEntry *
-//
-// It is also possible that this event passes 0 as wParam (hContact), in which case,
-// a protocol picture (pseudo - avatar) has been changed.
-
-#define ME_AV_AVATARCHANGED "SV_Avatars/AvatarChanged"
-
-
-typedef struct _contactAvatarChangedNotification {
- int cbSize; // sizeof()
- HANDLE hContact; // this might have to be set by the caller too
- int format; // PA_FORMAT_*
- char filename[MAX_PATH]; // full path to filename which contains the avatar
- char hash[128]; // avatar hash (always an empty string by now)
-} CONTACTAVATARCHANGEDNOTIFICATION;
-
-// fired when the contacts avatar is changed by the contact
-// wParam = hContact
-// lParam = struct CONTACTAVATARCHANGENOTIFICATION *cacn
-// the event CAN pass a NULL pointer in lParam which means that the contact deleted its avatar
-
-#define ME_AV_CONTACTAVATARCHANGED "SV_Avatars/ContactAvatarChanged"
-
-// fired when one of our own avatars was changed
-// wParam = (char *)szProto (protocol for which a new avatar was set)
-// lParam = AVATARCACHEENTRY *ace (new cache entry, NULL if the new avatar is not valid)
-
-#define ME_AV_MYAVATARCHANGED "SV_Avatars/MyAvatarChanged"
-
-// Service to be called by protocols to report an avatar has changed. Some avatar changes
-// can be detected automatically, but some not (by now only Skype ones)
-// wParam = (char *)szProto (protocol for which a new avatar was set)
-// lParam = 0
-
-#define MS_AV_REPORTMYAVATARCHANGED "SV_Avatars/ReportMyAvatarChanged"
-
-
-
-// Bitmap services //////////////////////////////////////////////////////////////////////
-
-// Load an image
-// wParam = NULL
-// lParam = filename
-#define MS_AV_LOADBITMAP32 "SV_Avatars/LoadBitmap32"
-
-// Save an HBITMAP to an image
-// wParam = HBITMAP
-// lParam = full path of filename
-#define MS_AV_SAVEBITMAP "SV_Avatars/SaveBitmap"
-
-// Returns != 0 if can save that type of image, = 0 if cant
-// wParam = 0
-// lParam = PA_FORMAT_* // image format
-#define MS_AV_CANSAVEBITMAP "SV_Avatars/CanSaveBitmap"
-
-
-#define RESIZEBITMAP_STRETCH 0 // Distort bitmap to size in (max_width, max_height)
-#define RESIZEBITMAP_KEEP_PROPORTIONS 1 // Keep bitmap proportions (probabily only one of the
- // max_width/max_height will be respected, and the other will be
- // smaller)
-#define RESIZEBITMAP_CROP 2 // Keep bitmap proportions but crop it to fix exactly in (max_width, max_height)
- // Some image info outside will be lost
-#define RESIZEBITMAP_MAKE_SQUARE 3 // Image will be allways square. Image will be croped and the size
- // returned will be min(max_width, max_height)
-
-#define RESIZEBITMAP_FLAG_DONT_GROW 0x1000 // If set, the image will not grow. Else, it will grow to fit the max width/height
-
-typedef struct {
- size_t size; // sizeof(ResizeBitmap);
-
- HBITMAP hBmp;
-
- int max_width;
- int max_height;
-
- int fit; // One of: RESIZEBITMAP_*
-} ResizeBitmap;
-
-// Returns a copy of the bitmap with the size especified or the original bitmap if nothing has to be changed
-// wParam = ResizeBitmap *
-// lParam = NULL
-#define MS_AV_RESIZEBITMAP "SV_Avatars/ResizeBitmap"
-
-/*
- * flags for internal use ONLY
- */
-
-#define MC_ISMASTERCONTACT 0x01
-#define MC_ISSUBCONTACT 0x02
-#define AVH_MUSTNOTIFY 0x04 // node->dwFlags (loader thread must notify avatar history about change/delete event)
-#define AVS_DELETENODEFOREVER 0x08
-
-#endif
diff --git a/plugins/MyDetails/sdk/m_cluiframes.h b/plugins/MyDetails/sdk/m_cluiframes.h
deleted file mode 100644
index 067d586f1c..0000000000
--- a/plugins/MyDetails/sdk/m_cluiframes.h
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
-Miranda ICQ: the free icq client for MS Windows
-Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/************************************************************************/
-/* Extra Image Column Support +0.5.0.0 */
-/************************************************************************/
-/*
- HINT: Common usage of Extra icons by modules
- Usage sequence is next:
- The Plugin have to be subscribed to ME_CLIST_EXTRA_LIST_REBUILD and
- ME_CLIST_EXTRA_IMAGE_APPLY notifications.
-
- During .._REBUILD Notification handle plugin should register required
- icons in CList internal list via MS_CLIST_EXTRA_ADD_ICON servise
- and should to keep returned icon indexes.
-
- Note: _REBUILD notification means that list was rebuilded and
- all previously registered icon indexes became invalid and can not be used.
-
- Note: After calling _ADD_ICON services the icon handle you provided is not
- need for extra images porpouses and have to be released by you in order
- to reduce GDI resources consumptions.
-
- Note: Don't forget that icon handle loaded by LoadIcon GDI function is
- shared and will be kept in memory till plugin unloading. So it is not
- better way to load icon. Please use appropriate Iconlib services.
-
- Note: The icon can be registered in Clist at any time.
-
- During .._ME_CLIST_EXTRA_IMAGE_APPLY the plugin has to call
- MS_CLIST_EXTRA_SET_ICON passing appropriate icon index for contact. This
- service can be called any time in order to change current extra image.
-
- ATTENTION: Currently Module support only 254 registered extra icons. The returned
- value 0xFF internally means 'No extra icon' so thry t register only realy required
- icons. The best solution - register not registered/invalidated icon just before
- setting of extra image.
-
- ATTENTION: Due to different module may use same extra icons slot - they will be conflicted.
- Please provide ability to end-user to change extra image slot to be used to show
- your plugin information.
-
-*/
-
-//Extra columns type.
-//column arranged in this way
-//
-// [statusicon] ContactName [WEB][ADV1][ADV2][SMS][EMAIL][PROTO][CLIENT]
-//
-#define EXTRA_ICON_EMAIL 1
-#define EXTRA_ICON_PROTO 2
-#define EXTRA_ICON_SMS 3
-#define EXTRA_ICON_ADV1 4
-#define EXTRA_ICON_ADV2 5
-#define EXTRA_ICON_WEB 6
-#define EXTRA_ICON_CLIENT 7
-#define EXTRA_ICON_VISMODE 8
-#define EXTRA_ICON_ADV3 9
-#define EXTRA_ICON_ADV4 10
-
-#define EXTRA_ICON_COUNT 10
-
-typedef struct
-{
- int cbSize; //must be sizeof(IconExtraColumn)
- int ColumnType;
- HANDLE hImage; //return value from MS_CLIST_EXTRA_ADD_ICON
-}IconExtraColumn,*pIconExtraColumn;
-
-//Set icon for contact at needed column
-//wparam=hContact
-//lparam=pIconExtraColumn
-//return 0 on success,-1 on failure
-//
-//See above for supported columns
-#define MS_CLIST_EXTRA_SET_ICON "CListFrames/SetIconForExraColumn"
-
-//Adding icon to extra image list.
-//Call this in ME_CLIST_EXTRA_LIST_REBUILD event
-//
-//wparam=hIcon
-//lparam=0
-//return hImage on success,-1 on failure
-#define MS_CLIST_EXTRA_ADD_ICON "CListFrames/AddIconToExtraImageList"
-
-#define ME_CLIST_EXTRA_LIST_REBUILD "CListFrames/OnExtraListRebuild"
-
-//called with wparam=hContact
-#define ME_CLIST_EXTRA_IMAGE_APPLY "CListFrames/OnExtraImageApply"
-
-//End of extra images header. TODO move it to separate m_extraimages.h file
-//Cause it has not any relationship to cluiframes engine
-
-
-/************************************************************************/
-/* CLUI Frames Support */
-/************************************************************************/
-
-// NOTE: Clui frames engine is in to be reconsructed..
-
-// Constants used bellow
-typedef struct tagCLISTFrame {
- DWORD cbSize;
- HWND hWnd ;
- HICON hIcon;
- int align; //al flags below
- union {
- int height;
- int minSize; //the actual meaning depends from type of frame
- };
- int Flags; //F_flags below
- union {
- char *name; //frame window name indentifier (DO NOT TRANSLATE)
- wchar_t *wname;
- LPTSTR tname;
- };
- union {
- char *TBname; //titlebar & menu caption
- wchar_t *TBwname;
- LPTSTR TBtname;
- };
-} CLISTFrame;
-
-#define F_VISIBLE 1 //Frame visible
-#define F_SHOWTB 2 //Show TitleBar
-#define F_UNCOLLAPSED 4 //UnCollapse frame
-#define F_LOCKED 8 //Lock Frame
-#define F_NOBORDER 16 //Dont apply WS_BORDER style for window
-#define F_SHOWTBTIP 32 //Show titlebar tooltip
-#define F_CANBEVERTICAL 64 //frames can be vertical
-#define F_CANNOTBEHORIZONTAL 128 //frames can NOT be horizontal F_CANBEVERTICAL have to be set
-#define F_NO_SUBCONTAINER 1024 //Support skining no subcontainer needed
-#define F_UNICODE 32768 //Use unicode text
-#ifdef _UNICODE
-# define F_TCHAR F_UNICODE
-#else
-# define F_TCHAR 0
-#endif
-
-// frame alignment
-#define alTop 0x00000001
-#define alBottom 0x00000002
-#define alClient 0x00000004 //only one alClient frame
-
-// since 0.7.0.20
-#define alLeft 0x00000011 // frame is vertical
-#define alRight 0x00000012
-
-#define alVertFrameMask 0x00000010
-
-#define FU_TBREDRAW 1 //redraw titlebar
-#define FU_FMREDRAW 2 //redraw Frame
-#define FU_FMPOS 4 //update Frame position
-
-#define FO_FLAGS 0x0001 //return set of F_VISIBLE,F_SHOWTB,F_UNCOLLAPSED,F_LOCKED,F_NOBORDER,F_SHOWTBTIP
-#define FO_NAME 0x0002 //Change name
-#define FO_TBNAME 0x0003 //Change TB caption
-#define FO_TBSTYLE 0x0004 //Change TB style
-#define FO_TBEXSTYLE 0x0005 //Change TB exstyle
-#define FO_ICON 0x0006 //Change icon
-#define FO_HEIGHT 0x0007 //Change height
-#define FO_ALIGN 0x0008 //Change align
-#define FO_TBTIPNAME 0x0009 //Change TB tooltip
-#define FO_FLOATING 0x000a //Change floating mode
-
-#define FO_UNICODETEXT 0x8000 // flag for FO_NAME,FO_TBNAME, FO_TBTIPNAME set/get lPAram as unicode wchar_t
-#ifdef _UNICODE
- #define FO_TCHAR FO_UNICODETEXT
-#else
- #define FO_TCHAR 0x0000
-#endif
-
-
-//////////////////////////////////////////////////////////////////////////
-//want show tooltip for statusbar
-//wparam=(char *)protocolname
-//lparam=0
-#define ME_CLIST_FRAMES_SB_SHOW_TOOLTIP "CListFrames/StatusBarShowToolTip"
-
-//////////////////////////////////////////////////////////////////////////
-//want hide tooltip for statusbar
-//wparam=lparam=0
-#define ME_CLIST_FRAMES_SB_HIDE_TOOLTIP "CListFrames/StatusBarHideToolTip"
-
-//////////////////////////////////////////////////////////////////////////
-//adds a frame window
-//wParam=(CLISTFrame*)
-//lParam=0
-//returns an integer, the frame id.
-#define MS_CLIST_FRAMES_ADDFRAME "CListFrames/AddFrame"
-
-//////////////////////////////////////////////////////////////////////////
-// remove frame. It destroy your window
-//
-#define MS_CLIST_FRAMES_REMOVEFRAME "CListFrames/RemoveFrame"
-
-//////////////////////////////////////////////////////////////////////////
-//shows all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SHOWALLFRAMES "CListFrames/ShowALLFrames"
-
-//////////////////////////////////////////////////////////////////////////
-//shows the titlebars of all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SHOWALLFRAMESTB "CListFrames/ShowALLFramesTB"
-
-//////////////////////////////////////////////////////////////////////////
-//hides the titlebars of all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_HIDEALLFRAMESTB "CListFrames/HideALLFramesTB"
-
-//////////////////////////////////////////////////////////////////////////
-//shows the frame if it is hidden,
-//hides the frame if it is shown
-//wParam=FrameId
-//lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SHFRAME "CListFrames/SHFrame"
-
-//////////////////////////////////////////////////////////////////////////
-//shows the frame titlebar if it is hidden,
-//hides the frame titlebar if it is shown
-//wParam=FrameId
-//lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SHFRAMETITLEBAR "CListFrame/SHFrameTitleBar"
-
-//////////////////////////////////////////////////////////////////////////
-//locks the frame if it is unlocked,
-//unlock the frame if it is locked
-//wParam=FrameId
-//lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_ULFRAME "CListFrame/ULFrame"
-
-//////////////////////////////////////////////////////////////////////////
-//collapses the frame if it is uncollapsed,
-//uncollapses the frame if it is collapsed
-//wParam=FrameId
-//lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_UCOLLFRAME "CListFrame/UCOLLFrame"
-
-//////////////////////////////////////////////////////////////////////////
-//trigger border flags
-//wparam=frameid
-//lparam=0
-#define MS_CLIST_FRAMES_SETUNBORDER "CListFrame/SetUnBorder"
-
-//////////////////////////////////////////////////////////////////////////
-//redraws the frame
-//wParam=FrameId, -1 for all frames
-//lparam=FU_flags
-//returns a pointer to option, -1 on failure
-#define MS_CLIST_FRAMES_UPDATEFRAME "CListFrame/UpdateFrame"
-
-//////////////////////////////////////////////////////////////////////////
-//gets the frame options
-//(HIWORD)wParam=FrameId
-//(LOWORD)wParam=FO_flag
-//lParam=0
-//returns a pointer to option, -1 on failure
-#define MS_CLIST_FRAMES_GETFRAMEOPTIONS "CListFrame/GetFrameOptions"
-
-//sets the frame options
-//(HIWORLD)wParam=FrameId
-//(LOWORD)wParam=FO_flag
-//lParam=value
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SETFRAMEOPTIONS "CListFrame/SetFrameOptions"
-
-//////////////////////////////////////////////////////////////////////////
-//Frames related menu stuff
-//////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////
-//add a new item to the context frame menu
-//wParam=0
-//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-//returns a handle to the new item
-//popupposition=frameid
-//contactowner=advanced parameter
-#define MS_CLIST_ADDCONTEXTFRAMEMENUITEM "CList/AddContextFrameMenuItem"
-
-//////////////////////////////////////////////////////////////////////////
-//remove a item from context frame menu
-//wParam=hMenuItem returned by MS_CLIST_ADDCONTACTMENUITEM
-//lParam=0
-//returns 0 on success, nonzero on failure
-#define MS_CLIST_REMOVECONTEXTFRAMEMENUITEM "CList/RemoveContextFrameMenuItem"
-
-//////////////////////////////////////////////////////////////////////////
-//builds the context menu for a frame
-//wparam=frameid
-//lParam=0
-//returns a HMENU on success, or NULL on failure
-#define MS_CLIST_MENUBUILDFRAMECONTEXT "CList/BuildContextFrameMenu"
-
-//////////////////////////////////////////////////////////////////////////
-// the frame menu is about to be built
-// wparam=frameid
-// lparam=
-// -1 for build from titlebar,
-// use
-// MS_CLIST_ADDCONTEXTFRAMEMENUITEM
-// MS_CLIST_REMOVECONTEXTFRAMEMENUITEM
-//
-// >0 for build in main menu,
-// must be popupname=lparam to place your items in right popup of main menu.
-// use
-// MS_CLIST_ADDMAINMENUITEM
-// MS_CLIST_REMOVEMAINMENUITEM
-//
-#define ME_CLIST_PREBUILDFRAMEMENU "CList/PreBuildFrameMenu"
-
-//////////////////////////////////////////////////////////////////////////
-//needed by cluiframes module to add frames menu to main menu.
-//it just calls NotifyEventHooks(hPreBuildFrameMenuEvent,wParam,lParam);
-#define MS_CLIST_FRAMEMENUNOTIFY "CList/ContextFrameMenuNotify"
diff --git a/plugins/MyDetails/sdk/m_ersatz.h b/plugins/MyDetails/sdk/m_ersatz.h
deleted file mode 100644
index 8136a8bd5d..0000000000
--- a/plugins/MyDetails/sdk/m_ersatz.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-#ifndef __M_ERSATZ_H__
-# define __M_ERSATZ_H__
-
-
-//Returns the current status message for yourself
-//wParam=(WPARAM)0
-//lParam=(LPARAM)0
-//returns status msg or NULL if there is none. Remember to mir_free the return value
-#define PS_GETMYAWAYMSG "/GetMyAwayMsg"
-
-//Created if ersatz is installed
-//wParam=(WPARAM)0
-//lParam=(LPARAM)0
-//returns always 1
-#define MS_ERSATZ_ENABLED "ERSATZ/Enabled"
-
-
-#endif // __M_ERSATZ_H__
diff --git a/plugins/MyDetails/sdk/m_listeningto.h b/plugins/MyDetails/sdk/m_listeningto.h
deleted file mode 100644
index 0dddde710a..0000000000
--- a/plugins/MyDetails/sdk/m_listeningto.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef __M_LISTENINGTO_H__
-# define __M_LISTENINGTO_H__
-
-// To be used by other plugins to send listening info to miranda
-#define MIRANDA_WINDOWCLASS _T("Miranda.ListeningTo")
-#define MIRANDA_DW_PROTECTION 0x8754
-
-
-/*
-Return TRUE if sending listening to is enabled for this protocol
-
-wParam: char * - protocol name or NULL for all protocols
-lParam: ignored
-*/
-#define MS_LISTENINGTO_ENABLED "ListeningTo/Enabled"
-
-
-/*
-Enable/disable sending listening to this protocol
-
-wParam: char * - protocol name or NULL for all protocols
-lParam: BOOL - TRUE to enable, FALSE to disable
-*/
-#define MS_LISTENINGTO_ENABLE "ListeningTo/Enable"
-
-
-/*
-Notification fired when enable state changed
-
-wParam: char * - protocol name or NULL for all protocols
-lParam: BOOL - enabled
-*/
-#define ME_LISTENINGTO_ENABLE_STATE_CHANGED "ListeningTo/EnableStateChanged"
-
-
-#endif // __M_LISTENINGTO_H__
diff --git a/plugins/MyDetails/sdk/m_metacontacts.h b/plugins/MyDetails/sdk/m_metacontacts.h
deleted file mode 100644
index 1da12b97fa..0000000000
--- a/plugins/MyDetails/sdk/m_metacontacts.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-//get the handle for a contact's parent metacontact
-//wParam=(HANDLE)hSubContact
-//lParam=0
-//returns a handle to the parent metacontact, or null if this contact is not a subcontact
-#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=0
-// convert a given contact into a metacontact
-#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=(HANDLE)hMeta
-// add an existing contact to a metacontact
-#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=0
-// lParam=(HANDLE)hContact
-// remove a contact from a metacontact
-#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
-
-
-// added 0.9.13.2 (6/10/05)
-// wParam=(BOOL)disable
-// lParam=0
-// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
-// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
-// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
-#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
-
-#endif
diff --git a/plugins/MyDetails/sdk/m_proto_listeningto.h b/plugins/MyDetails/sdk/m_proto_listeningto.h
deleted file mode 100644
index b3e5f9dcd3..0000000000
--- a/plugins/MyDetails/sdk/m_proto_listeningto.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-//this module was created in v0.6.0.0
-
-#ifndef M_PROTO_LISTENINGTO_H__
-#define M_PROTO_LISTENINGTO_H__ 1
-
-
-// Protocol Services /////////////////////////////////////////////////////////////////
-
-// This is the services a protocol have to support to support listening info
-
-typedef struct {
- int cbSize;
-
- union {
- char* pszType; // Media type: Music, Video, etc...
- TCHAR* ptszType;
- };
- union {
- char* pszArtist; // Artist name
- TCHAR* ptszArtist;
- };
- union {
- char* pszAlbum; // Algum name
- TCHAR* ptszAlbum;
- };
- union {
- char* pszTitle; // Song name
- TCHAR* ptszTitle;
- };
- union {
- char* pszTrack; // Track number
- TCHAR* ptszTrack;
- };
- union {
- char* pszYear; // Song year
- TCHAR* ptszYear;
- };
- union {
- char* pszGenre; // Song genre
- TCHAR* ptszGenre;
- };
- union {
- char* pszLength; // Song length
- TCHAR* ptszLength;
- };
- union {
- char* pszPlayer; // Player name
- TCHAR* ptszPlayer;
- };
-
- DWORD dwFlags;
-
-} LISTENINGTOINFO;
-
-#define LTI_UNICODE 1
-
-#ifdef UNICODE
- #define LTI_TCHAR LTI_UNICODE
-#else
- #define LTI_TCHAR 0
-#endif
-
-// Set the listening info for the protocol.
-// Pass NULL to remove it.
-// wParam = NULL
-// lParam = LISTENINGTOINFO *
-#define PS_SET_LISTENINGTO "/SetListeningTo"
-
-// Get the listening info for the protocol
-// wParam = NULL
-// lParam = LISTENINGTOINFO *
-// The strings inside the struct need to be free using miranda free.
-#define PS_GET_LISTENINGTO "/GetListeningTo"
-
-// Also the protocol have to save a string with the text the other user is (probabily)
-// seeing under the main db key: <protocol>/ListeningTo
-
-// For a contact, the protocol should store the listening info as an string inside
-// the contact db key: <protocol>/ListeningTo
-
-
-// ListeningTo configuration plugin //////////////////////////////////////////////////
-
-// One plugin can be used to set some options relative to the listening to information.
-// But protocols should not assume this plugin exists. If it does not exist, protocols
-// have to decide what default to use.
-// This plugin have to support the following services:
-
-// Get the text format the user wants him / his contacts to see. Some strings represents
-// the text information:
-// %artist%, %album%, %title%, %track%, %year%, %genre%, %length%, %player%, %type%
-// This service is optional
-// wParam = TCHAR* - default text for this protocol
-// lParam = 0
-// Returns a TCHAR* containg the user setting. This need to be free using miranda free.
-#define MS_LISTENINGTO_GETTEXTFORMAT "ListeningTo/GetTextFormat"
-
-// Get the text the user wants him / his contacts to see, parsed with the info sent to
-// this service. Uses the same variables as the above service to the default text.
-// wParam = TCHAR* - default text for this protocol
-// lParam = LISTENINGTOINFO *
-// Returns a TCHAR* containg the parsed text. This need to be free using miranda free.
-#define MS_LISTENINGTO_GETPARSEDTEXT "ListeningTo/GetParsedText"
-
-// Get if the contact options about how to show the music info should be overriten or
-// not.
-// wParam = NULL
-// lParam = hContact
-// Returns a BOOL
-#define MS_LISTENINGTO_OVERRIDECONTACTOPTION "ListeningTo/OverrideContactOption"
-
-
-#endif // M_PROTO_LISTENINGTO_H__
-
diff --git a/plugins/MyDetails/sdk/m_smileyadd.h b/plugins/MyDetails/sdk/m_smileyadd.h
deleted file mode 100644
index c950202f0d..0000000000
--- a/plugins/MyDetails/sdk/m_smileyadd.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-Miranda SmileyAdd Plugin
-Plugin support header file
-Copyright (C) 2004-2006 borkra, portions by Rein-Peter de Boer
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-
-#define SAFLRE_INSERTEMF 2 // insert smiley as EMF into RichEdit, otherwise bitmap inserted
- // this flag allows "true" transparency
-
-typedef struct
-{
- int cbSize; //size of the structure
- HWND hwndRichEditControl; //handle to the rich edit control
- CHARRANGE* rangeToReplace; //same meaning as for normal Richedit use (NULL = replaceall)
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. SmileyAdd will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL, "Standard" will be used
- unsigned flags; //Flags (SAFLRE_*) that define the behaivior
- BOOL disableRedraw; //Parameter have been depricated, have no effect on operation
- HANDLE hContact; //Contact handle
-} SMADD_RICHEDIT3;
-
-//Replace smileys in a rich edit control...
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_RICHEDIT3*) &smre; //pointer to SMADD_RICHEDIT3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_REPLACESMILEYS "SmileyAdd/ReplaceSmileys"
-
-
-typedef struct
-{
- int cbSize; //size of the structure
- char* Protocolname; //protocol to use... if you have defined a protocol, you can
- //use your own protocol name. Smiley add will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- int xPosition; //Postition to place the selectwindow
- int yPosition; // "
- int Direction; //Direction (i.e. size upwards/downwards/etc) of the window 0, 1, 2, 3
-
- HWND hwndTarget; //Window, where to send the message when smiley is selected.
- UINT targetMessage; //Target message, to be sent.
- LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
- //see the example file.
- HWND hwndParent; //Parent window for smiley dialog
- HANDLE hContact; //Contact handle
-} SMADD_SHOWSEL3;
-
-//Show smiley selection window
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_SHOWSEL3*) &smre; //pointer to SMADD_SHOWSEL3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_SHOWSELECTION "SmileyAdd/ShowSmileySelection"
-
-
-typedef struct
-{
- int cbSize; //size of the structure
- char* Protocolname; // " "
- HICON ButtonIcon; //RETURN VALUE: this is filled with the icon handle
- //of the smiley that can be used on the button
- //if used with GETINFO2 handle must be destroyed by user!
- //NULL if the buttonicon is not defined...
- int NumberOfVisibleSmileys; //Number of visible smileys defined.
- int NumberOfSmileys; //Number of total smileys defined
- HANDLE hContact; //Contact handle
-} SMADD_INFO2;
-
-//get button smiley icon
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_INFO2*) &smgi; //pointer to SMADD_INFO2
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_GETINFO2 "SmileyAdd/GetInfo2"
-
-// Event notifies that SmileyAdd options have changed
-// Message dialogs usually need to redraw it's content on reception of this event
-//wParam = Contact handle which options have changed, NULL if global options changed
-//lParam = (LPARAM) 0; not used
-#define ME_SMILEYADD_OPTIONSCHANGED "SmileyAdd/OptionsChanged"
-
-#define SAFL_PATH 1 // provide smiley file path, icon otherwise
-#define SAFL_UNICODE 2 // string fields in OPTIONSDIALOGPAGE are WCHAR*
-
-#if defined _UNICODE || defined UNICODE
- #define SAFL_TCHAR SAFL_UNICODE
-#else
- #define SAFL_TCHAR 0
-#endif
-
-typedef struct
-{
- int cbSize; //size of the structure
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. Smiley add wil automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- union {
- TCHAR* str; //String to parse
- char* astr;
- wchar_t* wstr;
- };
- unsigned flag; //One of the SAFL_ flags specifies parsing requirements
- //This parameter should be filled by the user
-
- unsigned numSmileys; //Number of Smileys found, this parameter filled by SmileyAdd
- unsigned oflag; //One of the SAFL_ flags specifies content of the parse results
- //this parameter filled by SmileyAdd
- HANDLE hContact; //Contact handle
-} SMADD_BATCHPARSE2;
-
-typedef struct
-{
- unsigned startChar; //Starting smiley character
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- unsigned size; //Number of characters in smiley (0 if not found)
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- union {
- const TCHAR* filepath;
- const char* afilepath;
- const wchar_t* wfilepath;
- HICON hIcon; //User responsible for destroying icon handle
- };
-} SMADD_BATCHPARSERES;
-
-//find all smileys in text, API parses the provided text and returns all smileys found
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSE2*) &smgp; //pointer to SMADD_BATCHPARSE2
-//function returns pointer to array SMADD_BATCHPARSERES records for each smiley found
-//if no smileys found NULL is returned
-//if non NULL value returned pointer must be freed with MS_SMILEYADD_BATCHFREE API
-#define MS_SMILEYADD_BATCHPARSE "SmileyAdd/BatchParse"
-
-//Free memory allocated by MS_SMILEYADD_BATCHPARSE
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSERES*) &smgp; //pointer to SMADD_BATCHPARSERES
-#define MS_SMILEYADD_BATCHFREE "SmileyAdd/BatchFree"
-
-typedef struct
-{
- int cbSize; //size of the structure
- char* name; //smiley category name for reference
- char* dispname; //smiley category name for display
-} SMADD_REGCAT;
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_REGCAT*) &smgp; //pointer to SMADD_REGCAT
-#define MS_SMILEYADD_REGISTERCATEGORY "SmileyAdd/RegisterCategory"
diff --git a/plugins/MyDetails/sdk/m_statusplugins.h b/plugins/MyDetails/sdk/m_statusplugins.h
deleted file mode 100644
index 6a70f297ec..0000000000
--- a/plugins/MyDetails/sdk/m_statusplugins.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-#ifndef __M_STATUSPLUGINS
-#define __M_STATUSPLUGINS
-
-// -- common status -- (all three plugins)
-typedef struct {
- int cbSize;
- char *szName; // pointer to protocol modulename
- char *szMsg; // pointer to the status message (may be NULL)
- WORD status; // the status
- WORD lastStatus;// last status
-} PROTOCOLSETTINGEX;
-
-// wParam = PROTOCOLSETTINGEX*** (keep it like this for compatibility)
-// lParam = 0
-// returns 0 on success
-#define MS_CS_SETSTATUSEX "CommonStatus/SetStatusEx"
-
-// wParam = PROTOCOLSETTINGEX*** (keep it like this for compatibility)
-// lParam = timeout
-// returns hwnd
-#define MS_CS_SHOWCONFIRMDLGEX "CommonStatus/ShowConfirmDialogEx"
-
-// wParam = 0
-// lParam = 0
-// returns the number of protocols registerd
-#define MS_CS_GETPROTOCOUNT "CommonStatus/GetProtocolCount" // added dec '04
-
-// wParam = PROTOCOLSETTINGEX*** (keep it like this for compatibility)
-// lParam = 0
-#define ME_CS_STATUSCHANGEEX "CommonStatus/StatusChangeEx"
-
-// wParam = protoCount
-// lParam = 0
-#define ME_CS_CSMODULELOADED "CommonStatus/CommonStatusLoaded"
-
-// -- startup status --
-// wParam = profile number (set to -1 to get default profile)
-// lParam = PROTOCOLSETTINGEX*** (keep for... )(memory must be allocated protoCount*PROTOCOLSETTINGEX* and protoCount*PROTOCOLSETTINGEX)
-// szMsg member does not have to be freed
-// returns 0 on success
-#define MS_SS_GETPROFILE "StartupStatus/GetProfile" // don't use this > jan '05, internal use only
-
-// wParam = profile number
-// lParam = 0
-// return 0 on success
-#define MS_SS_LOADANDSETPROFILE "StartupStatus/LoadAndSetProfile" // you can use this
-
-// wParam = int*, maybe NULL sets this int to the default profile number
-// lParam = 0
-// returns profile count
-#define MS_SS_GETPROFILECOUNT "StartupStatus/GetProfileCount"
-
-// wParam = profile number
-// lParam = char* (must be allocated, size = 128)
-// returns 0 on success
-#define MS_SS_GETPROFILENAME "StartupStatus/GetProfileName"
-
-// -- AdvancedAutoAway --
-typedef enum {
- ACTIVE, // user is active
- STATUS1_SET, // first status change happened
- STATUS2_SET, // second status change happened
- SET_ORGSTATUS, // user was active again, original status will be restored
- STATUS1_SET2, // first status change happened, but user may be active ('on inactive only was disabled')
- STATUS2_SET2 // second status change happened, but user may be active ('on inactive only was disabled')
-} STATES;
-
-typedef struct {
- PROTOCOLSETTINGEX* protocolSetting;
- int originalStatusMode; // this is set only when going from ACTIVE to STATUS1_SET (or to STATUS2_SET)
- // (note: this is therefore not always valid)
- STATES
- oldState, // state before the call
- curState; // current state
- BOOL statusChanged; // the status of the protocol will actually be changed
- // (note: unlike the name suggests, the status is changed AFTER this hook is called)
-} AUTOAWAYSETTING;
-// wParam = 0;
-// lParam = AUTOAWAYSETTING*
-// Called when a protocol's state in AAA is changed this does NOT necessary means the status was changed
-// note: this hook is called for each protocol seperately
-#define ME_AAA_STATECHANGED "AdvancedAutoAway/StateChanged"
-
-// -- KeepStatus --
-#define KS_CONN_STATE_LOST 1 // lParam = protocol
-#define KS_CONN_STATE_OTHERLOCATION 2 // lParam = protocol
-#define KS_CONN_STATE_RETRY 3 // lParam = nth retry
-#define KS_CONN_STATE_STOPPEDCHECKING 4 // lParam = TRUE if success, FALSE if failed
-#define KS_CONN_STATE_LOGINERROR 5 // lParam = protocol, only if selected in options
-#define KS_CONN_STATE_RETRYNOCONN 6 // lParam = nth try, a connection attempt will not be made
-// wParam = one of above
-// lParam depends on wParam
-#define ME_KS_CONNECTIONEVENT "KeepStatus/ConnectionEvent"
-
-// wParam = 0
-// lParam = 0
-// returns 0 on succes, nonzero on failure, probably keepstatus wasn't reconnecting
-#define MS_KS_STOPRECONNECTING "KeepStatus/StopReconnecting"
-
-// wParam = TRUE to enable checking a protocol, FALSE to disable checking a protocol
-// lParam = protocol
-// return 0 on success, nonzero on failure, probably the protocol is 'hard' disabled or not found
-// note: you cannot enable a protocol that is disabled in the options screen, you can disable a protocol
-// if it's enabled in the option screen.
-#define MS_KS_ENABLEPROTOCOL "KeepStatus/EnableProtocol"
-
-// wParam = 0
-// lParam = protocol
-// returns TRUE if protocol is enabled for checked, FALSE otherwise
-#define MS_KS_ISPROTOCOLENABLED "KeepStatus/IsProtocolEnabled"
-
-// Indicate the status will be changed which will not be regarded as a connection failure.
-// wParam = 0
-// lParam = PROTOCOLSETTINGEX* of the new situation
-// returns 0
-#define MS_KS_ANNOUNCESTATUSCHANGE "KeepStatus/AnnounceStatusChange"
-
-__inline static int announce_status_change(char *szProto, int newstatus, char *szMsg) {
-
- PROTOCOLSETTINGEX ps;
-
- ZeroMemory(&ps, sizeof(PROTOCOLSETTINGEX));
- ps.cbSize = sizeof(PROTOCOLSETTINGEX);
- if (szProto != NULL) {
- ps.lastStatus = CallProtoService(szProto, PS_GETSTATUS, 0, 0);
- } else {
- ps.lastStatus = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
- }
- ps.status = newstatus;
- ps.szMsg = szMsg;
- ps.szName = szProto;
-
- return CallService(MS_KS_ANNOUNCESTATUSCHANGE, 0, (LPARAM)&ps);
-}
-
-#endif // __M_STATUSPLUGINS
diff --git a/plugins/MyDetails/sdk/m_updater.h b/plugins/MyDetails/sdk/m_updater.h
deleted file mode 100644
index 371b7437a0..0000000000
--- a/plugins/MyDetails/sdk/m_updater.h
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// NOTES:
-// - For langpack updates, include a string of the following format in the langpack text file:
-// ";FLID: <file listing name> <version>"
-// version must be four numbers seperated by '.', in the range 0-255 inclusive
-// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
-// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
-// to install an ini file to make the plugin activate when miranda restarts after the update
-// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
-// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
-// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
-// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
-// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
-// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
-// to install additional dlls etc that a plugin may require)
-
-// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
-// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (note that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pointed to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with Updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-
-// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
-// NOTE: the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
-// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/plugins/MyDetails/sdk/m_variables.h b/plugins/MyDetails/sdk/m_variables.h
deleted file mode 100644
index 152994dbbc..0000000000
--- a/plugins/MyDetails/sdk/m_variables.h
+++ /dev/null
@@ -1,668 +0,0 @@
-/*
- Variables Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#ifndef __M_VARS
-#define __M_VARS
-
-#if !defined(_TCHAR_DEFINED)
-#include <tchar.h>
-#endif
-
-#ifndef VARIABLES_NOHELPER
-#include <m_button.h>
-#endif
-
-// --------------------------------------------------------------------------
-// Memory management
-// --------------------------------------------------------------------------
-
-// Release memory that was allocated by the Variables plugin, e.g. returned
-// strings.
-
-#define MS_VARS_FREEMEMORY "Vars/FreeMemory"
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(void *)pntr
-// Pointer to memory that was allocated by the Variables plugin (e.g. a
-// returned string) (can be NULL).
-// lParam = 0
-
-// Return Value:
-// ------------------------
-// Does return 0 on success, nozero otherwise.
-
-// Note: Do only use this service to free memory that was *explicitliy*
-// stated that it should be free with this service.
-
-
-
-#define MS_VARS_GET_MMI "Vars/GetMMI"
-
-// Get Variable's RTL/CRT function poiners to malloc(), free() and
-// realloc().
-
-// Parameters:
-// ------------------------
-// wParam = 0
-// lParam = (LPARAM) &MM_INTERFACE
-// Pointer to a memory manager interface struct (see m_system.h).
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nozero otherwise
-
-// Note: Works exactly the same as the MS_SYSTEM_GET_MMI service
-// service of m_system.h.
-
-// Helper function for easy using:
-#ifndef VARIABLES_NOHELPER
-__inline static void variables_free(void *pntr) {
-
- CallService(MS_VARS_FREEMEMORY, (WPARAM)pntr, 0);
-}
-#endif
-
-
-
-// --------------------------------------------------------------------------
-// String formatting
-// --------------------------------------------------------------------------
-
-#define MS_VARS_FORMATSTRING "Vars/FormatString"
-
-// This service can be used to parse tokens in a text. The tokens will be
-// replaced by their resolved values. A token can either be a field or a
-// function. A field takes no arguments and is represented between
-// %-characters, e.g. "%winampsong%". A function can take any number of
-// arguments and is represented by a ? or !-character followed by the name
-// of the function and a list of arguments, e.g. "?add(1,2)".
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(FORMATINFO *)&fi
-// See below.
-// lParam = 0
-
-// Return Value:
-// ------------------------
-// Returns a pointer to the resolved string or NULL in case of an error.
-
-// Note: The returned pointer needs to be freed using MS_VARS_FREEMEMORY.
-
-typedef struct {
- int cbSize; // Set this to sizeof(FORMATINFO).
- int flags; // Flags to use (see FIF_* below).
- union {
- char *szFormat; // Text in which the tokens will be replaced (can't be
- // NULL).
- WCHAR *wszFormat;
- TCHAR *tszFormat;
- };
- union {
- char *szExtraText; // Extra, context-specific string (can be NULL) ->
- // The field "extratext" will be replaced by this
- // string. (Previously szSource).
- WCHAR *wszExtraText;
- TCHAR *tszExtraText;
- };
- HANDLE hContact; // Handle to contact (can be NULL) -> The field "subject"
- // represents this contact.
- int pCount; // (output) Number of succesful parsed tokens, needs to be set
- // to 0 before the call
- int eCount; // (output) Number of failed tokens, needs to be set to 0
- // before the call
-} FORMATINFO;
-
-// Possible flags:
-#define FIF_UNICODE 0x01 // Expects and returns unicode text (WCHAR*).
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define FIF_TCHAR FIF_UNICODE // Strings in structure are TCHAR*.
-#else
-#define FIF_TCHAR 0
-#endif
-
-// Helper functions for easy using:
-
-// Helper #1: variables_parse
-// ------------------------
-// The returned string needs to be freed using MS_VARS_FREEMEMORY.
-
-#ifndef VARIABLES_NOHELPER
-__inline static TCHAR *variables_parse(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact) {
-
- FORMATINFO fi;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = tszFormat;
- fi.tszExtraText = tszExtraText;
- fi.hContact = hContact;
- fi.flags = FIF_TCHAR;
-
- return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
-}
-#endif
-
-// Helper #2: variables_parsedup
-// ------------------------
-// Returns a _strdup()'ed copy of the unparsed string when Variables is not
-// installed, returns a strdup()'ed copy of the parsed result otherwise.
-
-// Note: The returned pointer needs to be released using your own free().
-
-#ifndef VARIABLES_NOHELPER
-__inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact) {
-
- if (ServiceExists(MS_VARS_FORMATSTRING)) {
- FORMATINFO fi;
- TCHAR *tszParsed, *tszResult;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = tszFormat;
- fi.tszExtraText = tszExtraText;
- fi.hContact = hContact;
- fi.flags |= FIF_TCHAR;
- tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
- if (tszParsed) {
- tszResult = _tcsdup(tszParsed);
- CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0);
- return tszResult;
- }
- }
- return tszFormat?_tcsdup(tszFormat):tszFormat;
-}
-#endif
-
-
-
-// --------------------------------------------------------------------------
-// Register tokens
-// --------------------------------------------------------------------------
-
-// Plugins can define tokens which will be parsed by the Variables plugin.
-
-#define MS_VARS_REGISTERTOKEN "Vars/RegisterToken"
-
-// With this service you can define your own token. The newly added tokens
-// using this service are taken into account on every call to
-// MS_VARS_FORMATSTRING.
-
-// Parameters:
-// ------------------------
-// wParam = 0
-// lParam = (LPARAM)(TOKENREGISTER*)&tr
-// See below.
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nonzero otherwise. Existing tokens will be
-// 'overwritten' if registered twice.
-
-// Needed for szService and parseFunction:
-typedef struct {
- int cbSize; // You need to check if this is >=sizeof(ARGUMENTSINFO)
- // (already filled in).
- FORMATINFO *fi; // Arguments passed to MS_VARS_FORMATSTRING.
- unsigned int argc; // Number of elements in the argv array.
- union {
- char **argv; // Argv[0] will be the token name, the following elements
- // are the additional arguments.
- WCHAR **wargv; // If the registered token was registered as a unicode
- // token, wargv should be accessed.
- TCHAR **targv;
- };
- int flags; // (output) You can set flags here (initially 0), use the
- // AIF_* flags (see below).
-} ARGUMENTSINFO;
-
-// Available flags for ARGUMENTSINFO:
-// Set the flags of the ARGUMENTSINFO struct to any of these to influence
-// further parsing.
-#define AIF_DONTPARSE 0x01 // Don't parse the result of this function,
- // usually the result of a token is parsed
- // again, if the `?` is used as a function
- // character.
-#define AIF_FALSE 0x02 // The function returned logical false.
-
-// Definition of parse/cleanup functions:
-typedef char* (*VARPARSEFUNCA)(ARGUMENTSINFO *ai);
-typedef WCHAR* (*VARPARSEFUNCW)(ARGUMENTSINFO *ai);
-typedef void (*VARCLEANUPFUNCA)(char *szReturn);
-typedef void (*VARCLEANUPFUNCW)(WCHAR *wszReturn);
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define VARPARSEFUNC VARPARSEFUNCW
-#define VARCLEANUPFUNC VARCLEANUPFUNCW
-#else
-#define VARPARSEFUNC VARPARSEFUNCA
-#define VARCLEANUPFUNC VARCLEANUPFUNCA
-#endif
-
-typedef struct {
- int cbSize; // Set this to sizeof(TOKENREGISTER).
- union {
- char *szTokenString; // Name of the new token to be created, without %,
- // ?, ! etc. signs (can't be NULL).
- WCHAR *wszTokenString;
- TCHAR *tszTokenString;
- };
- union {
- char *szService; // Name of a service that is used to request the
- // token's value, if no service is used, a function
- // and TRF_PARSEFUNC must be used.
- VARPARSEFUNCA parseFunction; // See above, use with TRF_PARSEFUNC.
- VARPARSEFUNCW parseFunctionW;
- VARPARSEFUNC parseFunctionT;
- };
- union {
- char *szCleanupService; // Name of a service to be called when the
- // memory allocated in szService can be freed
- // (only used when flag VRF_CLEANUP is set,
- // else set this to NULL).
- VARCLEANUPFUNCA cleanupFunction; // See above, use with TRF_CLEANUPFUNC.
- VARCLEANUPFUNCW cleanupFunctionW;
- VARCLEANUPFUNC cleanupFunctionT;
- };
- char *szHelpText; // Help info shown in help dialog (can be NULL). Has to
- // be in the following format:
- // "subject\targuments\tdescription"
- // (Example: "math\t(x, y ,...)\tx + y + ..."), or:
- // "subject\tdescription"
- // (Example: "miranda\tPath to the Miranda-IM
- // executable").
- // Note: subject and description are translated by
- // Variables.
- int memType; // Describes which method Varibale's plugin needs to use to
- // free the returned buffer, use one of the VR_MEM_* values
- // (see below). Only valid if the flag VRF_FREEMEM is set,
- // use TR_MEM_OWNER otherwise).
- int flags; // Flags to use (see below), one of TRF_* (see below).
-} TOKENREGISTER;
-
-// Available Memory Storage Types:
-// These values describe which method Variables Plugin will use to free the
-// buffer returned by the parse function or service
-#define TR_MEM_VARIABLES 1 // Memory is allocated using the functions
- // retrieved by MS_VARS_GET_MMI.
-#define TR_MEM_MIRANDA 2 // Memory is allocated using Miranda's Memory
- // Manager Interface (using the functions
- // returned by MS_SYSTEM_GET_MMI), if
- // VRF_FREEMEM is set, the memory will be
- // freed by Variables.
-#define TR_MEM_OWNER 3 // Memory is owned by the calling plugin
- // (can't be freed by Variables Plugin
- // automatically). This should be used if
- // VRF_FREEMEM is not specified in the flags.
-
-// Available Flags for TOKENREGISTER:
-#define TRF_FREEMEM 0x01 // Variables Plugin will automatically free the
- // pointer returned by the parse function or
- // service (which method it will us is
- // specified in memType -> see above).
-#define TRF_CLEANUP 0x02 // Call cleanup service or function, notifying
- // that the returned buffer can be freed.
- // Normally you should use either TRF_FREEMEM
- // or TRF_CLEANUP.
-#define TRF_PARSEFUNC 0x40 // parseFunction will be used instead of a
- // service.
-#define TRF_CLEANUPFUNC 0x80 // cleanupFunction will be used instead of a
- // service.
-#define TRF_USEFUNCS TRF_PARSEFUNC|TRF_CLEANUPFUNC
-#define TRF_UNPARSEDARGS 0x04 // Provide the arguments for the parse
- // function in their raw (unparsed) form.
- // By default, arguments are parsed before
- // presenting them to the parse function.
-#define TRF_FIELD 0x08 // The token can be used as a %field%.
-#define TRF_FUNCTION 0x10 // The token can be used as a ?function().
- // Normally you should use either TRF_FIELD or
- // TRF_FUNCTION.
-#define TRF_UNICODE 0x20 // Strings in structure are unicode (WCHAR*).
- // In this case, the strings pointing to the
- // arguments in the ARGUMENTS struct are
- // unicode also. The returned buffer is
- // expected to be unicode also, and the
- // unicode parse and cleanup functions are
- // called.
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define TRF_TCHAR TRF_UNICODE // Strings in structure are TCHAR*.
-#else
-#define TRF_TCHAR 0
-#endif
-
-// Deprecated:
-#define TRF_CALLSVC TRF_CLEANUP
-
-// Callback Service (szService) / parseFunction:
-// ------------------------
-// Service that is called automatically by the Variable's Plugin to resolve a
-// registered variable.
-
-// Parameters:
-// wParam = 0
-// lParam = (LPARAM)(ARGUMENTSINFO *)&ai
-// see above
-
-// Return Value:
-// Needs to return the pointer to a dynamically allocacated string or NULL.
-// A return value of NULL is regarded as an error (eCount will be increaded).
-// Flags in the ARGUMENTSINFO struct can be set (see above).
-
-// Callback Service (szCallbackService) / cleanupFunction:
-// ------------------------
-// This service is called when the memory that was allocated by the parse
-// function or service can be freed. Note: It will only be called when the
-// flag VRF_CLEANUP of TOKENREGISTER is set.
-
-// Parameters:
-// wParam = 0
-// lParam = (LPARAM)(char *)&res
-// Result from parse function or service (pointer to a string).
-
-// Return Value:
-// Should return 0 on success.
-
-
-
-// --------------------------------------------------------------------------
-// Show the help dialog
-// --------------------------------------------------------------------------
-
-// Plugins can invoke Variables' help dialog which can be used for easy input
-// by users.
-
-#define MS_VARS_SHOWHELPEX "Vars/ShowHelpEx"
-
-// This service can be used to open the help dialog of Variables. This dialog
-// provides easy input for the user and/or information about the available
-// tokens.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(HWND)hwndParent
-// lParam = (LPARAM)(VARHELPINFO)&vhi
-// See below.
-
-// Return Value:
-// ------------------------
-// Returns 0 on succes, any other value on error.
-
-typedef struct {
- int cbSize; // Set to sizeof(VARHELPINFO).
- FORMATINFO *fi; // Used for both input and output. If this pointer is not
- // NULL, the information is used as the initial values for
- // the dialog.
- HWND hwndCtrl; // Used for both input and output. The window text of this
- // window will be read and used as the initial input of the
- // input dialog. If the user presses the OK button the window
- // text of this window will be set to the text of the input
- // field and a EN_CHANGE message via WM_COMMAND is send to
- // this window. (Can be NULL).
- char *szSubjectDesc; // The description of the %subject% token will be set
- // to this text, if not NULL. This is translated
- // automatically.
- char *szExtraTextDesc; // The description of the %extratext% token will be
- // set to this text, if not NULL. This is translated
- // automatically.
- int flags; // Flags, see below.
-} VARHELPINFO;
-
-
-// Flags for VARHELPINFO
-#define VHF_TOKENS 0x00000001 // Create a dialog with the list of
- // tokens
-#define VHF_INPUT 0x00000002 // Create a dialog with an input
- // field (this contains the list of
- // tokens as well).
-#define VHF_SUBJECT 0x00000004 // Create a dialog to select a
- // contact for the %subject% token.
-#define VHF_EXTRATEXT 0x00000008 // Create a dialog to enter a text
- // for the %extratext% token.
-#define VHF_HELP 0x00000010 // Create a dialog with help info.
-#define VHF_HIDESUBJECTTOKEN 0x00000020 // Hide the %subject% token in the
- // list of tokens.
-#define VHF_HIDEEXTRATEXTTOKEN 0x00000040 // Hide the %extratext% token in
- // the list of tokens.
-#define VHF_DONTFILLSTRUCT 0x00000080 // Don't fill the struct with the
- // new information if OK is pressed
-#define VHF_FULLFILLSTRUCT 0x00000100 // Fill all members of the struct
- // when OK is pressed. By default
- // only szFormat is set. With this
- // flag on, hContact and
- // szExtraText are also set.
-#define VHF_SETLASTSUBJECT 0x00000200 // Set the last contact that was
- // used in the %subject% dialog in
- // case fi.hContact is NULL.
-
-// Predefined flags
-#define VHF_FULLDLG VHF_INPUT|VHF_SUBJECT|VHF_EXTRATEXT|VHF_HELP
-#define VHF_SIMPLEDLG VHF_INPUT|VHF_HELP
-#define VHF_NOINPUTDLG VHF_TOKENS|VHF_HELP
-
-// If the service fills information in the struct for szFormat or szExtraText,
-// these members must be free'd using the free function of Variables.
-// If wParam==NULL, the dialog is created modeless. Only one dialog can be
-// shown at the time.
-// If both hwndCtrl and fi are NULL, the user input will not be retrievable.
-// In this case, the dialog is created with only a "Close" button, instead of
-// the "OK" and "Cancel" buttons.
-// In case of modeless dialog and fi != NULL, please make sure this pointer
-// stays valid while the dialog is open.
-
-// Helper function for easy use in standard case:
-#ifndef VARIABLES_NOHELPER
-__inline static int variables_showhelp(HWND hwndDlg, UINT uIDEdit, int flags, char *szSubjectDesc, char *szExtraDesc) {
-
- VARHELPINFO vhi;
-
- ZeroMemory(&vhi, sizeof(VARHELPINFO));
- vhi.cbSize = sizeof(VARHELPINFO);
- if (flags == 0) {
- flags = VHF_SIMPLEDLG;
- }
- vhi.flags = flags;
- vhi.hwndCtrl = GetDlgItem(hwndDlg, uIDEdit);
- vhi.szSubjectDesc = szSubjectDesc;
- vhi.szExtraTextDesc = szExtraDesc;
-
- return CallService(MS_VARS_SHOWHELPEX, (WPARAM)hwndDlg, (LPARAM)&vhi);
-}
-#endif
-
-
-#define MS_VARS_GETSKINITEM "Vars/GetSkinItem"
-
-// This service can be used to get the icon you can use for example on the
-// Variables help button in your options screen. You can also get the tooltip
-// text to use with such a button. If icon library is available the icon will
-// be retrieved from icon library manager, otherwise the default is returned.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)VSI_* (see below)
-
-// Return Value:
-// ------------------------
-// Depends on the information to retrieve (see below).
-
-// VSI_ constants
-#define VSI_HELPICON 1 // Can be used on the button accessing the
- // Variables help dialog. Returns (HICON)hIcon on
- // success or NULL on failure;
-#define VSI_HELPTIPTEXT 2 // Returns the tooltip text you can use for the
- // help button. Returns (char *)szTipText, a
- // static, translated buffer containing the help
- // text or NULL on error.
-
-// Helper to set the icon on a button accessing the help dialog.
-// Preferably a 16x14 MButtonClass control, but it works on a standard
-// button control as well. If no icon is availble (because of old version of
-// Variables) the string "V" is shown on the button. If Variables is not
-// available, the button will be hidden.
-#ifndef VARIABLES_NOHELPER
-__inline static int variables_skin_helpbutton(HWND hwndDlg, UINT uIDButton) {
-
- int res;
- HICON hIcon;
- TCHAR tszClass[32];
-
- hIcon = NULL;
- res = 0;
- if (ServiceExists(MS_VARS_GETSKINITEM)) {
- hIcon = (HICON)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPICON);
- }
- GetClassName(GetDlgItem(hwndDlg, uIDButton), tszClass, sizeof(tszClass));
- if (!_tcscmp(tszClass, _T("Button"))) {
- if (hIcon != NULL) {
- SetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)|BS_ICON);
- SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
- }
- else {
- SetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)&~BS_ICON);
- SetDlgItemText(hwndDlg, uIDButton, _T("V"));
- }
- }
- else if (!_tcscmp(tszClass, MIRANDABUTTONCLASS)) {
- if (hIcon != NULL) {
- char *szTipInfo;
-
- SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
- if (ServiceExists(MS_VARS_GETSKINITEM)) {
- szTipInfo = (char *)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPTIPTEXT);
- }
- if (szTipInfo == NULL) {
- szTipInfo = Translate("Open String Formatting Help");
- }
- SendMessage(GetDlgItem(hwndDlg, uIDButton), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
- SendDlgItemMessage(hwndDlg, uIDButton, BUTTONSETASFLATBTN, 0, 0);
- }
- else {
- SetDlgItemText(hwndDlg, uIDButton, _T("V"));
- }
- }
- else {
- res = -1;
- }
- ShowWindow(GetDlgItem(hwndDlg, uIDButton), ServiceExists(MS_VARS_FORMATSTRING));
-
- return res;
-}
-#endif
-
-
-#define MS_VARS_SHOWHELP "Vars/ShowHelp"
-
-// WARNING: This service is obsolete, please use MS_VARS_SHOWHELPEX
-
-// Shows a help dialog where all possible tokens are displayed. The tokens
-// are explained on the dialog, too. The user can edit the initial string and
-// insert as many tokens as he likes.
-
-// Parameters:
-// ------------------------
-// wParam = (HWND)hwndEdit
-// Handle to an edit control in which the modified string
-// should be inserted (When the user clicks OK in the dialog the edited
-// string will be set to hwndEdit) (can be NULL).
-// lParam = (char *)pszInitialString
-// String that the user is provided with initially when
-// the dialog gets opened (If this is NULL then the current text in the
-// hwndEdit edit control will be used) (can be NULL).
-
-// Return Value:
-// ------------------------
-// Returns the handle to the help dialog (HWND).
-
-// Note: Only one help dialog can be opened at a time. When the dialog gets
-// closed an EN_CHANGE of the edit controll will be triggered because the
-// contents were updated. (Only when user selected OK).
-
-// Example:
-// CallService(MS_VARS_SHOWHELP, (WPARAM)hwndEdit, (LPARAM)"some initial text");
-
-// --------------------------------------------------------------------------
-// Retrieve a contact's HANDLE given a string
-// --------------------------------------------------------------------------
-
-#define MS_VARS_GETCONTACTFROMSTRING "Vars/GetContactFromString"
-
-// Searching for contacts in the database. You can find contacts in db by
-// searching for their name, e.g first name.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(CONTACTSINFO *)&ci
-// See below.
-// lParam = 0
-
-// Return Value:
-// ------------------------
-// Returns number of contacts found matching the given string representation.
-// The hContacts array of CONTACTSINFO struct contains these hContacts after
-// the call.
-
-// Note: The hContacts array needs to be freed after use using
-// MS_VARS_FREEMEMORY.
-
-typedef struct {
- int cbSize; // Set this to sizeof(CONTACTSINFO).
- union {
- char *szContact; // String to search for, e.g. last name (can't be NULL).
- WCHAR * wszContact;
- TCHAR *tszContact;
- };
- HANDLE *hContacts; // (output) Array of contacts found.
- DWORD flags; // Contact details that will be matched with the search
- // string (flags can be combined).
-} CONTACTSINFO;
-
-// Possible flags:
-#define CI_PROTOID 0x00000001 // The contact in the string is encoded
- // in the format <PROTOID:UNIQUEID>, e.g.
- // <ICQ:12345678>.
-#define CI_NICK 0x00000002 // Search nick names.
-#define CI_LISTNAME 0x00000004 // Search custom names shown in contact
- // list.
-#define CI_FIRSTNAME 0x00000008 // Search contact's first names (contact
- // details).
-#define CI_LASTNAME 0x00000010 // Search contact's last names (contact
- // details).
-#define CI_EMAIL 0x00000020 // Search contact's email adresses
- // (contact details).
-#define CI_UNIQUEID 0x00000040 // Search unique ids of the contac, e.g.
- // UIN.
-#define CI_CNFINFO 0x40000000 // Searches one of the CNF_* flags (set
- // flags to CI_CNFINFO|CNF_X), only one
- // CNF_ type possible
-#define CI_UNICODE 0x80000000 // tszContact is a unicode string
- // (WCHAR*).
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define CI_TCHAR CI_UNICODE // Strings in structure are TCHAR*.
-#else
-#define CI_TCHAR 0
-#endif
-
-
-
-#endif //__M_VARS