summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/sametime/userlist.h
blob: be674b0e5f00cee2e6c684dbdf0ad6d9b1dc4edc (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
53
54
55
56
57
58
59
#ifndef _USERLIST_INC
#define _USERLIST_INC

#include "common.h"
#include "utils.h"

#include <fstream>
#include <string>
#include <iostream>

#include "clist_util.h"

typedef struct {
	int cbSize;
	char *nick;
	char *firstName;
	char *lastName;
	char *email;
	char reserved[16];

	char name[256];
	char stid[256];
	bool group;

} MYPROTOSEARCHRESULT;

typedef struct {
	size_t nSize;
	int nFieldCount;
	TCHAR ** pszFields;
	MYPROTOSEARCHRESULT psr;
} MYCUSTOMSEARCHRESULTS;

HANDLE FindContactByUserId(const char *id);
bool GetAwareIdFromContact(HANDLE hContact, mwAwareIdBlock *id_block);

int SearchForUser(const char *name);
int GetMoreDetails(const char *name);

int CreateSearchDialog(WPARAM wParam, LPARAM lParam);
int SearchFromDialog(WPARAM wParam, LPARAM lParam);

HANDLE AddSearchedUser(MYPROTOSEARCHRESULT *mpsr, bool temporary);

HANDLE AddContact(mwSametimeUser *user, bool temporary);

void UserListCreate();
void UserListAddStored();
void UserListDestroy();

void ImportContactsFromFile(TCHAR *filename);
void ExportContactsToServer();

void UserRecvAwayMessage(HANDLE hContact);

void InitUserList(mwSession *session);
void DeinitUserList(mwSession *session);

#endif