summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
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/UserInfoEx
parent81ce57622c3166830b23eae534dacc6b008c659d (diff)
PFLAG_UNIQUEIDSETTING removed, its functionality transferred to Proto_SetUniqueId / Proto_GetUniqueId
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp23
2 files changed, 9 insertions, 16 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index 23c19e0e3d..bd1829e228 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -113,7 +113,7 @@ BYTE CExImContactBase::fromDB(MCONTACT hContact)
}
// unique id (normal)
else {
- uidSetting = (LPCSTR)CallProtoService(pszProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+ uidSetting = Proto_GetUniqueId(pszProto);
// valid
if (uidSetting != nullptr && (INT_PTR)uidSetting != CALLSERVICE_NOTFOUND) {
_pszUIDKey = mir_strdup(uidSetting);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
index 38e55fceec..eab2949fe4 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
@@ -1074,26 +1074,19 @@ BYTE CVCardFileVCF::Export(BYTE bExportUtf)
//
// contacts protocol, uin setting, uin value
//
- {
+ LPCSTR uid = Proto_GetUniqueId(_pszBaseProto);
+ if ((INT_PTR)uid != CALLSERVICE_NOTFOUND && uid) {
CHAR szUID[MAXUID];
- LPCSTR uid;
-
- uid = (LPCSTR)CallProtoService(_pszBaseProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
- if ((INT_PTR)uid != CALLSERVICE_NOTFOUND && uid) {
- if (!db_get_static(_hContact, _pszBaseProto, uid, szUID, sizeof(szUID)))
- fprintf(_pFile, "IM;%s;%s:%s\n", _pszBaseProto, uid, szUID);
- }
+ if (!db_get_static(_hContact, _pszBaseProto, uid, szUID, sizeof(szUID)))
+ fprintf(_pFile, "IM;%s;%s:%s\n", _pszBaseProto, uid, szUID);
}
-
+
//
// time of creation
//
- {
- SYSTEMTIME st;
-
- GetLocalTime(&st);
- fprintf(_pFile, "REV:%04d%02d%02dD%02d%02d%02dT\n", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
- }
+ SYSTEMTIME st;
+ GetLocalTime(&st);
+ fprintf(_pFile, "REV:%04d%02d%02dD%02d%02d%02dT\n", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
fputs("END:VCARD", _pFile);
return 0;