diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
commit | 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 (patch) | |
tree | 59dbb53fc9496d660ec2ef2846a4eab0f1720b88 /plugins/AVS/src | |
parent | 3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff) |
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/AVS/src')
-rw-r--r-- | plugins/AVS/src/acc.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/cache.cpp | 6 | ||||
-rw-r--r-- | plugins/AVS/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/options.cpp | 6 | ||||
-rw-r--r-- | plugins/AVS/src/poll.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/utils.cpp | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 5d8b10599c..2deea91155 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -418,7 +418,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP DestroyAnimation(data);
data->hContact = lParam;
- mir_strncpy(data->proto, GetContactProto(data->hContact), sizeof(data->proto));
+ mir_strncpy(data->proto, Proto_GetBaseAccountName(data->hContact), sizeof(data->proto));
StartAnimation(data);
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index 6c965f8cc4..3094c122e8 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -71,7 +71,7 @@ CacheNode* FindAvatarInCache(MCONTACT hContact, bool add, bool findAny) if (g_shutDown)
return nullptr;
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto == nullptr || !g_plugin.getByte(szProto, 1))
return nullptr;
@@ -144,7 +144,7 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node, AVATARCACHEENTRY *ace) wcsncpy_s(cacn.filename, node->szFilename, _TRUNCATE);
// Get hash
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr) {
DBVARIANT dbv = { 0 };
if (!db_get_s(hContact, szProto, "AvatarHash", &dbv)) {
@@ -251,7 +251,7 @@ void PicLoader(LPVOID) int result = CreateAvatarInCache(node->hContact, &ace_temp, nullptr);
if (result == -2) {
- char *szProto = GetContactProto(node->hContact);
+ char *szProto = Proto_GetBaseAccountName(node->hContact);
if (szProto == nullptr || Proto_NeedDelaysForAvatars(szProto))
QueueAdd(node->hContact);
else if (FetchAvatarFor(node->hContact, szProto) == GAIR_SUCCESS) // Try to create again
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index adc9ac3b51..7e8c15e1e4 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -88,7 +88,7 @@ static int ProtocolAck(WPARAM, LPARAM lParam) ProcessAvatarInfo(ack->hContact, GAIR_FAILED, (PROTO_AVATAR_INFORMATION*)ack->hProcess, ack->szModule);
}
else if (ack->result == ACKRESULT_STATUS) {
- char *szProto = GetContactProto(ack->hContact);
+ char *szProto = Proto_GetBaseAccountName(ack->hContact);
if (szProto == nullptr || Proto_NeedDelaysForAvatars(szProto)) {
// Queue
db_set_b(ack->hContact, "ContactPhoto", "NeedUpdate", 1);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index a16c83a7fa..beab92b5da 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -587,7 +587,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA db_unset(hContact, "ContactPhoto", "File"); db_unset(hContact, "ContactPhoto", "Format"); { - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); db_unset(hContact, szProto, "AvatarHash"); DeleteAvatarFromCache(hContact, FALSE); @@ -830,7 +830,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa db_unset(hContact, "ContactPhoto", "File"); db_unset(hContact, "ContactPhoto", "Format"); { - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); db_unset(hContact, szProto, "AvatarHash"); DeleteAvatarFromCache(hContact, FALSE); @@ -1104,7 +1104,7 @@ int OnDetailsInit(WPARAM wParam, LPARAM hContact) g_plugin.addUserInfo(wParam, &odp); } else { - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); if (szProto == nullptr || g_plugin.getByte(szProto, 1)) { // Contact dialog odp.pfnDlgProc = DlgProcAvatarUserInfo; diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp index ea2d970f1f..9ccaae4df2 100644 --- a/plugins/AVS/src/poll.cpp +++ b/plugins/AVS/src/poll.cpp @@ -184,7 +184,7 @@ int FetchAvatarFor(MCONTACT hContact, char *szProto) int result = GAIR_NOAVATAR;
if (szProto == nullptr)
- szProto = GetContactProto(hContact);
+ szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr && PollProtocolCanHaveAvatar(szProto) && PollContactCanHaveAvatar(hContact, szProto)) {
// Can have avatar, but must request it?
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index 53a9d7e651..d50ae6f86b 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -78,7 +78,7 @@ int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, const char *sz ace->szFilename[0] = 0;
if (szProto == nullptr) {
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (proto == nullptr || !g_plugin.getByte(proto, 1))
return -1;
@@ -378,7 +378,7 @@ BOOL Proto_IsFetchingWhenContactOfflineAllowed(const char *proto) protoPicCacheEntry* GetProtoDefaultAvatar(MCONTACT hContact)
{
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto)
for (auto &p : g_ProtoPictures)
if (!mir_strcmp(p->szProtoname, szProto) && p->hbmPic != nullptr)
|