summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/IMO2sProxy/src/imo2skype/buddylist.h
blob: 3774ef3e5ee294cfc777281e0eccb64e95c77569 (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
#include "cJSON.h"
#include "memlist.h"

struct tag_nickentry;
typedef struct tag_nickentry NICKENTRY;

struct tag_nickentry
{
	char *pszUser;
	char *pszStatusText;
	char szStatus[16];
	char *pszAlias;
	char *pszDisplay;		// Display name, on Groupchat it is topic
	int  iBuddyStatus;
	TYP_LIST *hGCMembers;	// List of groupchat members, if this is a groupchat
	NICKENTRY *pGroup;		// Uplink to Chatgroup, if Groupchat-Member
};

TYP_LIST *BuddyList_Init(void);
void BuddyList_Exit(TYP_LIST *hList);

BOOL BuddyList_Insert(TYP_LIST *hList, cJSON *pNick);
BOOL BuddyList_AddTemporaryUser(TYP_LIST *hList, char *pszUser);
BOOL BuddyList_Remove(TYP_LIST *hList, NICKENTRY *pEntry);
NICKENTRY *BuddyList_Find(TYP_LIST *hList, char *pszUser);
BOOL BuddyList_SetStatus(TYP_LIST *hList, cJSON *pNick);
void BuddyList_FreeEntry(NICKENTRY *pEntry, BOOL bFreeGC);
#define BuddyList_IsGroupchat(pEntry) (pEntry->hGCMembers!=NULL)