libpurple/protocols/silc/silcpurple.h

changeset 40865
82e45cd837fa
parent 40769
2214cc7b95ca
child 41028
943b2cb45314
equal deleted inserted replaced
40864:1f54363a79f2 40865:82e45cd837fa
18 */ 18 */
19 19
20 #ifndef PURPLE_SILC_SILCPURPLE_H 20 #ifndef PURPLE_SILC_SILCPURPLE_H
21 #define PURPLE_SILC_SILCPURPLE_H 21 #define PURPLE_SILC_SILCPURPLE_H
22 22
23 #include <gmodule.h>
24
25 #include <silc.h> 23 #include <silc.h>
26 #include <silcclient.h> 24 #include <silcclient.h>
27 25
28 /* Purple includes */ 26 /* Purple includes */
29 #include <purple.h> 27 #include <purple.h>
30 28
31 #define SILCPURPLE_TYPE_PROTOCOL (silcpurple_protocol_get_type()) 29 #define SILCPURPLE_TYPE_PROTOCOL (silcpurple_protocol_get_type())
32 #define SILCPURPLE_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SILCPURPLE_TYPE_PROTOCOL, SilcProtocol)) 30 G_DECLARE_FINAL_TYPE(SilcProtocol, silcpurple_protocol, SILC, PROTOCOL,
33 #define SILCPURPLE_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SILCPURPLE_TYPE_PROTOCOL, SilcProtocolClass)) 31 PurpleProtocol)
34 #define SILCPURPLE_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SILCPURPLE_TYPE_PROTOCOL))
35 #define SILCPURPLE_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SILCPURPLE_TYPE_PROTOCOL))
36 #define SILCPURPLE_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SILCPURPLE_TYPE_PROTOCOL, SilcProtocolClass))
37 32
38 /* Default public and private key file names */ 33 /* Default public and private key file names */
39 #define SILCPURPLE_PUBLIC_KEY_NAME "public_key.pub" 34 #define SILCPURPLE_PUBLIC_KEY_NAME "public_key.pub"
40 #define SILCPURPLE_PRIVATE_KEY_NAME "private_key.prv" 35 #define SILCPURPLE_PRIVATE_KEY_NAME "private_key.prv"
41 36
51 #define SILCPURPLE_STATUS_ID_HYPER "hyper" 46 #define SILCPURPLE_STATUS_ID_HYPER "hyper"
52 #define SILCPURPLE_STATUS_ID_AWAY "away" 47 #define SILCPURPLE_STATUS_ID_AWAY "away"
53 #define SILCPURPLE_STATUS_ID_BUSY "busy" 48 #define SILCPURPLE_STATUS_ID_BUSY "busy"
54 #define SILCPURPLE_STATUS_ID_INDISPOSED "indisposed" 49 #define SILCPURPLE_STATUS_ID_INDISPOSED "indisposed"
55 #define SILCPURPLE_STATUS_ID_PAGE "page" 50 #define SILCPURPLE_STATUS_ID_PAGE "page"
56
57 typedef struct
58 {
59 PurpleProtocol parent;
60 } SilcProtocol;
61
62 typedef struct
63 {
64 PurpleProtocolClass parent_class;
65 } SilcProtocolClass;
66 51
67 typedef struct { 52 typedef struct {
68 unsigned long id; 53 unsigned long id;
69 const char *channel; 54 const char *channel;
70 unsigned long chid; 55 unsigned long chid;
96 unsigned int detaching : 1; 81 unsigned int detaching : 1;
97 unsigned int resuming : 1; 82 unsigned int resuming : 1;
98 unsigned int roomlist_cancelled : 1; 83 unsigned int roomlist_cancelled : 1;
99 unsigned int chpk : 1; 84 unsigned int chpk : 1;
100 } *SilcPurple; 85 } *SilcPurple;
101
102
103 G_MODULE_EXPORT GType silcpurple_protocol_get_type(void);
104 86
105 void silc_say(SilcClient client, SilcClientConnection conn, 87 void silc_say(SilcClient client, SilcClientConnection conn,
106 SilcClientMessageType type, char *msg, ...); 88 SilcClientMessageType type, char *msg, ...);
107 SilcBool silcpurple_command_reply(SilcClient client, SilcClientConnection conn, 89 SilcBool silcpurple_command_reply(SilcClient client, SilcClientConnection conn,
108 SilcCommand command, SilcStatus status, 90 SilcCommand command, SilcStatus status,

mercurial