diff options
Diffstat (limited to 'protocols/Tlen/src/tlen_iqid.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_iqid.cpp | 208 |
1 files changed, 104 insertions, 104 deletions
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 87893e2fc5..3951902ea3 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -27,13 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "tlen_iq.h"
#include "tlen_muc.h"
-void JabberIqResultAuth(TlenProtocol *proto, XmlNode *iqNode)
+void TlenIqResultAuth(TlenProtocol *proto, XmlNode *iqNode)
{
char *type;
// RECVED: authentication result
// ACTION: if successfully logged in, continue by requesting roster list and set my initial status
- if ((type=JabberXmlGetAttrValue(iqNode, "type")) == NULL) return;
+ if ((type=TlenXmlGetAttrValue(iqNode, "type")) == NULL) return;
if (!strcmp(type, "result")) {
DBVARIANT dbv;
@@ -42,18 +42,18 @@ void JabberIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) db_set_s(NULL, proto->m_szModuleName, "Nick", proto->threadData->username);
else
db_free(&dbv);
-// iqId = JabberSerialNext();
-// JabberIqAdd(iqId, IQ_PROC_NONE, JabberIqResultGetRoster);
-// JabberSend(info, "<iq type='get' id='"JABBER_IQID"%d'><query xmlns='jabber:iq:roster'/></iq>", iqId);
+// iqId = TlenSerialNext();
+// TlenIqAdd(iqId, IQ_PROC_NONE, TlenIqResultGetRoster);
+// TlenSend(info, "<iq type='get' id='"TLEN_IQID"%d'><query xmlns='tlen:iq:roster'/></iq>", iqId);
- JabberSend(proto, "<iq type='get' id='GetRoster'><query xmlns='jabber:iq:roster'/></iq>");
- JabberSend(proto, "<iq to='tcfg' type='get' id='TcfgGetAfterLoggedIn'></iq>");
+ TlenSend(proto, "<iq type='get' id='GetRoster'><query xmlns='tlen:iq:roster'/></iq>");
+ TlenSend(proto, "<iq to='tcfg' type='get' id='TcfgGetAfterLoggedIn'></iq>");
}
// What to do if password error? etc...
else if (!strcmp(type, "error")) {
char text[128];
- JabberSend(proto, "</s>");
+ TlenSend(proto, "</s>");
mir_snprintf(text, sizeof(text), "%s %s@%s.", TranslateT("Authentication failed for"), proto->threadData->username, proto->threadData->server);
MessageBoxA(NULL, text, Translate("Tlen Authentication"), MB_OK|MB_ICONSTOP|MB_SETFOREGROUND);
ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
@@ -61,10 +61,10 @@ void JabberIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) }
}
-void JabberResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) {
+void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) {
DBVARIANT dbv;
XmlNode *itemNode, *groupNode;
- JABBER_LIST_ITEM *item;
+ TLEN_LIST_ITEM *item;
HANDLE hContact;
char *jid, *name, *nick;
int i;
@@ -73,41 +73,41 @@ void JabberResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
if (!strcmp(itemNode->name, "item")) {
- if ((jid=JabberXmlGetAttrValue(itemNode, "jid")) != NULL) {
- str = JabberXmlGetAttrValue(itemNode, "subscription");
+ if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
+ str = TlenXmlGetAttrValue(itemNode, "subscription");
if (!strcmp(str, "remove")) {
- if ((hContact=JabberHContactFromJID(proto, jid)) != NULL) {
+ if ((hContact=TlenHContactFromJID(proto, jid)) != NULL) {
if (db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
}
- JabberListRemove(proto, LIST_ROSTER, jid);
+ TlenListRemove(proto, LIST_ROSTER, jid);
} else {
- item = JabberListAdd(proto, LIST_ROSTER, jid);
+ item = TlenListAdd(proto, LIST_ROSTER, jid);
if (item != NULL) {
if (str == NULL) item->subscription = SUB_NONE;
else if (!strcmp(str, "both")) item->subscription = SUB_BOTH;
else if (!strcmp(str, "to")) item->subscription = SUB_TO;
else if (!strcmp(str, "from")) item->subscription = SUB_FROM;
else item->subscription = SUB_NONE;
- if ((name=JabberXmlGetAttrValue(itemNode, "name")) != NULL) {
- nick = JabberTextDecode(name);
+ if ((name=TlenXmlGetAttrValue(itemNode, "name")) != NULL) {
+ nick = TlenTextDecode(name);
} else {
- nick = JabberLocalNickFromJID(jid);
+ nick = TlenLocalNickFromJID(jid);
}
if (nick != NULL) {
if (item->nick) mir_free(item->nick);
item->nick = nick;
- if ((hContact=JabberHContactFromJID(proto, jid)) == NULL) {
+ if ((hContact=TlenHContactFromJID(proto, jid)) == NULL) {
// Received roster has a new JID.
// Add the jid (with empty resource) to Miranda contact list.
- hContact = JabberDBCreateContact(proto, jid, nick, FALSE);
+ hContact = TlenDBCreateContact(proto, jid, nick, FALSE);
}
db_set_s(hContact, "CList", "MyHandle", nick);
if (item->group) mir_free(item->group);
- if ((groupNode=JabberXmlGetChild(itemNode, "group")) != NULL && groupNode->text != NULL) {
+ if ((groupNode=TlenXmlGetChild(itemNode, "group")) != NULL && groupNode->text != NULL) {
item->group = TlenGroupDecode(groupNode->text);
- JabberContactListCreateGroup(item->group);
+ TlenContactListCreateGroup(item->group);
// Don't set group again if already correct, or Miranda may show wrong group count in some case
if (!db_get(hContact, "CList", "Group", &dbv)) {
if (strcmp(dbv.pszVal, item->group))
@@ -127,7 +127,7 @@ void JabberResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { }
}
-void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode)
+void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode)
{
XmlNode *queryNode;
char *type;
@@ -135,51 +135,51 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) // RECVED: roster information
// ACTION: populate LIST_ROSTER and create contact for any new rosters
- if ((type=JabberXmlGetAttrValue(iqNode, "type")) == NULL) return;
- if ((queryNode=JabberXmlGetChild(iqNode, "query")) == NULL) return;
+ if ((type=TlenXmlGetAttrValue(iqNode, "type")) == NULL) return;
+ if ((queryNode=TlenXmlGetChild(iqNode, "query")) == NULL) return;
if (!strcmp(type, "result")) {
- str = JabberXmlGetAttrValue(queryNode, "xmlns");
- if (str != NULL && !strcmp(str, "jabber:iq:roster")) {
+ str = TlenXmlGetAttrValue(queryNode, "xmlns");
+ if (str != NULL && !strcmp(str, "tlen:iq:roster")) {
DBVARIANT dbv;
XmlNode *itemNode, *groupNode;
- JABBER_SUBSCRIPTION sub;
- JABBER_LIST_ITEM *item;
+ TLEN_SUBSCRIPTION sub;
+ TLEN_LIST_ITEM *item;
char *jid, *name, *nick;
int i, oldStatus;
for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
if (!strcmp(itemNode->name, "item")) {
- str = JabberXmlGetAttrValue(itemNode, "subscription");
+ str = TlenXmlGetAttrValue(itemNode, "subscription");
if (str == NULL) sub = SUB_NONE;
else if (!strcmp(str, "both")) sub = SUB_BOTH;
else if (!strcmp(str, "to")) sub = SUB_TO;
else if (!strcmp(str, "from")) sub = SUB_FROM;
else sub = SUB_NONE;
//if (str != NULL && (!strcmp(str, "to") || !strcmp(str, "both"))) {
- if ((jid=JabberXmlGetAttrValue(itemNode, "jid")) != NULL) {
- if ((name=JabberXmlGetAttrValue(itemNode, "name")) != NULL)
- nick = JabberTextDecode(name);
+ if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
+ if ((name=TlenXmlGetAttrValue(itemNode, "name")) != NULL)
+ nick = TlenTextDecode(name);
else
- nick = JabberLocalNickFromJID(jid);
+ nick = TlenLocalNickFromJID(jid);
if (nick != NULL) {
HANDLE hContact;
- item = JabberListAdd(proto, LIST_ROSTER, jid);
+ item = TlenListAdd(proto, LIST_ROSTER, jid);
if (item->nick) mir_free(item->nick);
item->nick = nick;
item->subscription = sub;
- if ((hContact=JabberHContactFromJID(proto, jid)) == NULL) {
+ if ((hContact=TlenHContactFromJID(proto, jid)) == NULL) {
// Received roster has a new JID.
// Add the jid (with empty resource) to Miranda contact list.
- hContact = JabberDBCreateContact(proto, jid, nick, FALSE);
+ hContact = TlenDBCreateContact(proto, jid, nick, FALSE);
}
db_set_s(hContact, "CList", "MyHandle", nick);
if (item->group) mir_free(item->group);
- if ((groupNode=JabberXmlGetChild(itemNode, "group")) != NULL && groupNode->text != NULL) {
+ if ((groupNode=TlenXmlGetChild(itemNode, "group")) != NULL && groupNode->text != NULL) {
item->group = TlenGroupDecode(groupNode->text);
- JabberContactListCreateGroup(item->group);
+ TlenContactListCreateGroup(item->group);
// Don't set group again if already correct, or Miranda may show wrong group count in some case
if (!db_get(hContact, "CList", "Group", &dbv)) {
if (strcmp(dbv.pszVal, item->group))
@@ -195,7 +195,7 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) if (!db_get(hContact, proto->m_szModuleName, "AvatarHash", &dbv)) {
if (item->avatarHash) mir_free(item->avatarHash);
item->avatarHash = mir_strdup(dbv.pszVal);
- JabberLog(proto, "Setting hash [%s] = %s", nick, item->avatarHash);
+ TlenLog(proto, "Setting hash [%s] = %s", nick, item->avatarHash);
db_free(&dbv);
}
item->avatarFormat = db_get_dw(hContact, proto->m_szModuleName, "AvatarFormat", PA_FORMAT_UNKNOWN);
@@ -210,8 +210,8 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) HANDLE hNext = hContact = db_find_next(hContact, proto->m_szModuleName);
ptrA jid( db_get_sa(hContact, proto->m_szModuleName, "jid"));
if (jid != NULL) {
- if (!JabberListExist(proto, LIST_ROSTER, jid)) {
- JabberLog(proto, "Syncing roster: deleting 0x%x", hContact);
+ if (!TlenListExist(proto, LIST_ROSTER, jid)) {
+ TlenLog(proto, "Syncing roster: deleting 0x%x", hContact);
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
}
}
@@ -226,16 +226,16 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) Menu_ModifyItem(proto->hMenuChats, &mi);
proto->isOnline = TRUE;
- JabberLog(proto, "Status changed via THREADSTART");
+ TlenLog(proto, "Status changed via THREADSTART");
oldStatus = proto->m_iStatus;
- JabberSendPresence(proto, proto->m_iDesiredStatus);
+ TlenSendPresence(proto, proto->m_iDesiredStatus);
ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, proto->m_iStatus);
}
}
}
-// Tlen actually use jabber:iq:search for other users vCard or jabber:iq:register for own vCard
+// Tlen actually use tlen:iq:search for other users vCard or tlen:iq:register for own vCard
void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode)
{
XmlNode *queryNode, *itemNode, *n;
@@ -244,17 +244,17 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) HANDLE hContact;
char *nText;
-// JabberLog("<iq/> iqIdGetVcard (tlen)");
- if ((type=JabberXmlGetAttrValue(iqNode, "type")) == NULL) return;
+// TlenLog("<iq/> iqIdGetVcard (tlen)");
+ if ((type=TlenXmlGetAttrValue(iqNode, "type")) == NULL) return;
if (!strcmp(type, "result")) {
BOOL hasFirst, hasLast, hasNick, hasEmail, hasCity, hasAge, hasGender, hasSchool, hasLookFor, hasOccupation;
DBVARIANT dbv;
int i;
- if ((queryNode=JabberXmlGetChild(iqNode, "query")) == NULL) return;
- if ((itemNode=JabberXmlGetChild(queryNode, "item")) == NULL) return;
- if ((jid=JabberXmlGetAttrValue(itemNode, "jid")) != NULL) {
+ if ((queryNode=TlenXmlGetChild(iqNode, "query")) == NULL) return;
+ if ((itemNode=TlenXmlGetChild(queryNode, "item")) == NULL) return;
+ if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if (db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) return;
if (strchr(jid, '@') != NULL) {
mir_snprintf(text, SIZEOF(text), "%s", jid);
@@ -262,7 +262,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_snprintf(text, SIZEOF(text), "%s@%s", jid, dbv.pszVal); // Add @tlen.pl
}
db_free(&dbv);
- if ((hContact=JabberHContactFromJID(proto, text)) == NULL) {
+ if ((hContact=TlenHContactFromJID(proto, text)) == NULL) {
if (db_get(NULL, proto->m_szModuleName, "LoginName", &dbv)) return;
if (strcmp(dbv.pszVal, jid)) {
db_free(&dbv);
@@ -280,7 +280,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) if (!strcmp(n->name, "first")) {
if (n->text != NULL) {
hasFirst = TRUE;
- nText = JabberTextDecode(n->text);
+ nText = TlenTextDecode(n->text);
db_set_s(hContact, proto->m_szModuleName, "FirstName", nText);
mir_free(nText);
}
@@ -288,7 +288,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) else if (!strcmp(n->name, "last")) {
if (n->text != NULL) {
hasLast = TRUE;
- nText = JabberTextDecode(n->text);
+ nText = TlenTextDecode(n->text);
db_set_s(hContact, proto->m_szModuleName, "LastName", nText);
mir_free(nText);
}
@@ -296,7 +296,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) else if (!strcmp(n->name, "nick")) {
if (n->text != NULL) {
hasNick = TRUE;
- nText = JabberTextDecode(n->text);
+ nText = TlenTextDecode(n->text);
db_set_s(hContact, proto->m_szModuleName, "Nick", nText);
mir_free(nText);
}
@@ -304,7 +304,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) else if (!strcmp(n->name, "email")) {
if (n->text != NULL) {
hasEmail = TRUE;
- nText = JabberTextDecode(n->text);
+ nText = TlenTextDecode(n->text);
db_set_s(hContact, proto->m_szModuleName, "e-mail", nText);
mir_free(nText);
}
@@ -312,7 +312,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) else if (!strcmp(n->name, "c")) {
if (n->text != NULL) {
hasCity = TRUE;
- nText = JabberTextDecode(n->text);
+ nText = TlenTextDecode(n->text);
db_set_s(hContact, proto->m_szModuleName, "City", nText);
mir_free(nText);
}
@@ -334,7 +334,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) else if (!strcmp(n->name, "e")) {
if (n->text != NULL) {
hasSchool = TRUE;
- nText = JabberTextDecode(n->text);
+ nText = TlenTextDecode(n->text);
db_set_s(hContact, proto->m_szModuleName, "School", nText);
mir_free(nText);
}
@@ -395,29 +395,29 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) }
}
-void JabberIqResultSearch(TlenProtocol *proto, XmlNode *iqNode)
+void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode)
{
XmlNode *queryNode, *itemNode, *n;
char *type, *jid, *str;
int id, i, found;
- JABBER_SEARCH_RESULT jsr = {0};
+ TLEN_SEARCH_RESULT jsr = {0};
DBVARIANT dbv = {0};
found = 0;
-// JabberLog("<iq/> iqIdGetSearch");
- if ((type=JabberXmlGetAttrValue(iqNode, "type")) == NULL) return;
- if ((str=JabberXmlGetAttrValue(iqNode, "id")) == NULL) return;
- id = atoi(str+strlen(JABBER_IQID));
+// TlenLog("<iq/> iqIdGetSearch");
+ if ((type=TlenXmlGetAttrValue(iqNode, "type")) == NULL) return;
+ if ((str=TlenXmlGetAttrValue(iqNode, "id")) == NULL) return;
+ id = atoi(str+strlen(TLEN_IQID));
if (!strcmp(type, "result")) {
- if ((queryNode=JabberXmlGetChild(iqNode, "query")) == NULL) return;
+ if ((queryNode=TlenXmlGetChild(iqNode, "query")) == NULL) return;
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
- jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
+ jsr.hdr.cbSize = sizeof(TLEN_SEARCH_RESULT);
jsr.hdr.flags = PSR_TCHAR;
for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
if (!strcmp(itemNode->name, "item")) {
- if ((jid=JabberXmlGetAttrValue(itemNode, "jid")) != NULL) {
+ if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if (strchr(jid, '@') != NULL) {
mir_snprintf(jsr.jid, sizeof(jsr.jid), "%s", jid);
} else {
@@ -425,29 +425,29 @@ void JabberIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) }
jsr.jid[sizeof(jsr.jid)-1] = '\0';
jsr.hdr.id = mir_a2t(jid);
- if ((n=JabberXmlGetChild(itemNode, "nick")) != NULL && n->text != NULL){
- char* buf = JabberTextDecode(n->text);
+ if ((n=TlenXmlGetChild(itemNode, "nick")) != NULL && n->text != NULL){
+ char* buf = TlenTextDecode(n->text);
jsr.hdr.nick = mir_a2t(buf);
mir_free(buf);
} else {
jsr.hdr.nick = mir_tstrdup(TEXT(""));
}
- if ((n=JabberXmlGetChild(itemNode, "first")) != NULL && n->text != NULL){
- char* buf = JabberTextDecode(n->text);
+ if ((n=TlenXmlGetChild(itemNode, "first")) != NULL && n->text != NULL){
+ char* buf = TlenTextDecode(n->text);
jsr.hdr.firstName = mir_a2t(buf);
mir_free(buf);
} else {
jsr.hdr.firstName = mir_tstrdup(TEXT(""));
}
- if ((n=JabberXmlGetChild(itemNode, "last")) != NULL && n->text != NULL){
- char* buf = JabberTextDecode(n->text);
+ if ((n=TlenXmlGetChild(itemNode, "last")) != NULL && n->text != NULL){
+ char* buf = TlenTextDecode(n->text);
jsr.hdr.lastName = mir_a2t(buf);
mir_free(buf);
} else {
jsr.hdr.lastName = mir_tstrdup(TEXT(""));
}
- if ((n=JabberXmlGetChild(itemNode, "email"))!=NULL && n->text!=NULL){
- char* buf = JabberTextDecode(n->text);
+ if ((n=TlenXmlGetChild(itemNode, "email"))!=NULL && n->text!=NULL){
+ char* buf = TlenTextDecode(n->text);
jsr.hdr.email = mir_a2t(buf);
mir_free(buf);
} else {
@@ -508,7 +508,7 @@ void GetConfigItem(XmlNode *node, char *dest, BOOL bMethod, int *methodDest) { strcpy(dest, node->text);
TlenUrlDecode(dest);
if (bMethod) {
- char *method = JabberXmlGetAttrValue(node, "method");
+ char *method = TlenXmlGetAttrValue(node, "method");
if (method != NULL && !strcmpi(method, "POST")) {
*methodDest = REQUEST_POST;
} else {
@@ -522,32 +522,32 @@ void TlenIqResultTcfg(TlenProtocol *proto, XmlNode *iqNode) XmlNode *queryNode, *miniMailNode, *node;
char *type;
- if ((type=JabberXmlGetAttrValue(iqNode, "type")) == NULL) return;
+ if ((type=TlenXmlGetAttrValue(iqNode, "type")) == NULL) return;
if (!strcmp(type, "result")) {
- if ((queryNode=JabberXmlGetChild(iqNode, "query")) == NULL) return;
- if ((miniMailNode=JabberXmlGetChild(queryNode, "mini-mail")) == NULL) return;
- if ((node=JabberXmlGetChild(miniMailNode, "base")) != NULL) {
+ if ((queryNode=TlenXmlGetChild(iqNode, "query")) == NULL) return;
+ if ((miniMailNode=TlenXmlGetChild(queryNode, "mini-mail")) == NULL) return;
+ if ((node=TlenXmlGetChild(miniMailNode, "base")) != NULL) {
GetConfigItem(node, proto->threadData->tlenConfig.mailBase, FALSE, NULL);
}
- if ((node=JabberXmlGetChild(miniMailNode, "msg")) != NULL) {
+ if ((node=TlenXmlGetChild(miniMailNode, "msg")) != NULL) {
GetConfigItem(node, proto->threadData->tlenConfig.mailMsg, TRUE, &proto->threadData->tlenConfig.mailMsgMthd);
}
- if ((node=JabberXmlGetChild(miniMailNode, "index")) != NULL) {
+ if ((node=TlenXmlGetChild(miniMailNode, "index")) != NULL) {
GetConfigItem(node, proto->threadData->tlenConfig.mailIndex, TRUE, &proto->threadData->tlenConfig.mailIndexMthd);
}
- if ((node=JabberXmlGetChild(miniMailNode, "login")) != NULL) {
+ if ((node=TlenXmlGetChild(miniMailNode, "login")) != NULL) {
GetConfigItem(node, proto->threadData->tlenConfig.mailLogin, TRUE, &proto->threadData->tlenConfig.mailLoginMthd);
}
- if ((node=JabberXmlGetChild(miniMailNode, "compose")) != NULL) {
+ if ((node=TlenXmlGetChild(miniMailNode, "compose")) != NULL) {
GetConfigItem(node, proto->threadData->tlenConfig.mailCompose, TRUE, &proto->threadData->tlenConfig.mailComposeMthd);
}
- if ((node=JabberXmlGetChild(miniMailNode, "avatar-get")) != NULL) {
+ if ((node=TlenXmlGetChild(miniMailNode, "avatar-get")) != NULL) {
GetConfigItem(node, proto->threadData->tlenConfig.avatarGet, TRUE, &proto->threadData->tlenConfig.avatarGetMthd);
}
- if ((node=JabberXmlGetChild(miniMailNode, "avatar-upload")) != NULL) {
+ if ((node=TlenXmlGetChild(miniMailNode, "avatar-upload")) != NULL) {
GetConfigItem(node, proto->threadData->tlenConfig.avatarUpload, TRUE, &proto->threadData->tlenConfig.avatarUploadMthd);
}
- if ((node=JabberXmlGetChild(miniMailNode, "avatar-remove")) != NULL) {
+ if ((node=TlenXmlGetChild(miniMailNode, "avatar-remove")) != NULL) {
GetConfigItem(node, proto->threadData->tlenConfig.avatarRemove, TRUE, &proto->threadData->tlenConfig.avatarRemoveMthd);
}
}
@@ -555,30 +555,30 @@ void TlenIqResultTcfg(TlenProtocol *proto, XmlNode *iqNode) void TlenIqResultVersion(TlenProtocol *proto, XmlNode *iqNode)
{
- XmlNode *queryNode = JabberXmlGetChild(iqNode, "query");
+ XmlNode *queryNode = TlenXmlGetChild(iqNode, "query");
if (queryNode != NULL) {
char* from;
- if (( from=JabberXmlGetAttrValue( iqNode, "from" )) != NULL ) {
- JABBER_LIST_ITEM *item;
- if (( item=JabberListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
+ if (( from=TlenXmlGetAttrValue( iqNode, "from" )) != NULL ) {
+ TLEN_LIST_ITEM *item;
+ if (( item=TlenListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
HANDLE hContact;
XmlNode *n;
if ( item->software ) mir_free( item->software );
if ( item->version ) mir_free( item->version );
if ( item->system ) mir_free( item->system );
- if (( n=JabberXmlGetChild( queryNode, "name" )) != NULL && n->text ) {
- item->software = JabberTextDecode( n->text );
+ if (( n=TlenXmlGetChild( queryNode, "name" )) != NULL && n->text ) {
+ item->software = TlenTextDecode( n->text );
} else
item->software = NULL;
- if (( n=JabberXmlGetChild( queryNode, "version" )) != NULL && n->text )
- item->version = JabberTextDecode( n->text );
+ if (( n=TlenXmlGetChild( queryNode, "version" )) != NULL && n->text )
+ item->version = TlenTextDecode( n->text );
else
item->version = NULL;
- if (( n=JabberXmlGetChild( queryNode, "os" )) != NULL && n->text )
- item->system = JabberTextDecode( n->text );
+ if (( n=TlenXmlGetChild( queryNode, "os" )) != NULL && n->text )
+ item->system = TlenTextDecode( n->text );
else
item->system = NULL;
- if (( hContact=JabberHContactFromJID(proto, item->jid )) != NULL ) {
+ if (( hContact=TlenHContactFromJID(proto, item->jid )) != NULL ) {
if (item->software != NULL) {
db_set_s(hContact, proto->m_szModuleName, "MirVer", item->software);
} else {
@@ -592,16 +592,16 @@ void TlenIqResultVersion(TlenProtocol *proto, XmlNode *iqNode) void TlenIqResultInfo(TlenProtocol *proto, XmlNode *iqNode)
{
- XmlNode *queryNode = JabberXmlGetChild(iqNode, "query");
+ XmlNode *queryNode = TlenXmlGetChild(iqNode, "query");
if (queryNode != NULL) {
char* from;
- if (( from=JabberXmlGetAttrValue( queryNode, "from" )) != NULL ) {
- JABBER_LIST_ITEM *item;
- if (( item=JabberListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
+ if (( from=TlenXmlGetAttrValue( queryNode, "from" )) != NULL ) {
+ TLEN_LIST_ITEM *item;
+ if (( item=TlenListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
HANDLE hContact;
- XmlNode *version = JabberXmlGetChild(queryNode, "version");
- item->protocolVersion = JabberTextDecode(version->text);
- if (( hContact=JabberHContactFromJID(proto, item->jid )) != NULL ) {
+ XmlNode *version = TlenXmlGetChild(queryNode, "version");
+ item->protocolVersion = TlenTextDecode(version->text);
+ if (( hContact=TlenHContactFromJID(proto, item->jid )) != NULL ) {
if (item->software == NULL) {
char str[128];
mir_snprintf(str, sizeof(str), "Tlen Protocol %s", item->protocolVersion);
|