summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/mir_db.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 14:24:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 14:24:12 +0000
commit83310365c69bd40365ee0ae0e16c99c28e24cd0b (patch)
tree10ac18bfdc3fcf0fd62a5aba3ccb5dedffa2e410 /plugins/UserInfoEx/src/mir_db.cpp
parentd68cd04d6f7b997692476b531bdc30f546a50efd (diff)
- all static protocol services replaced with functions;
- m_protomod.h removed as useless git-svn-id: http://svn.miranda-ng.org/main/trunk@14260 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/mir_db.cpp')
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index e54be73d85..17fd80aa2e 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -30,22 +30,6 @@ namespace DB {
namespace Contact {
/**
-* This function is used to retrieve a contact's basic protocol
-* @param hContact - handle to the contact
-* @return This function returns the basic protocol of a contact.
-**/
-
-LPSTR Proto(MCONTACT hContact)
-{
- if (hContact) {
- INT_PTR result;
- result = CallService(MS_PROTO_GETCONTACTBASEACCOUNT, hContact, NULL);
- return (LPSTR) ((result == CALLSERVICE_NOTFOUND) ? NULL : result);
- }
- return NULL;
-}
-
-/**
* Gets the number of contacts in the database, which does not count the user
* @param hContact - handle to the contact
* @return Returns the number of contacts. They can be retrieved using
@@ -262,7 +246,7 @@ BYTE GetEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetti
if (def > -1 && def < INT_MAX) {
hSubContact = db_mc_getSub(hContact, def);
if (hSubContact != NULL)
- result = DB::Setting::GetEx(hSubContact, pszModule, DB::Contact::Proto(hSubContact), pszSetting, dbv, destType) != 0;
+ result = DB::Setting::GetEx(hSubContact, pszModule, Proto_GetBaseAccountName(hSubContact), pszSetting, dbv, destType) != 0;
}
// scan all subcontacts for the setting
if (result) {
@@ -273,7 +257,7 @@ BYTE GetEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetti
if (i != def) {
hSubContact = db_mc_getSub(hContact, i);
if (hSubContact != NULL)
- result = DB::Setting::GetEx(hSubContact, pszModule, DB::Contact::Proto(hSubContact), pszSetting, dbv, destType) != 0;
+ result = DB::Setting::GetEx(hSubContact, pszModule, Proto_GetBaseAccountName(hSubContact), pszSetting, dbv, destType) != 0;
} } } } } }
return result;
@@ -317,7 +301,7 @@ WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR ps
if (def > -1 && def < INT_MAX) {
hSubContact = db_mc_getSub(hContact, def);
if (hSubContact != NULL) {
- wFlags = GetCtrl(hSubContact, pszSubModule, NULL, DB::Contact::Proto(hSubContact), pszSetting, dbv, destType);
+ wFlags = GetCtrl(hSubContact, pszSubModule, NULL, Proto_GetBaseAccountName(hSubContact), pszSetting, dbv, destType);
if (wFlags != 0) {
wFlags &= ~CTRLF_HASCUSTOM;
wFlags |= CTRLF_HASMETA;
@@ -332,7 +316,7 @@ WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR ps
if (i != def) {
hSubContact = db_mc_getSub(hContact, i);
if (hSubContact != NULL) {
- wFlags = GetCtrl(hSubContact, pszSubModule, NULL, DB::Contact::Proto(hSubContact), pszSetting, dbv, destType);
+ wFlags = GetCtrl(hSubContact, pszSubModule, NULL, Proto_GetBaseAccountName(hSubContact), pszSetting, dbv, destType);
if (wFlags != 0) {
wFlags &= ~CTRLF_HASCUSTOM;
wFlags |= CTRLF_HASMETA;