From e7b69721b0d390cec3f81f97134a51bfef228cf8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 20:01:30 +0300 Subject: PFLAG_UNIQUEIDSETTING removed, its functionality transferred to Proto_SetUniqueId / Proto_GetUniqueId --- .../src/ex_import/classExImContactBase.cpp | 2 +- plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp | 23 ++++++++-------------- 2 files changed, 9 insertions(+), 16 deletions(-) (limited to 'plugins/UserInfoEx') 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; -- cgit v1.2.3