summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-28 20:01:30 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-28 20:01:30 +0300
commite7b69721b0d390cec3f81f97134a51bfef228cf8 (patch)
treea56ef2bd15fa3c995a031bec35ce0113dec22b28 /plugins/DbEditorPP/src
parent81ce57622c3166830b23eae534dacc6b008c659d (diff)
PFLAG_UNIQUEIDSETTING removed, its functionality transferred to Proto_SetUniqueId / Proto_GetUniqueId
Diffstat (limited to 'plugins/DbEditorPP/src')
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp12
-rw-r--r--plugins/DbEditorPP/src/main.cpp4
2 files changed, 5 insertions, 11 deletions
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index 6ae2f27626..b7a404c980 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -124,8 +124,8 @@ char* NickFromHContact(MCONTACT hContact)
mir_strncpy(nick, name, _countof(nick));
}
else {
- char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
- if ((INT_PTR)uid != CALLSERVICE_NOTFOUND && uid) {
+ const char *uid = Proto_GetUniqueId(szProto);
+ if (uid) {
char szUID[FLD_SIZE];
GetValueA(hContact, szProto, uid, szUID, _countof(szUID));
mir_snprintf(nick, "%s *(%s)*<%s>*{%s}*", name, szProto, uid, szUID);
@@ -316,13 +316,7 @@ void importSettings(MCONTACT hContact, char *utf8)
if (p1 && p2 && p1 + 3 < p2 && p2 - p1 < _countof(szProto)) {
strncpy(szProto, p1 + 1, p2 - p1 - 3);
-
- char *protouid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
- if ((INT_PTR)protouid != CALLSERVICE_NOTFOUND) {
- if (!mir_strcmp(protouid, uid))
- hContact = CheckNewContact(szProto, uid, szUID);
- }
- else hContact = CheckNewContact(szProto, uid, szUID);
+ hContact = CheckNewContact(szProto, uid, szUID);
}
}
}
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 9974bcc60c..f72c886360 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -458,8 +458,8 @@ int GetContactName(MCONTACT hContact, const char *proto, wchar_t *value, int max
case 5: // Unique id
if (szProto) {
// protocol must define a PFLAG_UNIQUEIDSETTING
- char *uid = (char *)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
- if ((INT_PTR)uid != CALLSERVICE_NOTFOUND && uid)
+ const char *uid = Proto_GetUniqueId(szProto);
+ if (uid)
GetValue(hContact, szProto, uid, name, _countof(name));
}
break;