summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic/src/gchat.h
blob: 82648c3e200ef5a8525dcabd782a4ffb8149e872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// m_chat users these BaseTSD types, so if we are compiling with an old PSDK, these typedefs
// are not there, so better define them, just in case...
#ifndef LongToPtr
#define DWORD_PTR DWORD
#endif

#pragma warning (push)
#pragma warning (disable: 4201) // nonstandard extension used : nameless struct/union
#include <m_chat.h>
#pragma warning (pop)

#define MAX_BUF 256    // Buffer for topic-string

// In case this you compile for Miranda NG with a non-Tchar aware Groupchat plugin, null the flag out
#ifndef GC_TCHAR
#define GC_TCHAR 0
#endif

typedef struct {
	MCONTACT hContact;
	TCHAR who[33];
	TCHAR szRole[12];
} gchat_contact;

typedef struct {
	TCHAR*		   szChatName;		 // name of chat session
	gchat_contact* mJoinedContacts;  //	contacts
	int            mJoinedCount;     // contacts count
} gchat_contacts;

int ChatInit(WPARAM, LPARAM);
int  __cdecl ChatStart(char *szChatId, BOOL bJustCreate);
gchat_contacts *GetChat(LPCTSTR szChatId);
MCONTACT find_chat(LPCTSTR chatname);
#ifdef _UNICODE
MCONTACT find_chatA(char *chatname);
#else
#define find_chatA find_chat
#endif
void RemChatContact(gchat_contacts*, const TCHAR*);
gchat_contact *GetChatContact(gchat_contacts *gc, const TCHAR *who);
int AddMembers(char*);
void AddMembersThread(char *szSkypeMsg);
void RemChat(TCHAR *szChatId);
int GCEventHook (WPARAM, LPARAM);
int GCMenuHook (WPARAM, LPARAM);
void KillChatSession(GCDEST*);
INT_PTR GCOnLeaveChat(WPARAM wParam,LPARAM lParam);
INT_PTR GCOnJoinChat(WPARAM wParam,LPARAM lParam);
void GCInit(void);
void GCExit(void);
void SetChatTopic (TCHAR *szChatId, TCHAR *szTopic, BOOL bSet);