diff options
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_api.cpp | 2 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_opt.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.h | 3 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp index 8d9e0a5a03..49b36cbb2a 100644 --- a/protocols/JabberG/src/jabber_api.cpp +++ b/protocols/JabberG/src/jabber_api.cpp @@ -353,7 +353,7 @@ LPTSTR CJabberProto::GetResourceFeatures(LPCTSTR jid) return str;
}
-HANDLE CJabberProto::GetHandle()
+HNETLIBUSER CJabberProto::GetHandle()
{
return m_hNetlibUser;
}
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 844436fc45..a604cd30fa 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -726,7 +726,7 @@ private: request.flags = NLHRF_REDIRECT | NLHRF_HTTP11;
request.szUrl = JABBER_SERVER_URL;
- NETLIBHTTPREQUEST *result = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)wnd->GetProto()->m_hNetlibUser, (LPARAM)&request);
+ NETLIBHTTPREQUEST *result = Netlib_HttpTransaction(wnd->GetProto()->m_hNetlibUser, &request);
if (result) {
if (result->resultCode == 200 && result->dataLength && result->pData) {
wchar_t *buf = mir_a2u(result->pData);
@@ -738,7 +738,7 @@ private: }
mir_free(buf);
}
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)result);
+ Netlib_FreeHttpRequest(result);
}
if (bIsError)
@@ -2188,7 +2188,7 @@ void CJabberDlgAccMgrUI::QueryServerListThread(void *arg) request.flags = NLHRF_HTTP11;
request.szUrl = JABBER_SERVER_URL;
- NETLIBHTTPREQUEST *result = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)wnd->GetProto()->m_hNetlibUser, (LPARAM)&request);
+ NETLIBHTTPREQUEST *result = Netlib_HttpTransaction(wnd->GetProto()->m_hNetlibUser, &request);
if (result && IsWindow(hwnd)) {
if ((result->resultCode == 200) && result->dataLength && result->pData) {
wchar_t *ptszText = mir_a2u(result->pData);
@@ -2205,7 +2205,7 @@ void CJabberDlgAccMgrUI::QueryServerListThread(void *arg) }
if (result)
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)result);
+ Netlib_FreeHttpRequest(result);
if (bIsError)
SendMessage(hwnd, WM_JABBER_REFRESH, 0, 0);
}
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index e9f721af67..9eb9640ea6 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -849,7 +849,8 @@ public: int STDMETHODCALLTYPE AddFeatures(LPCTSTR szFeatures); // Adds features to the list of features returned by the client.
int STDMETHODCALLTYPE RemoveFeatures(LPCTSTR szFeatures); // Removes features from the list of features returned by the client.
LPTSTR STDMETHODCALLTYPE GetResourceFeatures(LPCTSTR jid); // Returns all features supported by JID in format "feature1\0feature2\0...\0featureN\0\0". You must free returned string using mir_free().
- HANDLE STDMETHODCALLTYPE GetHandle(); // Returns connection handle
+
+ HNETLIBUSER STDMETHODCALLTYPE GetHandle(); // Returns connection handle
private:
JabberFeatCapPairDynamic *FindFeature(LPCTSTR szFeature);
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 54dc784587..4820aafc0d 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -898,7 +898,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) nlhr.szUrl = avs[i].Url;
nlhr.nlc = hHttpCon;
- NETLIBHTTPREQUEST * res = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&nlhr);
+ NETLIBHTTPREQUEST * res = Netlib_HttpTransaction(m_hNetlibUser, &nlhr);
if (res) {
hHttpCon = res->nlc;
if (res->resultCode == 200 && res->dataLength) {
@@ -941,7 +941,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) }
}
}
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)res);
+ Netlib_FreeHttpRequest(res);
}
else hHttpCon = NULL;
}
|