-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpurplemot.h
54 lines (41 loc) · 1015 Bytes
/
purplemot.h
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
/**
* motmot definitions
*/
#ifndef __PURPLEMOT_H__
#define __PURPLEMOT_H__
#include <msgpack.h>
#include "prpl.h"
#define BUFSIZE 512
// Nop! TODO: figure out what to do with this
#define _
#define N_
struct pm_account {
// libpurple objects
PurpleAccount *pa; // libpurple calls this 'account', but I want
// to use that name for other things
PurpleSslConnection *gsc; // Name is libpurple's convention, not mine
// Server connection info
const char *server_host;
msgpack_unpacker unpacker; // A msgpack unpacker (includes a buffer)
};
struct pm_buddy {
struct pm_account *account;
// How do we contact them?
const char *ip;
int port;
// How do we identify this buddy to libmotmot?
void *lm_data;
};
struct pm_conversation {
struct pm_account *account;
PurpleConversation *convo;
// TODO(carl): finish this;
};
typedef enum pm_buddy_status {
ONLINE = 1,
AWAY,
OFFLINE,
BUSY,
SERVER
} pm_buddy_status;
#endif