summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_protocols.h10
-rw-r--r--include/m_protoint.h62
-rw-r--r--protocols/JabberG/src/ui_utils.h2
-rw-r--r--src/modules/protocols/protoaccs.cpp10
4 files changed, 14 insertions, 70 deletions
diff --git a/include/m_protocols.h b/include/m_protocols.h
index 5c5e676539..483d581401 100644
--- a/include/m_protocols.h
+++ b/include/m_protocols.h
@@ -26,6 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_PROTOCOLS_H__
#define M_PROTOCOLS_H__ 1
+struct PROTO_INTERFACE;
+
#include "statusmodes.h"
//send a general request through the protocol chain for a contact
@@ -173,13 +175,13 @@ PROTOFILETRANSFERSTATUS;
#define PROTOCOLDESCRIPTOR_V3_SIZE (sizeof(size_t)+sizeof(INT_PTR)+sizeof(char*))
// initializes an empty account
-typedef struct tagPROTO_INTERFACE* (*pfnInitProto)(const char* szModuleName, const TCHAR* szUserName);
+typedef struct PROTO_INTERFACE* (*pfnInitProto)(const char* szModuleName, const TCHAR* szUserName);
// deallocates an account instance
-typedef int (*pfnUninitProto)(struct tagPROTO_INTERFACE*);
+typedef int (*pfnUninitProto)(PROTO_INTERFACE*);
// removes an account from the database
-typedef int (*pfnDestroyProto)(struct tagPROTO_INTERFACE*);
+typedef int (*pfnDestroyProto)(PROTO_INTERFACE*);
typedef struct {
size_t cbSize;
@@ -282,7 +284,7 @@ typedef struct tagACCOUNT
int bIsVisible; // is account visible?
int iOrder; // account order in various menus & lists
BOOL bOldProto; // old-styled account (one instance per dll)
- struct tagPROTO_INTERFACE* ppro; // pointer to the underlying object
+ PROTO_INTERFACE *ppro; // pointer to the underlying object
HWND hwndAccMgrUI;
BOOL bAccMgrUIChanged;
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 6e5bbcbd2f..2e412e759c 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -41,65 +41,8 @@ typedef enum
#define PROTOCHAR TCHAR
#define PROTOFILEEVENT PROTORECVFILET
-#ifndef __cplusplus
-typedef struct tagPROTO_INTERFACE_VTBL
+struct PROTO_INTERFACE
{
- HANDLE (*AddToList)(struct tagPROTO_INTERFACE*, int flags, PROTOSEARCHRESULT* psr);
- HANDLE (*AddToListByEvent)(struct tagPROTO_INTERFACE*, int flags, int iContact, HANDLE hDbEvent);
-
- int (*Authorize)(struct tagPROTO_INTERFACE*, HANDLE hContact);
- int (*AuthDeny)(struct tagPROTO_INTERFACE*, HANDLE hContact, const TCHAR* szReason);
- int (*AuthRecv)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT*);
- int (*AuthRequest)(struct tagPROTO_INTERFACE*, HANDLE hContact, const TCHAR* szMessage);
-
- HANDLE (*ChangeInfo)(struct tagPROTO_INTERFACE*, int iInfoType, void* pInfoData);
-
- HANDLE (*FileAllow)(struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
- int (*FileCancel)(struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer);
- int (*FileDeny)(struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
- int (*FileResume)(struct tagPROTO_INTERFACE*, HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
-
- DWORD_PTR (*GetCaps)(struct tagPROTO_INTERFACE*, int type, HANDLE hContact);
- HICON (*GetIcon)(struct tagPROTO_INTERFACE*, int iconIndex);
- int (*GetInfo)(struct tagPROTO_INTERFACE*, HANDLE hContact, int infoType);
-
- HANDLE (*SearchBasic)(struct tagPROTO_INTERFACE*, const PROTOCHAR* id);
- HANDLE (*SearchByEmail)(struct tagPROTO_INTERFACE*, const PROTOCHAR* email);
- HANDLE (*SearchByName)(struct tagPROTO_INTERFACE*, const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
- HWND (*SearchAdvanced)(struct tagPROTO_INTERFACE*, HWND owner);
- HWND (*CreateExtendedSearchUI)(struct tagPROTO_INTERFACE*, HWND owner);
-
- int (*RecvContacts)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT*);
- int (*RecvFile)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTOFILEEVENT*);
- int (*RecvMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT*);
- int (*RecvUrl)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT*);
-
- int (*SendContacts)(struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList);
- HANDLE (*SendFile)(struct tagPROTO_INTERFACE*, HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
- int (*SendMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, const char* msg);
- int (*SendUrl)(struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, const char* url);
-
- int (*SetApparentMode)(struct tagPROTO_INTERFACE*, HANDLE hContact, int mode);
- int (*SetStatus)(struct tagPROTO_INTERFACE*, int iNewStatus);
-
- HANDLE (*GetAwayMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact);
- int (*RecvAwayMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact, int mode, PROTORECVEVENT* evt);
- int (*SendAwayMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hProcess, const char* msg);
- int (*SetAwayMsg)(struct tagPROTO_INTERFACE*, int iStatus, const PROTOCHAR* msg);
-
- int (*UserIsTyping)(struct tagPROTO_INTERFACE*, HANDLE hContact, int type);
-
- int (*OnEvent)(struct tagPROTO_INTERFACE*, PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam);
-}
- PROTO_INTERFACE_VTBL;
-#endif
-
-typedef struct tagPROTO_INTERFACE
-{
- #ifndef __cplusplus
- PROTO_INTERFACE_VTBL* vtbl;
- #endif
-
int m_iStatus,
m_iDesiredStatus,
m_iXStatus,
@@ -156,7 +99,6 @@ typedef struct tagPROTO_INTERFACE
virtual int __cdecl UserIsTyping(HANDLE hContact, int type) = 0;
virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) = 0;
-}
- PROTO_INTERFACE;
+};
#endif // M_PROTOINT_H__
diff --git a/protocols/JabberG/src/ui_utils.h b/protocols/JabberG/src/ui_utils.h
index 64e33bf1c7..d85d82cb25 100644
--- a/protocols/JabberG/src/ui_utils.h
+++ b/protocols/JabberG/src/ui_utils.h
@@ -1211,7 +1211,7 @@ public:
#define WM_PROTO_ACTIVATE (WM_USER + 102)
#define WM_PROTO_LAST (WM_USER + 200)
-typedef struct tagPROTO_INTERFACE PROTO_INTERFACE;
+struct PROTO_INTERFACE;
class CProtoIntDlgBase : public CDlgBase
{
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index bafe19b7f4..5746d452c6 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -488,17 +488,17 @@ BOOL ActivateAccount(PROTOACCOUNT* pa)
struct DeactivationThreadParam
{
- tagPROTO_INTERFACE* ppro;
- pfnUninitProto fnUninit;
- bool bIsDynamic;
- bool bErase;
+ PROTO_INTERFACE *ppro;
+ pfnUninitProto fnUninit;
+ bool bIsDynamic;
+ bool bErase;
};
pfnUninitProto GetProtocolDestructor(char* szProto);
static int DeactivationThread(DeactivationThreadParam* param)
{
- tagPROTO_INTERFACE* p = (tagPROTO_INTERFACE*)param->ppro;
+ PROTO_INTERFACE* p = (PROTO_INTERFACE*)param->ppro;
p->SetStatus(ID_STATUS_OFFLINE);
char * szModuleName = NEWSTR_ALLOCA(p->m_szModuleName);