annotate mcabber/mcabber/xmpp.h @ 2138:f063e36425a2

Use bookmarked password (if any) when using "/room join" (The password was only used when auto-joining.)
author Mikael Berthe <mikael@lilotux.net>
date Sun, 06 Jul 2014 13:24:06 +0200
parents 0bfc4bfc127c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1653
diff changeset
1 #ifndef __MCABBER_XMPP_H__
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1653
diff changeset
2 #define __MCABBER_XMPP_H__ 1
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
3
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
4 #include <loudmouth/loudmouth.h>
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1653
diff changeset
5 #include <mcabber/roster.h>
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
6
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
7 enum iqreq_type {
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
8 iqreq_none,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
9 iqreq_version,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
10 iqreq_time,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
11 iqreq_last,
1705
ac881b5f9248 Add /request ping (XEP-0199), by merging isbear's module
Mikael Berthe <mikael@lilotux.net>
parents: 1684
diff changeset
12 iqreq_vcard,
ac881b5f9248 Add /request ping (XEP-0199), by merging isbear's module
Mikael Berthe <mikael@lilotux.net>
parents: 1684
diff changeset
13 iqreq_ping
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
14 };
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
15
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
16 struct annotation {
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
17 time_t cdate;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
18 time_t mdate;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
19 gchar *jid;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
20 gchar *text;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
21 };
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
22
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
23 struct bookmark {
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
24 gchar *roomjid;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
25 gchar *name;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
26 gchar *nick;
2137
0bfc4bfc127c Add support for storing passwords to a MUC (Nico Golde)
Mikael Berthe <mikael@lilotux.net>
parents: 2010
diff changeset
27 gchar *password;
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
28 guint autojoin;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
29 /* enum room_printstatus pstatus; */
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
30 /* enum room_autowhois awhois; */
1979
6febc7d1f760 Add /room setopt flag_joins (Hermitifier)
Mikael Berthe <mikael@lilotux.net>
parents: 1976
diff changeset
31 /* enum room_flagjoins fjoins; */
6febc7d1f760 Add /room setopt flag_joins (Hermitifier)
Mikael Berthe <mikael@lilotux.net>
parents: 1976
diff changeset
32 /* const char *group; */
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
33 };
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
34
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
35 extern LmConnection* lconnection;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
36 extern LmSSL* lssl;
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
37
1810
8c2651fc217a Improve initial display when there is an error message
Mikael Berthe <mikael@lilotux.net>
parents: 1705
diff changeset
38 int xmpp_connect(void);
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
39 void xmpp_disconnect(void);
1684
95df4ea512c8 Provide xmpp_is_online()
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
40 gboolean xmpp_is_online(void);
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
41
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
42 void xmpp_room_join(const char *room, const char *nickname, const char *passwd);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
43 int xmpp_room_setattrib(const char *roomid, const char *fjid,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
44 const char *nick, struct role_affil ra,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
45 const char *reason);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
46 void xmpp_room_invite(const char *room, const char *fjid, const char *reason);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
47 void xmpp_room_unlock(const char *room);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
48 void xmpp_room_destroy(const char *room, const char *venue, const char *reason);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
49
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
50 void xmpp_addbuddy(const char *bjid, const char *name, const char *group);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
51 void xmpp_updatebuddy(const char *bjid, const char *name, const char *group);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
52 void xmpp_delbuddy(const char *bjid);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
53
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
54 void xmpp_send_msg(const char *fjid, const char *text, int type,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
55 const char *subject, gboolean otrinject, gint *encrypted,
1602
f4a2c6f767d1 Message Receipts support (XEP-0184)
franky
parents: 1599
diff changeset
56 LmMessageSubType type_overwrite, gpointer *xep184);
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
57
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
58 void xmpp_send_s10n(const char *bjid, LmMessageSubType type);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
59
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
60 enum imstatus xmpp_getstatus(void);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
61 const char *xmpp_getstatusmsg(void);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
62 void xmpp_setprevstatus(void);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
63
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
64 void xmpp_setstatus(enum imstatus st, const char *recipient,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
65 const char *msg, int do_not_sign);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
66
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
67 void xmpp_send_chatstate(gpointer buddy, guint chatstate);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
68
1920
bfa507815e0c Add caps to presence when joining a MUC room
Mikael Berthe <mikael@lilotux.net>
parents: 1811
diff changeset
69 void xmpp_insert_entity_capabilities(LmMessageNode *x, enum imstatus status);
bfa507815e0c Add caps to presence when joining a MUC room
Mikael Berthe <mikael@lilotux.net>
parents: 1811
diff changeset
70
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
71 GSList *xmpp_get_all_storage_bookmarks(void);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
72 GSList *xmpp_get_all_storage_rosternotes(void);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
73 void xmpp_set_storage_bookmark(const char *roomid, const char *name,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
74 const char *nick, const char *passwd,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
75 int autojoin, enum room_printstatus pstatus,
1979
6febc7d1f760 Add /room setopt flag_joins (Hermitifier)
Mikael Berthe <mikael@lilotux.net>
parents: 1976
diff changeset
76 enum room_autowhois awhois,
6febc7d1f760 Add /room setopt flag_joins (Hermitifier)
Mikael Berthe <mikael@lilotux.net>
parents: 1976
diff changeset
77 enum room_flagjoins fjoins, const char *group);
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
78 struct annotation *xmpp_get_storage_rosternotes(const char *barejid,
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
79 int silent);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
80 void xmpp_set_storage_rosternotes(const char *barejid, const char *note);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
81 guint xmpp_is_bookmarked(const char *bjid);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
82 const char *xmpp_get_bookmark_nick(const char *bjid);
2138
f063e36425a2 Use bookmarked password (if any) when using "/room join"
Mikael Berthe <mikael@lilotux.net>
parents: 2137
diff changeset
83 const char *xmpp_get_bookmark_password(const char *bjid);
2010
a73ce708c2c9 Fix bookmarks losing autojoin attribute
Hermitifier
parents: 1979
diff changeset
84 int xmpp_get_bookmark_autojoin(const char *bjid);
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
85
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
86 void xmpp_request(const char *fjid, enum iqreq_type reqtype);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
87 void request_vcard(const char *bjid);
a087125d8fc8 Replace libjabber with loudmouth
franky
parents:
diff changeset
88 void xmpp_request_storage(const gchar *storage);
1599
dcd5d4c75199 Update/Add headers
Mikael Berthe <mikael@lilotux.net>
parents: 1598
diff changeset
89
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1653
diff changeset
90 #endif /* __MCABBER_XMPP_H__ */
1599
dcd5d4c75199 Update/Add headers
Mikael Berthe <mikael@lilotux.net>
parents: 1598
diff changeset
91
1811
e6d355e50d7a Update Vim modelines
Mikael Berthe <mikael@lilotux.net>
parents: 1810
diff changeset
92 /* vim: set et cindent cinoptions=>2\:2(0 ts=2 sw=2: For Vim users... */