summaryrefslogtreecommitdiff
path: root/plugins/Import/src/import.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-24 19:32:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-24 19:32:56 +0000
commite26440954f80b88d374559ab7f33821e8c78aa1e (patch)
treed45ebbc2cb8e52235a239978fc3c680967d07f55 /plugins/Import/src/import.cpp
parent93226b428b1b55a28c2af8dec864d597e2971409 (diff)
another code simplification
git-svn-id: http://svn.miranda-ng.org/main/trunk@1170 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import/src/import.cpp')
-rw-r--r--plugins/Import/src/import.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index fe2c4916bf..552beeefc5 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -85,6 +85,22 @@ static int ImportGroups()
return nGroups;
}
+HANDLE HContactFromID(char* pszProtoName, char* pszSetting, char* pszID)
+{
+ HANDLE hContact = dstDb->FindFirstContact();
+ while (hContact != NULL) {
+ char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ if ( !lstrcmpA(szProto, pszProtoName)) {
+ mir_ptr<char> id( db_get_sa(hContact, pszProtoName, pszSetting));
+ if ( !lstrcmpA(pszID, id))
+ return hContact;
+ }
+
+ hContact = dstDb->FindNextContact(hContact);
+ }
+ return INVALID_HANDLE_VALUE;
+}
+
HANDLE AddContact(HWND hdlgProgress, char* pszProtoName, char* pszUniqueSetting, DBVARIANT* id, TCHAR *nick, TCHAR *group)
{
HANDLE hContact;