diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/m_protoint.h | 89 |
1 files changed, 46 insertions, 43 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h index 9c9befbe87..763b9d48ac 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -46,7 +46,7 @@ typedef enum #define PROTOCHAR TCHAR
#define PROTOFILEEVENT PROTORECVFILET
-struct PROTO_INTERFACE : public MZeroedObject
+struct MIR_CORE_EXPORT PROTO_INTERFACE : public MZeroedObject
{
int m_iStatus,
m_iDesiredStatus,
@@ -151,50 +151,53 @@ struct PROTO_INTERFACE : public MZeroedObject //////////////////////////////////////////////////////////////////////////////////////
// Virtual functions
- virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr) = 0;
- virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent) = 0;
-
- virtual int __cdecl Authorize(MEVENT hDbEvent) = 0;
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason) = 0;
- virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*) = 0;
- virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage) = 0;
-
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath) = 0;
- virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer) = 0;
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason) = 0;
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename) = 0;
-
- virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL) = 0;
- virtual int __cdecl GetInfo(MCONTACT hContact, int infoType) = 0;
-
- virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id) = 0;
- virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email) = 0;
- virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName) = 0;
- virtual HWND __cdecl SearchAdvanced(HWND owner) = 0;
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner) = 0;
-
- virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*) = 0;
- virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*) = 0;
- virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*) = 0;
- virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*) = 0;
-
- virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) = 0;
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles) = 0;
- virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg) = 0;
- virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url) = 0;
-
- virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode) = 0;
- virtual int __cdecl SetStatus(int iNewStatus) = 0;
-
- virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact) = 0;
- virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt) = 0;
- virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg) = 0;
-
- virtual int __cdecl UserIsTyping(MCONTACT hContact, int type) = 0;
-
- virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) = 0;
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent);
+
+ virtual int __cdecl Authorize(MEVENT hDbEvent);
+ virtual int __cdecl AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
+
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
+
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
+
+ virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
+ virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
+
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
+
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url);
+
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
+
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
+
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
+
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam);
};
+/////////////////////////////////////////////////////////////////////////////////////////
+// Basic class for all protocols written in C++
+
template<class T> class PROTO : public PROTO_INTERFACE
{
|