summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-15 18:21:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-15 18:21:33 +0000
commit683c656dd87e82ec9e2d05f72a7b7e1c7269bfd6 (patch)
treedbd36275d84fe57ae7e60f7765275b1ad1f13ed1 /protocols/FacebookRM
parenta9fc5c1795cea571927f6ff4ceb8701ffe609ad4 (diff)
ProtoBroadcastAck - unified helper for all protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@4962 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/avatars.cpp4
-rw-r--r--protocols/FacebookRM/src/connection.cpp11
-rw-r--r--protocols/FacebookRM/src/messages.cpp6
-rw-r--r--protocols/FacebookRM/src/process.cpp4
4 files changed, 12 insertions, 13 deletions
diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp
index eabb77c8f0..11c812fd0d 100644
--- a/protocols/FacebookRM/src/avatars.cpp
+++ b/protocols/FacebookRM/src/avatars.cpp
@@ -84,7 +84,7 @@ void FacebookProto::CheckAvatarChange(HANDLE hContact, std::string image_url)
if (hContact)
{
db_set_b(hContact, "ContactPhoto", "NeedUpdate", 1);
- ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
else
{
@@ -119,7 +119,7 @@ void FacebookProto::UpdateAvatarWorker(void *)
bool success = facy.save_url(url, ai.filename, nlc);
if (ai.hContact)
- ProtoBroadcastAck(m_szModuleName, ai.hContact, ACKTYPE_AVATAR, success ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)&ai, 0);
+ ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, success ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)&ai, 0);
else if (success)
CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
}
diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp
index a5998569c7..6ba25ec470 100644
--- a/protocols/FacebookRM/src/connection.cpp
+++ b/protocols/FacebookRM/src/connection.cpp
@@ -49,7 +49,7 @@ void FacebookProto::ChangeStatus(void*)
facy.buddies.clear();
facy.messages_ignore.clear();
- ProtoBroadcastAck(m_szModuleName, 0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
OnLeaveChat(NULL, NULL);
@@ -74,7 +74,7 @@ void FacebookProto::ChangeStatus(void*)
LOG("***** Beginning SignOn process");
m_iStatus = facy.self_.status_id = ID_STATUS_CONNECTING;
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
ResetEvent(update_loop_lock_);
@@ -101,12 +101,11 @@ void FacebookProto::ChangeStatus(void*)
ForkThread(&FacebookProto::SetAwayMsgWorker, this, NULL);
}
} else {
- ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_FAILED,
- (HANDLE)old_status,m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_FAILED, (HANDLE)old_status, m_iStatus);
// Set to offline
m_iStatus = m_iDesiredStatus = facy.self_.status_id = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(m_szModuleName, 0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
LOG("***** SignOn failed");
@@ -126,7 +125,7 @@ void FacebookProto::ChangeStatus(void*)
facy.buddy_list();
m_iStatus = facy.self_.status_id = m_iDesiredStatus;
- ProtoBroadcastAck(m_szModuleName, 0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
LOG("***** ChangeStatus complete");
}
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index dfa04d338d..e16af52dab 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -43,7 +43,7 @@ void FacebookProto::SendMsgWorker(void *p)
if (!isOnline())
{
- ProtoBroadcastAck(m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)Translate("You cannot send messages when you are offline."));
+ ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)Translate("You cannot send messages when you are offline."));
}
else if (!db_get_s(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
@@ -57,11 +57,11 @@ void FacebookProto::SendMsgWorker(void *p)
retries--;
}
if (result) {
- ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_SUCCESS, data->msgid,0);
+ ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, data->msgid, 0);
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)data->hContact, NULL);
} else {
char *err = mir_utf8decodeA(error_text.c_str());
- ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, data->msgid,(LPARAM)err);
+ ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)err);
}
db_free(&dbv);
}
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 502deaa627..1ce4379c9f 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -834,7 +834,7 @@ void FacebookProto::SearchAckThread(void *targ)
isr.lastName = tsurname;
isr.email = tcommon;
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, targ, (LPARAM)&isr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, targ, (LPARAM)&isr);
mir_free(tid);
mir_free(tnick);
@@ -849,7 +849,7 @@ void FacebookProto::SearchAckThread(void *targ)
}
}
- ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, targ, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, targ, 0);
facy.handle_success("searchAckThread");