diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-16 20:46:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-16 20:46:48 +0000 |
commit | 8e87b243ac6adf4d6e179d6453d46c4211e6baa3 (patch) | |
tree | 64bea61e4ae673d9c536125cc91823908a16155a /protocols/JabberG/src/jabber_iqid.cpp | |
parent | f2769285e5e68ae941fbe1010337039ae8222005 (diff) |
switch to the library ProtoBroadcastAck for Jabber, MSN & YAHOO
git-svn-id: http://svn.miranda-ng.org/main/trunk@4992 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_iqid.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 104470416d..85eda703ff 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -267,7 +267,7 @@ void CJabberProto::OnIqResultGetAuth(HXML iqNode) TCHAR text[128];
mir_sntprintf(text, SIZEOF(text), _T("%s %s."), TranslateT("Authentication failed for"), m_ThreadInfo->username);
MsgPopup(NULL, text, TranslateT("Jabber Authentication"));
- JSendBroadcast(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
+ JLoginFailed(LOGINERR_WRONGPASSWORD);
m_ThreadInfo = NULL; // To disallow auto reconnect
} }
@@ -296,7 +296,7 @@ void CJabberProto::OnIqResultSetAuth(HXML iqNode) m_ThreadInfo->send("</stream:stream>");
mir_sntprintf(text, SIZEOF(text), _T("%s %s."), TranslateT("Authentication failed for"), m_ThreadInfo->username);
MsgPopup(NULL, text, TranslateT("Jabber Authentication"));
- JSendBroadcast(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
+ JLoginFailed(LOGINERR_WRONGPASSWORD);
m_ThreadInfo = NULL; // To disallow auto reconnect
} }
@@ -745,13 +745,13 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode) jsr.hdr.email = sttGetText(vCardNode, "EMAIL");
_tcsncpy(jsr.jid, jid, SIZEOF(jsr.jid));
jsr.jid[ SIZEOF(jsr.jid)-1 ] = '\0';
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
else if ( !lstrcmp(type, _T("error")))
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
- else JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
+ else ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
return;
}
@@ -1187,13 +1187,13 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode) }
else {
if ((hContact = HContactFromJID(jid)) != NULL)
- JSendBroadcast(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
WindowNotify(WM_JABBER_REFRESH_VCARD);
}
}
else if ( !lstrcmp(type, _T("error"))) {
if ((hContact = HContactFromJID(jid)) != NULL)
- JSendBroadcast(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0);
}
}
@@ -1248,13 +1248,13 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode) else
jsr.hdr.email = _T("");
jsr.hdr.flags = PSR_TCHAR;
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
} } }
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
else if ( !lstrcmp(type, _T("error")))
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
void CJabberProto::OnIqResultExtSearch(HXML iqNode)
@@ -1315,13 +1315,13 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode) jsr.hdr.email = (xmlGetText(n) != NULL) ? (TCHAR*)xmlGetText(n) : _T("");
}
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
}
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
else if ( !lstrcmp(type, _T("error")))
- JSendBroadcast(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
void CJabberProto::OnIqResultSetPassword(HXML iqNode)
@@ -1373,7 +1373,7 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode) if ( !JGetStringT(hContact, "AvatarSaved", &dbv)) {
db_free(&dbv);
JDeleteSetting(hContact, "AvatarSaved");
- JSendBroadcast(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, NULL);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, NULL);
}
return;
@@ -1537,10 +1537,10 @@ LBL_ErrFormat: fwrite(body, resultLen, 1, out);
fclose(out);
JSetString(hContact, "AvatarSaved", buffer);
- JSendBroadcast(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&AI), NULL);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&AI), NULL);
Log("Broadcast new avatar: %s",AI.filename);
}
- else JSendBroadcast(hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, HANDLE(&AI), NULL);
+ else ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, HANDLE(&AI), NULL);
mir_free(body);
}
|