From 83310365c69bd40365ee0ae0e16c99c28e24cd0b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 14:24:12 +0000 Subject: - 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 --- plugins/UserInfoEx/src/mir_db.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'plugins/UserInfoEx/src/mir_db.cpp') 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 @@ -29,22 +29,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 @@ -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; -- cgit v1.2.3