diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-27 20:50:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-27 20:50:07 +0000 |
commit | 13c033c257f6c083b0c46b4fa28601db5a0b6335 (patch) | |
tree | cb6c2d292df718d1cddd885ad1029a0b81f1b7e4 /plugins/New_GPG/src/metacontacts.cpp | |
parent | 367e673a5a3d4d49b2ef1bfbf57a1a5828a2d174 (diff) |
MS_MC_GETMETACONTACT => db_mc_getMeta
git-svn-id: http://svn.miranda-ng.org/main/trunk@8317 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/metacontacts.cpp')
-rw-r--r-- | plugins/New_GPG/src/metacontacts.cpp | 46 |
1 files changed, 13 insertions, 33 deletions
diff --git a/plugins/New_GPG/src/metacontacts.cpp b/plugins/New_GPG/src/metacontacts.cpp index 876071191a..9896393cbc 100644 --- a/plugins/New_GPG/src/metacontacts.cpp +++ b/plugins/New_GPG/src/metacontacts.cpp @@ -16,67 +16,47 @@ #include "commonheaders.h"
-extern bool bMetaContacts;
-
bool metaIsProtoMetaContacts(MCONTACT hContact)
{
- if(bMetaContacts) {
- LPSTR proto = GetContactProto(hContact);
- if( proto && strcmp(proto,"MetaContacts")==0 ) {
- return true;
- }
- }
+ LPSTR proto = GetContactProto(hContact);
+ if(proto && strcmp(proto,"MetaContacts") == 0)
+ return true;
+
return false;
}
bool metaIsDefaultSubContact(MCONTACT hContact)
{
- if(bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,hContact,0),0)==hContact;
- return false;
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, db_mc_getMeta(hContact), 0) == hContact;
}
MCONTACT metaGetContact(MCONTACT hContact)
{
- if(bMetaContacts)
- if(metaIsSubcontact(hContact))
- return (MCONTACT)CallService(MS_MC_GETMETACONTACT,hContact,0);
+ if(db_mc_isSub(hContact))
+ return db_mc_getMeta(hContact);
return NULL;
}
-bool metaIsSubcontact(MCONTACT hContact)
-{
- if(bMetaContacts)
- return CallService(MS_MC_GETMETACONTACT,hContact,0) != 0;
- return false;
-}
-
MCONTACT metaGetMostOnline(MCONTACT hContact)
{
- if(bMetaContacts)
- if(metaIsProtoMetaContacts(hContact))
- return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,hContact,0);
+ if(metaIsProtoMetaContacts(hContact))
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,hContact,0);
return NULL;
}
MCONTACT metaGetDefault(MCONTACT hContact)
{
- if(bMetaContacts)
- if(metaIsProtoMetaContacts(hContact))
- return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,hContact,0);
+ if(metaIsProtoMetaContacts(hContact))
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,hContact,0);
return NULL;
}
DWORD metaGetContactsNum(MCONTACT hContact)
{
- if(bMetaContacts)
- return CallService(MS_MC_GETNUMCONTACTS, hContact, 0);
- return 0;
+ return CallService(MS_MC_GETNUMCONTACTS, hContact, 0);
}
MCONTACT metaGetSubcontact(MCONTACT hContact, int num)
{
- if(bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, (LPARAM)num);
- return 0;
+ return (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, (LPARAM)num);
}
|