From 139c2c1a61d9f765704a2001199c2712d6587fb4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 23 Feb 2013 18:31:16 +0000 Subject: old C proto interface removed git-svn-id: http://svn.miranda-ng.org/main/trunk@3738 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_protocols.h | 10 +++++---- include/m_protoint.h | 62 ++------------------------------------------------- 2 files changed, 8 insertions(+), 64 deletions(-) (limited to 'include') 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__ -- cgit v1.2.3