summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp18
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp12
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/oauth.cpp24
4 files changed, 27 insertions, 29 deletions
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index f054c5e0e9..c666bd591b 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -84,20 +84,20 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts)
//if this url returned xml data (before and after 11.2013 gg convention)
TCHAR *xmlAction = mir_a2t(resp->pData);
- HXML hXml = xi.parseString(xmlAction, 0, _T("result"));
+ HXML hXml = xmlParseString(xmlAction, 0, _T("result"));
if (hXml != NULL) {
- HXML node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar"), 0);
- const TCHAR *blank = (node != NULL) ? xi.getAttrValue(node, _T("blank")) : NULL;
+ HXML node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar"), 0);
+ const TCHAR *blank = (node != NULL) ? xmlGetAttrValue(node, _T("blank")) : NULL;
if (blank != NULL && mir_tstrcmp(blank, _T("1"))) {
- node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar/timestamp"), 0);
- *avatarts = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
- node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar/bigavatar"), 0); //new gg convention
+ node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/timestamp"), 0);
+ *avatarts = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
+ node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/bigavatar"), 0); //new gg convention
if (node == NULL){
- node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar/originBigAvatar"), 0); //old gg convention
+ node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/originBigAvatar"), 0); //old gg convention
}
- *avatarurl = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
+ *avatarurl = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
}
- xi.destroyNode(hXml);
+ xmlDestroyNode(hXml);
}
mir_free(xmlAction);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index dca61cd88b..efe7df5d0a 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -1153,7 +1153,7 @@ retry:
xmlAction = mir_a2t(e->event.xml_action.data);
tag = mir_a2t("events");
- hXml = xi.parseString(xmlAction, 0, tag);
+ hXml = xmlParseString(xmlAction, 0, tag);
if (hXml != NULL) {
HXML node;
@@ -1161,13 +1161,13 @@ retry:
mir_free(tag);
tag = mir_a2t("event/type");
- node = xi.getChildByPath(hXml, tag, 0);
- type = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
+ node = xmlGetChildByPath(hXml, tag, 0);
+ type = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
mir_free(tag);
tag = mir_a2t("event/sender");
- node = xi.getChildByPath(hXml, tag, 0);
- sender = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
+ node = xmlGetChildByPath(hXml, tag, 0);
+ sender = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
debugLogA("mainthread() (%x): XML Action type: %s.", this, type != NULL ? type : "unknown");
// Avatar change notify
if (type != NULL && !mir_strcmp(type, "28")) {
@@ -1176,7 +1176,7 @@ retry:
}
mir_free(type);
mir_free(sender);
- xi.destroyNode(hXml);
+ xmlDestroyNode(hXml);
}
mir_free(tag);
mir_free(xmlAction);
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 5d673107c0..b5f5c81243 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -41,7 +41,6 @@ PLUGININFOEX pluginInfo = {
// Other variables
HINSTANCE hInstance;
-XML_API xi;
SSL_API si;
CLIST_INTERFACE *pcli;
int hLangpack;
@@ -328,7 +327,6 @@ static int gg_proto_uninit(PROTO_INTERFACE *proto)
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getXI(&xi);
mir_getLP(&pluginInfo);
mir_getCLI();
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp
index 773b3ade25..19c74c0acf 100644
--- a/protocols/Gadu-Gadu/src/oauth.cpp
+++ b/protocols/Gadu-Gadu/src/oauth.cpp
@@ -316,15 +316,15 @@ int GGPROTO::oauth_receivetoken()
nlc = resp->nlc;
if (resp->resultCode == 200 && resp->dataLength > 0 && resp->pData) {
TCHAR *xmlAction = mir_a2t(resp->pData);
- HXML hXml = xi.parseString(xmlAction, 0, _T("result"));
+ HXML hXml = xmlParseString(xmlAction, 0, _T("result"));
if (hXml != NULL) {
- HXML node = xi.getChildByPath(hXml, _T("oauth_token"), 0);
- token = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
+ HXML node = xmlGetChildByPath(hXml, _T("oauth_token"), 0);
+ token = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
- node = xi.getChildByPath(hXml, _T("oauth_token_secret"), 0);
- token_secret = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
+ node = xmlGetChildByPath(hXml, _T("oauth_token_secret"), 0);
+ token_secret = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
- xi.destroyNode(hXml);
+ xmlDestroyNode(hXml);
}
mir_free(xmlAction);
}
@@ -385,15 +385,15 @@ int GGPROTO::oauth_receivetoken()
if (resp) {
if (resp->resultCode == 200 && resp->dataLength > 0 && resp->pData) {
TCHAR *xmlAction = mir_a2t(resp->pData);
- HXML hXml = xi.parseString(xmlAction, 0, _T("result"));
+ HXML hXml = xmlParseString(xmlAction, 0, _T("result"));
if (hXml != NULL) {
- HXML node = xi.getChildByPath(hXml, _T("oauth_token"), 0);
- token = mir_t2a(xi.getText(node));
+ HXML node = xmlGetChildByPath(hXml, _T("oauth_token"), 0);
+ token = mir_t2a(xmlGetText(node));
- node = xi.getChildByPath(hXml, _T("oauth_token_secret"), 0);
- token_secret = mir_t2a(xi.getText(node));
+ node = xmlGetChildByPath(hXml, _T("oauth_token_secret"), 0);
+ token_secret = mir_t2a(xmlGetText(node));
- xi.destroyNode(hXml);
+ xmlDestroyNode(hXml);
}
mir_free(xmlAction);
}