summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_protoint.h2
-rw-r--r--libs/win32/mir_app.libbin192070 -> 192436 bytes
-rw-r--r--libs/win64/mir_app.libbin187896 -> 188266 bytes
-rw-r--r--protocols/Discord/src/avatars.cpp2
-rw-r--r--protocols/FacebookRM/src/avatars.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp2
-rw-r--r--protocols/ICQ-WIM/src/server.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_avatars.cpp2
-rw-r--r--protocols/Steam/src/steam_avatars.cpp2
-rw-r--r--protocols/Steam/src/steam_contacts.cpp2
-rw-r--r--protocols/VKontakte/src/vk_avatars.cpp2
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/proto_utils.cpp5
14 files changed, 18 insertions, 9 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 97186fbdbf..5a7df174cf 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -185,6 +185,8 @@ public:
void setAllContactStatuses(int iStatus, bool bSkipChats = true);
+ void ReportSelfAvatarChanged();
+
void WindowSubscribe(HWND hwnd);
void WindowUnsubscribe(HWND hwnd);
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index d496b1bb43..d99d5ae292 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index a5abd82c62..58af358c74 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/protocols/Discord/src/avatars.cpp b/protocols/Discord/src/avatars.cpp
index 19a8adc158..10c5081f12 100644
--- a/protocols/Discord/src/avatars.cpp
+++ b/protocols/Discord/src/avatars.cpp
@@ -94,7 +94,7 @@ LBL_Error:
if (ai.hContact)
ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai);
else
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
+ ReportSelfAvatarChanged();
}
bool CDiscordProto::RetrieveAvatar(MCONTACT hContact)
diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp
index 51a59f576f..af553cd948 100644
--- a/protocols/FacebookRM/src/avatars.cpp
+++ b/protocols/FacebookRM/src/avatars.cpp
@@ -76,7 +76,7 @@ void FacebookProto::CheckAvatarChange(MCONTACT hContact, const std::string &imag
if (!hContact) {
PROTO_AVATAR_INFORMATION ai = { 0 };
if (GetAvatarInfo(update_required ? GAIF_FORCE : 0, (LPARAM)&ai) != GAIR_WAITFOR)
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName);
+ ReportSelfAvatarChanged();
}
else if (update_required) {
db_set_b(hContact, "ContactPhoto", "NeedUpdate", 1);
@@ -109,7 +109,7 @@ void FacebookProto::UpdateAvatarWorker(void *)
if (ai.hContact)
ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, success ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)&ai);
else if (success)
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName);
+ ReportSelfAvatarChanged();
}
mir_cslock s(avatar_lock_);
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index d05ab14865..55dce87b48 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -279,7 +279,7 @@ void __cdecl GaduProto::avatarrequestthread(void*)
ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, result ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)&ai, 0);
if (!ai.hContact)
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
+ ReportSelfAvatarChanged();
mir_free(data);
}
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index ef794cab5a..1672985dc0 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -867,7 +867,7 @@ LBL_Error:
ProtoBroadcastAck(pReq->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&ai), 0);
debugLogW(L"Broadcast new avatar: %s", ai.filename);
}
- else CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
+ else ReportSelfAvatarChanged();
}
void CIcqProto::OnSearchResults(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq)
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp
index 691290104b..56fc8f1869 100644
--- a/protocols/SkypeWeb/src/skype_avatars.cpp
+++ b/protocols/SkypeWeb/src/skype_avatars.cpp
@@ -44,7 +44,7 @@ INT_PTR CSkypeProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam)
void CSkypeProto::ReloadAvatarInfo(MCONTACT hContact)
{
if (hContact == NULL) {
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
+ ReportSelfAvatarChanged();
return;
}
PROTO_AVATAR_INFORMATION ai = { 0 };
diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp
index 29f1cb9938..4a3a003ca7 100644
--- a/protocols/Steam/src/steam_avatars.cpp
+++ b/protocols/Steam/src/steam_avatars.cpp
@@ -46,7 +46,7 @@ void CSteamProto::CheckAvatarChange(MCONTACT hContact, std::string avatarUrl)
{
PROTO_AVATAR_INFORMATION ai = { 0 };
if (GetAvatarInfo(update_required ? GAIF_FORCE : 0, (LPARAM)&ai) != GAIR_WAITFOR)
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
+ ReportSelfAvatarChanged();
}
else if (update_required)
{
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index 9552ee3485..aa0f13da76 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -548,7 +548,7 @@ void CSteamProto::OnGotAvatar(const HttpResponse &response, void *arg)
if (ai.hContact)
ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0);
else
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
+ ReportSelfAvatarChanged();
}
}
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp
index ddfbbdb31d..a2ab5e8dbc 100644
--- a/protocols/VKontakte/src/vk_avatars.cpp
+++ b/protocols/VKontakte/src/vk_avatars.cpp
@@ -68,7 +68,7 @@ INT_PTR CVkProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam)
void CVkProto::ReloadAvatarInfo(MCONTACT hContact)
{
if (!hContact) {
- CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName);
+ ReportSelfAvatarChanged();
return;
}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 892a952925..210f167b8f 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -684,3 +684,4 @@ ImageList_AddProtoIcon @773
ImageList_AddSkinIcon @774
Clist_GetGroup @775
Clist_SetGroup @776
+?ReportSelfAvatarChanged@PROTO_INTERFACE@@QAEXXZ @777 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 6db702af0e..132aa6225b 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -684,3 +684,4 @@ ImageList_AddProtoIcon @773
ImageList_AddSkinIcon @774
Clist_GetGroup @775
Clist_SetGroup @776
+?ReportSelfAvatarChanged@PROTO_INTERFACE@@QEAAXXZ @777 NONAME
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp
index 12d6ac1202..06b775cf7a 100644
--- a/src/mir_app/src/proto_utils.cpp
+++ b/src/mir_app/src/proto_utils.cpp
@@ -268,6 +268,11 @@ void PROTO_INTERFACE::WindowUnsubscribe(HWND hwnd)
/////////////////////////////////////////////////////////////////////////////////////////
// avatar support
+void PROTO_INTERFACE::ReportSelfAvatarChanged()
+{
+ CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName);
+}
+
MIR_APP_DLL(LPCTSTR) ProtoGetAvatarExtension(int format)
{
if (format == PA_FORMAT_PNG)