restructure configure so pkg-config derived SSL flags get used
[rofl0r-ixchat.git] / src / common / servlist.h
blob230fcb1babd69e6c81ce402bf5aa6cb46ed782d9
1 #ifndef XCHAT_SERVLIST_H
2 #define XCHAT_SERVLIST_H
4 typedef struct ircserver
6 char *hostname;
7 } ircserver;
9 typedef struct ircnet
11 char *name;
12 char *nick;
13 char *nick2;
14 char *user;
15 char *real;
16 char *pass;
17 char *autojoin;
18 char *command;
19 int logintype;
20 char *comment;
21 char *encoding;
22 GSList *servlist;
23 int selected;
24 guint32 flags;
25 } ircnet;
27 extern GSList *network_list;
29 #define FLAG_CYCLE 1
30 #define FLAG_USE_GLOBAL 2
31 #define FLAG_USE_SSL 4
32 #define FLAG_AUTO_CONNECT 8
33 #define FLAG_USE_PROXY 16
34 #define FLAG_ALLOW_INVALID 32
35 #define FLAG_FAVORITE 64
36 #define FLAG_COUNT 7
38 /* Login methods. Use server password by default - if we had a NickServ password, it'd be set to 2 already by servlist_load() */
39 #define LOGIN_DEFAULT_REAL LOGIN_PASS /* this is to set the default login method for unknown servers */
40 #define LOGIN_DEFAULT 0 /* this is for the login type dropdown, doesn't serve any other purpose */
41 #define LOGIN_MSG_NICKSERV 1
42 #define LOGIN_NICKSERV 2
43 #if 0
44 #define LOGIN_NS 3
45 #define LOGIN_MSG_NS 4
46 #define LOGIN_AUTH 5
47 #endif
48 #define LOGIN_SASL 6
49 #define LOGIN_PASS 7
50 #define LOGIN_CHALLENGEAUTH 8
51 #define LOGIN_CUSTOM 9
52 #define LOGIN_SASLEXTERNAL 10
54 #define CHALLENGEAUTH_ALGO "HMAC-SHA-256"
55 #define CHALLENGEAUTH_NICK "Q@CServe.quakenet.org"
57 void servlist_init (void);
58 int servlist_save (void);
59 int servlist_cycle (server *serv);
60 void servlist_connect (session *sess, ircnet *net, gboolean join);
61 int servlist_connect_by_netname (session *sess, char *network, gboolean join);
62 int servlist_auto_connect (session *sess);
63 int servlist_have_auto (void);
64 int servlist_check_encoding (char *charset);
65 void servlist_cleanup (void);
67 ircnet *servlist_net_add (char *name, char *comment, int prepend);
68 void servlist_net_remove (ircnet *net);
69 ircnet *servlist_net_find (char *name, int *pos, int (*cmpfunc) (const char *, const char *));
70 ircnet *servlist_net_find_from_server (char *server_name);
72 void servlist_server_remove (ircnet *net, ircserver *serv);
73 ircserver *servlist_server_add (ircnet *net, char *name);
74 ircserver *servlist_server_find (ircnet *net, char *name, int *pos);
76 void joinlist_split (char *autojoin, GSList **channels, GSList **keys);
77 gboolean joinlist_is_in_list (server *serv, char *channel);
78 void joinlist_free (GSList *channels, GSList *keys);
79 gchar *joinlist_merge (GSList *channels, GSList *keys);
81 #endif