diff options
Diffstat (limited to 'protocols/FacebookRM/src/contacts.cpp')
-rw-r--r-- | protocols/FacebookRM/src/contacts.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index fde9b8f678..84f30411a0 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
-void FacebookProto::SaveName(HCONTACT hContact, const facebook_user *fbu)
+void FacebookProto::SaveName(MCONTACT hContact, const facebook_user *fbu)
{
if (fbu->real_name.empty()) {
delSetting(hContact, FACEBOOK_KEY_NICK);
@@ -55,7 +55,7 @@ void FacebookProto::SaveName(HCONTACT hContact, const facebook_user *fbu) }
}
-bool FacebookProto::IsMyContact(HCONTACT hContact, bool include_chat)
+bool FacebookProto::IsMyContact(MCONTACT hContact, bool include_chat)
{
const char *proto = GetContactProto(hContact);
if (proto && !strcmp(m_szModuleName, proto)) {
@@ -66,9 +66,9 @@ bool FacebookProto::IsMyContact(HCONTACT hContact, bool include_chat) return false;
}
-HCONTACT FacebookProto::ChatIDToHContact(std::tstring chat_id)
+MCONTACT FacebookProto::ChatIDToHContact(std::tstring chat_id)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (!IsMyContact(hContact, true))
continue;
@@ -80,9 +80,9 @@ HCONTACT FacebookProto::ChatIDToHContact(std::tstring chat_id) return 0;
}
-HCONTACT FacebookProto::ContactIDToHContact(std::string user_id)
+MCONTACT FacebookProto::ContactIDToHContact(std::string user_id)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (!IsMyContact(hContact))
continue;
@@ -98,7 +98,7 @@ std::string FacebookProto::ThreadIDToContactID(std::string thread_id) {
std::string user_id;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (!IsMyContact(hContact))
continue;
@@ -138,9 +138,9 @@ std::string FacebookProto::ThreadIDToContactID(std::string thread_id) return user_id;
}
-HCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, bool dont_check)
+MCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, bool dont_check)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (!dont_check) {
// First, check if this contact exists
@@ -150,7 +150,7 @@ HCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, b }
// If not, make a new contact!
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if(hContact)
{
if(CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)m_szModuleName) == 0)
@@ -193,7 +193,7 @@ HCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, b void FacebookProto::SetAllContactStatuses(int status)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
continue;
@@ -228,7 +228,7 @@ void FacebookProto::DeleteContactFromServer(void *data) if (fbu != NULL)
fbu->deleted = true;
- HCONTACT hContact = ContactIDToHContact(id);
+ MCONTACT hContact = ContactIDToHContact(id);
// If contact wasn't deleted from database
if (hContact != NULL) {
@@ -265,7 +265,7 @@ void FacebookProto::AddContactToServer(void *data) http::response resp = facy.flap(REQUEST_REQUEST_FRIEND, &query);
if (resp.data.find("\"success\":true", 0) != std::string::npos) {
- HCONTACT hContact = ContactIDToHContact(id);
+ MCONTACT hContact = ContactIDToHContact(id);
// If contact wasn't deleted from database
if (hContact != NULL)
@@ -287,7 +287,7 @@ void FacebookProto::ApproveContactToServer(void *data) if (data == NULL)
return;
- HCONTACT hContact = *(HCONTACT*)data;
+ MCONTACT hContact = *(MCONTACT*)data;
delete data;
std::string post_data = "fb_dtsg=" + facy.dtsg_;
@@ -310,7 +310,7 @@ void FacebookProto::CancelFriendsRequest(void *data) if (data == NULL)
return;
- HCONTACT hContact = *(HCONTACT*)data;
+ MCONTACT hContact = *(MCONTACT*)data;
delete data;
std::string query = "phstamp=0&confirmed=1";
@@ -370,7 +370,7 @@ void FacebookProto::SendPokeWorker(void *p) }
-HANDLE FacebookProto::GetAwayMsg(HCONTACT hContact)
+HANDLE FacebookProto::GetAwayMsg(MCONTACT hContact)
{
return 0; // Status messages are disabled
}
|