-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathslack_plugin.h
52 lines (39 loc) · 973 Bytes
/
slack_plugin.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
#ifndef _SLACK_PLUGIN_H
#define _SLACK_PLUGIN_H
/*system includes*/
#include <glib/gi18n.h>
/*purple includes*/
#include <plugin.h>
#include <prpl.h>
typedef struct _SlackAccount {
PurpleAccount *account;
PurpleConnection *pc;
PurpleSslConnection *gsc;
gchar *token;
gboolean needs_join;
guint poll_timeout;
guint connection_timeout;
gchar *last_message_update_time;
GSList *dns_queries;
GHashTable *cookie_table;
GHashTable *hostname_ip_cache;
GSList *conns; /**< A list of all active Connections */
GQueue *waiting_conns; /**< A list of all Connections waiting to process */
gpointer *rtm; // List of all rtm connections
GSList *channels;
} SlackAccount;
typedef enum
{
BUDDY_USER = 0x0001,
BUDDY_CHANNEL = 0x0002,
} SlackPerson;
typedef struct _SlackBuddy {
SlackAccount *sa;
PurpleBuddy *buddy;
gchar *slack_id;
gchar *nickname;
gchar *avatar;
guint personflags;
guint personastateflags;
} SlackBuddy;
#endif // _SLACK_PLUGIN_H