summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic/src/skypesvc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-10-04 19:36:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-10-04 19:36:13 +0000
commita299d595faec8835b18a41bbba38d27d3227882b (patch)
tree6fb4a45ab336be7d00ad0d5c278057813aa1fe46 /protocols/SkypeClassic/src/skypesvc.cpp
parent3f6232a496649a70ee5d2e1027072723d4171948 (diff)
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@10692 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic/src/skypesvc.cpp')
-rw-r--r--protocols/SkypeClassic/src/skypesvc.cpp105
1 files changed, 45 insertions, 60 deletions
diff --git a/protocols/SkypeClassic/src/skypesvc.cpp b/protocols/SkypeClassic/src/skypesvc.cpp
index 4bf0de30ff..11ad13d1fe 100644
--- a/protocols/SkypeClassic/src/skypesvc.cpp
+++ b/protocols/SkypeClassic/src/skypesvc.cpp
@@ -13,9 +13,6 @@ SKYPE_SVCNAMES g_svcNames;
extern char protocol, g_szProtoName[];
extern HINSTANCE hInst;
extern DWORD mirandaVersion;
-static HANDLE m_hPrebuildCMenu=NULL, m_hStatusHookContact=NULL, m_hContactDeleted=NULL,
- m_hHookModulesLoaded=NULL, m_hHookOkToExit=NULL, m_hOptHook=NULL, m_hHookMirandaExit=NULL,
- m_hTTBModuleLoadedHook = NULL, m_hHookOnUserInfoInit = NULL;
void CreateProtoService(const char* szService, MIRANDASERVICE svc)
{
@@ -83,78 +80,65 @@ void CreateServices(void)
void HookEvents(void)
{
- m_hPrebuildCMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
//HookEvent(ME_CLIST_DOUBLECLICKED, ClistDblClick);
- m_hOptHook = HookEvent(ME_OPT_INITIALISE, RegisterOptions);
- m_hStatusHookContact = HookEvent(ME_DB_CONTACT_ADDED,HookContactAdded);
- m_hContactDeleted = HookEvent( ME_DB_CONTACT_DELETED, HookContactDeleted );
- m_hHookModulesLoaded = HookEvent( ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- m_hHookMirandaExit = HookEvent(ME_SYSTEM_OKTOEXIT, MirandaExit);
- m_hHookOkToExit = HookEvent(ME_SYSTEM_PRESHUTDOWN, OkToExit);
+ HookEvent(ME_OPT_INITIALISE, RegisterOptions);
+ HookEvent(ME_DB_CONTACT_ADDED,HookContactAdded);
+ HookEvent( ME_DB_CONTACT_DELETED, HookContactDeleted );
+ HookEvent( ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent(ME_SYSTEM_OKTOEXIT, MirandaExit);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, OkToExit);
}
void HookEventsLoaded(void)
{
// We cannot check for the TTB-service before this event gets fired... :-/
- m_hTTBModuleLoadedHook = HookEvent(ME_TTB_MODULELOADED, CreateTopToolbarButton);
- m_hHookOnUserInfoInit = HookEvent( ME_USERINFO_INITIALISE, OnDetailsInit );
+ HookEvent(ME_TTB_MODULELOADED, CreateTopToolbarButton);
+ HookEvent( ME_USERINFO_INITIALISE, OnDetailsInit );
}
-void UnhookEvents(void)
+INT_PTR SkypeGetCaps(WPARAM wParam, LPARAM lParam)
{
- UnhookEvent(m_hOptHook);
- UnhookEvent(m_hTTBModuleLoadedHook);
- UnhookEvent(m_hHookOnUserInfoInit);
- UnhookEvent(m_hStatusHookContact);
- UnhookEvent(m_hContactDeleted);
- UnhookEvent(m_hHookModulesLoaded);
- UnhookEvent(m_hPrebuildCMenu);
- UnhookEvent(m_hHookOkToExit);
- UnhookEvent(m_hHookMirandaExit);
- //UnhookEvent(ClistDblClick);
-}
-
-INT_PTR SkypeGetCaps(WPARAM wParam, LPARAM lParam) {
- int ret = 0;
+ int ret = 0;
UNREFERENCED_PARAMETER(lParam);
- switch (wParam) {
- case PFLAGNUM_1:
- ret = PF1_BASICSEARCH | PF1_IM | PF1_MODEMSG; // | PF1_AUTHREQ;
- if (protocol>=5) ret |= PF1_ADDSEARCHRES;
- break;
+ switch (wParam) {
+ case PFLAGNUM_1:
+ ret = PF1_BASICSEARCH | PF1_IM | PF1_MODEMSG; // | PF1_AUTHREQ;
+ if (protocol>=5) ret |= PF1_ADDSEARCHRES;
+ break;
- case PFLAGNUM_2:
- ret = PF2_ONLINE | PF2_SHORTAWAY | PF2_INVISIBLE | PF2_HEAVYDND;
+ case PFLAGNUM_2:
+ ret = PF2_ONLINE | PF2_SHORTAWAY | PF2_INVISIBLE | PF2_HEAVYDND;
#ifdef MAPDND
- ret |= PF2_LIGHTDND | PF2_HEAVYDND;
+ ret |= PF2_LIGHTDND | PF2_HEAVYDND;
#endif
- if (!db_get_b(NULL, SKYPE_PROTONAME, "NoSkype3Stats", 0))
- ret |= PF2_LONGAWAY | PF2_FREECHAT;
- ret |= Proto_Status2Flag(db_get_dw(NULL, SKYPE_PROTONAME, "SkypeOutStatusMode", ID_STATUS_ONTHEPHONE));
- break;
-
- case PFLAGNUM_3:
- ret = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE | PF2_IDLE;
- break;
-
- case PFLAGNUM_4:
- ret = PF4_FORCEAUTH | PF4_FORCEADDED | PF4_AVATARS | PF4_SUPPORTTYPING /* Not really, but libgaim compat. */;
- if (mirandaVersion >= 0x070000) ret |= PF4_IMSENDUTF;
- break;
- case PFLAGNUM_5:
- ret = Proto_Status2Flag(db_get_dw(NULL, SKYPE_PROTONAME, "SkypeOutStatusMode", ID_STATUS_ONTHEPHONE));
- break;
- case PFLAG_UNIQUEIDTEXT:
- ret = (INT_PTR)Translate("Skype ID");
- break;
- case PFLAG_UNIQUEIDSETTING:
- ret = (INT_PTR) SKYPE_NAME;
- break;
- }
- return ret;
+ if (!db_get_b(NULL, SKYPE_PROTONAME, "NoSkype3Stats", 0))
+ ret |= PF2_LONGAWAY | PF2_FREECHAT;
+ ret |= Proto_Status2Flag(db_get_dw(NULL, SKYPE_PROTONAME, "SkypeOutStatusMode", ID_STATUS_ONTHEPHONE));
+ break;
+
+ case PFLAGNUM_3:
+ ret = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE | PF2_IDLE;
+ break;
+
+ case PFLAGNUM_4:
+ ret = PF4_FORCEAUTH | PF4_FORCEADDED | PF4_AVATARS | PF4_SUPPORTTYPING /* Not really, but libgaim compat. */;
+ if (mirandaVersion >= 0x070000) ret |= PF4_IMSENDUTF;
+ break;
+ case PFLAGNUM_5:
+ ret = Proto_Status2Flag(db_get_dw(NULL, SKYPE_PROTONAME, "SkypeOutStatusMode", ID_STATUS_ONTHEPHONE));
+ break;
+ case PFLAG_UNIQUEIDTEXT:
+ ret = (INT_PTR)Translate("Skype ID");
+ break;
+ case PFLAG_UNIQUEIDSETTING:
+ ret = (INT_PTR) SKYPE_NAME;
+ break;
+ }
+ return ret;
}
INT_PTR SkypeGetName(WPARAM wParam, LPARAM lParam)
@@ -182,7 +166,8 @@ INT_PTR SkypeLoadIcon(WPARAM wParam,LPARAM lParam)
}
INT_PTR SkypeGetAvatar(WPARAM wParam,LPARAM lParam)
-{ DBVARIANT dbv;
+{
+ DBVARIANT dbv;
if (!db_get_s(NULL,SKYPE_PROTONAME, "AvatarFile", &dbv)){
lstrcpynA((char*)wParam, dbv.pszVal, (int)lParam);
db_free(&dbv);