From 9f974ab8617b6b7c19bac9e71d06de89d7e7bd03 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 19 Sep 2016 14:17:59 +0000 Subject: - struct GCSESSION died; - Chat_NewSession simply gets 5 parameters; - minor chat code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@17318 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_chat.h | 27 ++++++++------------------- include/m_chat_int.h | 2 -- 2 files changed, 8 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/m_chat.h b/include/m_chat.h index c94b2fa26d..479b44ceee 100644 --- a/include/m_chat.h +++ b/include/m_chat.h @@ -137,9 +137,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define GC_FONTSIZE 0x0200 // enable font size selection // Error messages -#define GC_REGISTER_ERROR 2 // An internal error occurred. Registration failed. -#define GC_REGISTER_NOUNICODE 3 // MS_GC_REGISTER returns this error if the Unicode version of chat - // is not installed and GC_UNICODE is set. Registration failed +#define GC_ERROR 1 // An internal error occurred. // GCREGISTER struct struct GCREGISTER @@ -175,22 +173,13 @@ EXTERN_C MIR_APP_DLL(int) Chat_Register(const GCREGISTER*); #define GCW_PRIVMESS 3 // NOT SUPPORTED YET! the session is a 1 to 1 session, but with additional // support for adding more users etc. ex "MSN session". -// Error messages -#define GC_NEWSESSION_ERROR 2 // An internal error occurred. - -// GCSESSION structure -struct GCSESSION -{ - const char *pszModule; // The name of the protocol owning the session (the same as pszModule when you register) - const wchar_t *ptszName; // The name of the session as it will be displayed to the user - const wchar_t *ptszID; // The unique identifier for the session. - const wchar_t *ptszStatusbarText; // Optional text to set in the statusbar of the chat room window, or NULL. - int iType; // Use one of the GCW_* flags above to set the type of session - DWORD dwFlags; - void *pItemData; // Set user defined data for this session. Retrieve it by using the Chat_GetUserInfo() call -}; - -EXTERN_C MIR_APP_DLL(int) Chat_NewSession(const GCSESSION *); +EXTERN_C MIR_APP_DLL(int) Chat_NewSession( + int iType, // Use one of the GCW_* flags above to set the type of session + const char *pszModule, // The name of the protocol owning the session (the same as pszModule when you register) + const wchar_t *ptszID, // The unique identifier for the session. + const wchar_t *ptszName, // The name of the session as it will be displayed to the user + void *pItemData = NULL // Set user defined data for this session. Retrieve it by using the Chat_GetUserInfo() call +); /* Step 3 -- SEND an EVENT -- diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 6aa36ebfd4..eccd2318b8 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -209,7 +209,6 @@ struct GCSessionInfoBase WORD wState; WORD wCommandsNum; void *pItemData; - DWORD dwFlags; MCONTACT hContact; HWND hwndStatus; time_t LastTime; @@ -347,7 +346,6 @@ struct CHAT_MANAGER BOOL (*LM_TrimLog)(LOGINFO **ppLogListStart, LOGINFO **ppLogListEnd, int iCount); BOOL (*LM_RemoveAll)(LOGINFO **ppLogListStart, LOGINFO **ppLogListEnd); - MCONTACT (*AddRoom)(const char *pszModule, const wchar_t *pszRoom, const wchar_t *pszDisplayName, int iType); BOOL (*SetOffline)(MCONTACT hContact, BOOL bHide); BOOL (*SetAllOffline)(BOOL bHide, const char *pszModule); BOOL (*AddEvent)(MCONTACT hContact, HICON hIcon, MEVENT hEvent, int type, wchar_t* fmt, ...); -- cgit v1.2.3