summaryrefslogtreecommitdiff
path: root/include/m_jabber.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_jabber.h')
-rw-r--r--include/m_jabber.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/include/m_jabber.h b/include/m_jabber.h
index 33a451f086..fdb865ec6b 100644
--- a/include/m_jabber.h
+++ b/include/m_jabber.h
@@ -76,12 +76,12 @@ enum
struct JABBER_DISCO_FIELD
{
- LPCTSTR category, type, name;
+ LPCSTR category, type, name;
};
typedef void* HJHANDLER;
-typedef BOOL (*JABBER_HANDLER_FUNC)(struct IJabberInterface *ji, HXML node, void *pUserData);
+typedef BOOL (*JABBER_HANDLER_FUNC)(struct IJabberInterface *ji, const TiXmlElement *node, void *pUserData);
// IJabberInterface::dwFlags values
enum
@@ -102,16 +102,16 @@ struct IJabberInterface
virtual DWORD STDMETHODCALLTYPE GetJabberVersion() const = 0;
// Returns contact handle for given JID, or NULL on error.
- virtual MCONTACT STDMETHODCALLTYPE ContactFromJID(LPCTSTR jid) = 0;
+ virtual MCONTACT STDMETHODCALLTYPE ContactFromJID(LPCSTR jid) = 0;
// Returns JID of hContact, or NULL on error. You must free the result using mir_free().
- virtual LPTSTR STDMETHODCALLTYPE ContactToJID(MCONTACT hContact) = 0;
+ virtual char* STDMETHODCALLTYPE ContactToJID(MCONTACT hContact) = 0;
// Returns best resource name for given JID, or NULL on error. You must free the result using mir_free().
- virtual LPTSTR STDMETHODCALLTYPE GetBestResourceName(LPCTSTR jid) = 0;
+ virtual char* STDMETHODCALLTYPE GetBestResourceName(LPCSTR jid) = 0;
// Returns all resource names for a given JID in format "resource1\0resource2\0resource3\0\0" (all resources are separated by \0 character and the whole string is terminated with two \0 characters), or NULL on error. You must free returned string using mir_free().
- virtual LPTSTR STDMETHODCALLTYPE GetResourceList(LPCTSTR jid) = 0;
+ virtual char* STDMETHODCALLTYPE GetResourceList(LPCSTR jid) = 0;
// Returns Jabber module name. DO NOT free the returned string.
virtual char* STDMETHODCALLTYPE GetModuleName() const = 0;
@@ -119,18 +119,15 @@ struct IJabberInterface
// Returns id that can be used for next message sent through SendXmlNode().
virtual int STDMETHODCALLTYPE SerialNext() = 0;
- // Sends XML node.
- virtual int STDMETHODCALLTYPE SendXmlNode(HXML node) = 0;
-
// Registers incoming <presence/> handler. Returns handler handle on success or NULL on error.
virtual HJHANDLER STDMETHODCALLTYPE AddPresenceHandler(JABBER_HANDLER_FUNC Func, void *pUserData = nullptr, int iPriority = JH_PRIORITY_DEFAULT) = 0;
// Registers incoming <message/> handler for messages of types specified by iMsgTypes. iMsgTypes is a combination of JABBER_MESSAGE_TYPE_* flags. Returns handler handle on success or NULL on error.
- virtual HJHANDLER STDMETHODCALLTYPE AddMessageHandler(JABBER_HANDLER_FUNC Func, int iMsgTypes, LPCTSTR szXmlns, LPCTSTR szTag, void *pUserData = nullptr, int iPriority = JH_PRIORITY_DEFAULT) = 0;
+ virtual HJHANDLER STDMETHODCALLTYPE AddMessageHandler(JABBER_HANDLER_FUNC Func, int iMsgTypes, LPCSTR szXmlns, LPCSTR szTag, void *pUserData = nullptr, int iPriority = JH_PRIORITY_DEFAULT) = 0;
// Registers incoming <iq/> handler. iIqTypes is a combination of JABBER_IQ_TYPE_* flags. Returns handler handle on success or NULL on error.
- virtual HJHANDLER STDMETHODCALLTYPE AddIqHandler(JABBER_HANDLER_FUNC Func, int iIqTypes, LPCTSTR szXmlns, LPCTSTR szTag, void *pUserData = nullptr, int iPriority = JH_PRIORITY_DEFAULT) = 0;
+ virtual HJHANDLER STDMETHODCALLTYPE AddIqHandler(JABBER_HANDLER_FUNC Func, int iIqTypes, LPCSTR szXmlns, LPCSTR szTag, void *pUserData = nullptr, int iPriority = JH_PRIORITY_DEFAULT) = 0;
// Registers temporary handler for incoming <iq/> stanza of type iIqType with id iIqId. iIqTypes is a combination of JABBER_IQ_TYPE_* flags. Returns handler handle on success or NULL on error.
// If dwTimeout milliseconds pass and no Iq stanza with the specified iIqId is received, Jabber plugin will call Func() with NULL node.
@@ -145,16 +142,16 @@ struct IJabberInterface
// Entity capabilities support (see xep-0115)
// Registers feature so that it's displayed with proper description in other users' details. Call this function in your ME_SYSTEM_MODULESLOADED handler. Returns TRUE on success or FALSE on error.
- virtual int STDMETHODCALLTYPE RegisterFeature(LPCTSTR szFeature, LPCTSTR szDescription) = 0;
+ virtual int STDMETHODCALLTYPE RegisterFeature(LPCSTR szFeature, LPCSTR szDescription) = 0;
// Adds features to the list of features supported by the client. szFeatures is a list of features separated by \0 character and terminated with two \0 characters. You can call this function at any time. Returns TRUE on success or FALSE on error.
- virtual int STDMETHODCALLTYPE AddFeatures(LPCTSTR szFeatures) = 0;
+ virtual int STDMETHODCALLTYPE AddFeatures(LPCSTR szFeatures) = 0;
// Removes features from the list of features supported by the client. szFeatures is a list of features separated by \0 character and terminated with two \0 characters. You can call this function at any time.
- virtual int STDMETHODCALLTYPE RemoveFeatures(LPCTSTR szFeatures) = 0;
+ virtual int STDMETHODCALLTYPE RemoveFeatures(LPCSTR szFeatures) = 0;
// Returns features supported by JID in format "feature1\0feature2\0...\0featureN\0\0" (a list of features separated by \0 character and terminated with two \0 characters), or NULL on error. JID may contain resource name to get features of a specific resource. If there's no resource name, GetResourceFeatures() returns features for the same resource as IJabberSysInterface::GetBestResourceName() returns. If a feature you're checking for is not supported by Jabber plugin natively, you must register it with RegisterFeature(), otherwise GetContactFeatures() won't be able to return it. You must free returned string using mir_free().
- virtual LPTSTR STDMETHODCALLTYPE GetResourceFeatures(LPCTSTR jid) = 0;
+ virtual char* STDMETHODCALLTYPE GetResourceFeatures(LPCSTR jid) = 0;
// Returns the connection handle
virtual HNETLIBUSER STDMETHODCALLTYPE GetHandle(void) = 0;