summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic/src/skypeapi.h
blob: 0d3f661dcbcfd6e2d756936eeda91e5fa4908977 (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
60
61
62
63
64
65
66
67
68
69
// Skype API defines
#define SKYPECONTROLAPI_ATTACH_SUCCESS 0
#define SKYPECONTROLAPI_ATTACH_PENDING_AUTHORIZATION 1
#define SKYPECONTROLAPI_ATTACH_REFUSED 2
#define SKYPECONTROLAPI_ATTACH_NOT_AVAILABLE 3
#define SKYPECONTROLAPI_ATTACH_API_AVAILABLE 0x8001

#define MISC_ERROR 1
#define USER_NOT_FOUND 2
#define USER_NOT_ONLINE 3
#define USER_BLOCKED 4
#define TYPE_UNSUPPORTED 5
#define SENDER_NOT_FRIEND 6
#define SENDER_NOT_AUTHORIZED 7

#define MAX_ENTRIES 128		// Max. 128 number-Entries in Dial-dlg.

typedef struct {
	int id;
	char *szStat;
} status_map;

// Prototypes
int SkypeMsgInit(void);
int SkypeMsgAdd(char *msg);
void SkypeMsgCleanup(void);
char *SkypeMsgGet(void);
int SkypeSend(char*, ...);
char *SkypeRcv(char *what, DWORD maxwait);
char *SkypeRcvTime(char *what, time_t st, DWORD maxwait);
char *SkypeRcvMsg(char *what, time_t st, HCONTACT hContact, DWORD maxwait);
INT_PTR SkypeCall(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeCallHangup(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeOutCall(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeHup(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeHoldCall(WPARAM wParam, LPARAM lParam);
void SkypeFlush(void);
int SkypeStatusToMiranda(char *s);
char *MirandaStatusToSkype(int id);
char *GetSkypeErrorMsg(char *str);
BOOL testfor(char *what, DWORD maxwait);
int ConnectToSkypeAPI(char *path, BOOL  bStart);
int CloseSkypeAPI(char *skypePath);
INT_PTR SkypeAdduserDlg(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeAnswerCall(WPARAM wParam, LPARAM lParam);
int SkypeMsgCollectGarbage(time_t age);
INT_PTR SkypeSendFile(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeSetAvatar(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeSetAwayMessage(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeSetAwayMessageW(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeSetNick(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeChatCreate(WPARAM wParam, LPARAM lParam);
int SkypeSetProfile(char *szProperty, char *szValue);
char *SkypeGet(char *szWhat, char *szWho, char *szProperty);
char *SkypeGetID(char *szWhat, char *szWho, char *szProperty);
char *SkypeGetErr(char *szWhat, char *szWho, char *szProperty);
#ifdef _UNICODE
WCHAR *SkypeGetW(char *szWhat, WCHAR *szWho, char *szProperty);
WCHAR *SkypeGetErrW(char *szWhat, TCHAR *szWho, char *szProperty);
#define SkypeGetT SkypeGetW
#define SkypeGetErrT SkypeGetErrW
#else
#define SkypeGetT SkypeGet
#define SkypeGetErrT SkypeGetErr
#endif
char *SkypeGetProfile(char *szProperty);
void SetUserNamePassword();
INT_PTR SkypeAdduserDlg(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeReceivedAPIMessage(WPARAM wParam, LPARAM lParam);