summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-24 19:50:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-24 19:50:44 +0000
commitf6de1e36aeeeb662a04e3287b3929a07384bf510 (patch)
treede89ca1a736fe457d805d36062513427088bbf7a /include
parent3fed56c332215dd3a753d2fc0b31616c1b270a51 (diff)
- IJabberNetInterface::GetHandle() method added to retrieve a network handle;
- another major clutch removed from GTalkExt; - version.rc added; - bunch of crap removed; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@4177 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/m_jabber.h77
1 files changed, 40 insertions, 37 deletions
diff --git a/include/m_jabber.h b/include/m_jabber.h
index 8b5b456ace..d39bc143f7 100644
--- a/include/m_jabber.h
+++ b/include/m_jabber.h
@@ -34,10 +34,10 @@ struct IJabberInterface;
struct IJabberSysInterface
{
// Returns version of IJabberSysInterface.
- virtual int STDMETHODCALLTYPE GetVersion() const = 0;
+ virtual int STDMETHODCALLTYPE GetVersion() const = 0;
// Compares JIDs by their node@domain part (without resource name).
- virtual int STDMETHODCALLTYPE CompareJIDs(LPCTSTR jid1, LPCTSTR jid2) = 0;
+ virtual int STDMETHODCALLTYPE CompareJIDs(LPCTSTR jid1, LPCTSTR jid2) = 0;
// Returns contact handle for given JID, or NULL on error.
virtual HANDLE STDMETHODCALLTYPE ContactFromJID(LPCTSTR jid) = 0;
@@ -52,34 +52,34 @@ struct IJabberSysInterface
virtual LPTSTR STDMETHODCALLTYPE GetResourceList(LPCTSTR jid) = 0;
// Returns Jabber module name. DO NOT free the returned string.
- virtual char* STDMETHODCALLTYPE GetModuleName() const = 0;
+ virtual char* STDMETHODCALLTYPE GetModuleName() const = 0;
};
// Iq type flags
enum
{
- JABBER_IQ_TYPE_FAIL = 0,
- JABBER_IQ_TYPE_RESULT = 1,
- JABBER_IQ_TYPE_ERROR = 2,
- JABBER_IQ_TYPE_GET = 4,
- JABBER_IQ_TYPE_SET = 8,
-
- JABBER_IQ_TYPE_RESULT_ERROR = JABBER_IQ_TYPE_RESULT | JABBER_IQ_TYPE_ERROR,
- JABBER_IQ_TYPE_GOOD = JABBER_IQ_TYPE_RESULT | JABBER_IQ_TYPE_GET | JABBER_IQ_TYPE_SET,
- JABBER_IQ_TYPE_ANY = JABBER_IQ_TYPE_RESULT | JABBER_IQ_TYPE_ERROR | JABBER_IQ_TYPE_GET | JABBER_IQ_TYPE_SET
+ JABBER_IQ_TYPE_FAIL = 0,
+ JABBER_IQ_TYPE_RESULT = 1,
+ JABBER_IQ_TYPE_ERROR = 2,
+ JABBER_IQ_TYPE_GET = 4,
+ JABBER_IQ_TYPE_SET = 8,
+
+ JABBER_IQ_TYPE_RESULT_ERROR = JABBER_IQ_TYPE_RESULT | JABBER_IQ_TYPE_ERROR,
+ JABBER_IQ_TYPE_GOOD = JABBER_IQ_TYPE_RESULT | JABBER_IQ_TYPE_GET | JABBER_IQ_TYPE_SET,
+ JABBER_IQ_TYPE_ANY = JABBER_IQ_TYPE_RESULT | JABBER_IQ_TYPE_ERROR | JABBER_IQ_TYPE_GET | JABBER_IQ_TYPE_SET
};
// Message type flags
enum
{
- JABBER_MESSAGE_TYPE_FAIL = 0,
- JABBER_MESSAGE_TYPE_NORMAL = 1,
- JABBER_MESSAGE_TYPE_ERROR = 2,
- JABBER_MESSAGE_TYPE_CHAT = 4,
- JABBER_MESSAGE_TYPE_GROUPCHAT = 8,
- JABBER_MESSAGE_TYPE_HEADLINE = 0x10,
-
- JABBER_MESSAGE_TYPE_ANY = JABBER_MESSAGE_TYPE_NORMAL | JABBER_MESSAGE_TYPE_ERROR | JABBER_MESSAGE_TYPE_CHAT | JABBER_MESSAGE_TYPE_GROUPCHAT | JABBER_MESSAGE_TYPE_HEADLINE
+ JABBER_MESSAGE_TYPE_FAIL = 0,
+ JABBER_MESSAGE_TYPE_NORMAL = 1,
+ JABBER_MESSAGE_TYPE_ERROR = 2,
+ JABBER_MESSAGE_TYPE_CHAT = 4,
+ JABBER_MESSAGE_TYPE_GROUPCHAT = 8,
+ JABBER_MESSAGE_TYPE_HEADLINE = 0x10,
+
+ JABBER_MESSAGE_TYPE_ANY = JABBER_MESSAGE_TYPE_NORMAL | JABBER_MESSAGE_TYPE_ERROR | JABBER_MESSAGE_TYPE_CHAT | JABBER_MESSAGE_TYPE_GROUPCHAT | JABBER_MESSAGE_TYPE_HEADLINE
};
// Handler priority values.
@@ -105,48 +105,51 @@ typedef BOOL (*JABBER_HANDLER_FUNC)(IJabberInterface *ji, HXML node, void *pUser
struct IJabberNetInterface
{
// Returns version of IJabberNetInterface.
- virtual int STDMETHODCALLTYPE GetVersion() const = 0;
+ virtual int STDMETHODCALLTYPE GetVersion() const = 0;
// Returns id that can be used for next message sent through SendXmlNode().
virtual unsigned int STDMETHODCALLTYPE SerialNext() = 0;
// Sends XML node.
- virtual int STDMETHODCALLTYPE SendXmlNode(HXML node) = 0;
+ 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 = NULL, int iPriority = JH_PRIORITY_DEFAULT) = 0;
+ virtual HJHANDLER STDMETHODCALLTYPE AddPresenceHandler(JABBER_HANDLER_FUNC Func, void *pUserData = NULL, 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 = NULL, int iPriority = JH_PRIORITY_DEFAULT) = 0;
+ virtual HJHANDLER STDMETHODCALLTYPE AddMessageHandler(JABBER_HANDLER_FUNC Func, int iMsgTypes, LPCTSTR szXmlns, LPCTSTR szTag, void *pUserData = NULL, 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 = NULL, int iPriority = JH_PRIORITY_DEFAULT) = 0;
+ virtual HJHANDLER STDMETHODCALLTYPE AddIqHandler(JABBER_HANDLER_FUNC Func, int iIqTypes, LPCTSTR szXmlns, LPCTSTR szTag, void *pUserData = NULL, 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.
- virtual HJHANDLER STDMETHODCALLTYPE AddTemporaryIqHandler(JABBER_HANDLER_FUNC Func, int iIqTypes, int iIqId, void *pUserData = NULL, DWORD dwTimeout = 30000, int iPriority = JH_PRIORITY_DEFAULT) = 0;
+ virtual HJHANDLER STDMETHODCALLTYPE AddTemporaryIqHandler(JABBER_HANDLER_FUNC Func, int iIqTypes, int iIqId, void *pUserData = NULL, DWORD dwTimeout = 30000, int iPriority = JH_PRIORITY_DEFAULT) = 0;
// Registers handler for outgoing nodes. Returns handler handle on success or NULL on error.
// Return FALSE in the handler to continue, or TRUE to abort sending.
- virtual HJHANDLER STDMETHODCALLTYPE AddSendHandler(JABBER_HANDLER_FUNC Func, void *pUserData = NULL, int iPriority = JH_PRIORITY_DEFAULT) = 0;
+ virtual HJHANDLER STDMETHODCALLTYPE AddSendHandler(JABBER_HANDLER_FUNC Func, void *pUserData = NULL, int iPriority = JH_PRIORITY_DEFAULT) = 0;
// Unregisters handler by its handle.
- virtual int STDMETHODCALLTYPE RemoveHandler(HJHANDLER hHandler) = 0;
+ virtual int STDMETHODCALLTYPE RemoveHandler(HJHANDLER hHandler) = 0;
// 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(LPCTSTR szFeature, LPCTSTR 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(LPCTSTR 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(LPCTSTR 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 LPTSTR STDMETHODCALLTYPE GetResourceFeatures(LPCTSTR jid) = 0;
+
+ // Returns the connection handle
+ virtual HANDLE STDMETHODCALLTYPE GetHandle(void) = 0;
};
// IJabberInterface::dwFlags values
@@ -159,19 +162,19 @@ enum
struct IJabberInterface
{
// Set of JIF_* flags.
- virtual DWORD STDMETHODCALLTYPE GetFlags() const = 0;
+ virtual DWORD STDMETHODCALLTYPE GetFlags() const = 0;
// Returns version of IJabberInterface.
- virtual int STDMETHODCALLTYPE GetVersion() const = 0;
+ virtual int STDMETHODCALLTYPE GetVersion() const = 0;
// Returns Jabber plugin version.
- virtual DWORD STDMETHODCALLTYPE GetJabberVersion() const = 0;
+ virtual DWORD STDMETHODCALLTYPE GetJabberVersion() const = 0;
// Jabber system utilities.
- virtual IJabberSysInterface* STDMETHODCALLTYPE Sys() const = 0;
+ virtual IJabberSysInterface* STDMETHODCALLTYPE Sys() const = 0;
// Jabber network interface.
- virtual IJabberNetInterface* STDMETHODCALLTYPE Net() const = 0;
+ virtual IJabberNetInterface* STDMETHODCALLTYPE Net() const = 0;
};
/*