~ubuntu-branches/ubuntu/trusty/irssi-plugin-xmpp/trusty

« back to all changes in this revision

Viewing changes to src/core/xmpp-rosters.h

  • Committer: Bazaar Package Importer
  • Author(s): David Ammouial
  • Date: 2008-02-04 21:01:27 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080204210127-qvw99l8m26ksme18
Tags: 0.13+cvs20080121-1
* CVS snapshot.
* Rephrased package description, thanks to Ted Percival (Closes: #444109).
* debian/control: Promote "Homepage" to a real field.
* Update homepage.
* Adapt debian/rules to new upstream Makefile system.
* Bump Standards-Version to 3.7.3 (no changes required).
* Removed empty TODO from debian/docs, added docs/GENERAL, docs/STARTUP,
  docs/XEP.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: xmpp-rosters.h,v 1.9 2007/11/26 12:55:07 errtu Exp $ */
 
2
 
1
3
#ifndef __XMPP_ROSTER_H
2
4
#define __XMPP_ROSTER_H
3
5
 
4
6
enum {
5
 
    XMPP_PRESENCE_ERROR,
6
 
    XMPP_PRESENCE_UNAVAILABLE,
7
 
    XMPP_PRESENCE_XA,
8
 
    XMPP_PRESENCE_DND,
9
 
    XMPP_PRESENCE_AWAY,
10
 
    XMPP_PRESENCE_AVAILABLE,
11
 
    XMPP_PRESENCE_CHAT
 
7
        XMPP_PRESENCE_ERROR,
 
8
        XMPP_PRESENCE_UNAVAILABLE,
 
9
        XMPP_PRESENCE_XA,
 
10
        XMPP_PRESENCE_DND,
 
11
        XMPP_PRESENCE_AWAY,
 
12
        XMPP_PRESENCE_AVAILABLE,
 
13
        XMPP_PRESENCE_CHAT,
 
14
        XMPP_PRESENCE_ONLINE_STR,
 
15
        XMPP_PRESENCE_SHOW_LEN
12
16
};
13
 
extern const gchar *xmpp_presence_show[];
 
17
extern const char *xmpp_presence_show[];
14
18
 
15
19
enum {
16
 
    XMPP_SUBSCRIPTION_REMOVE,
17
 
    XMPP_SUBSCRIPTION_NONE,
18
 
    XMPP_SUBSCRIPTION_TO,
19
 
    XMPP_SUBSCRIPTION_FROM,
20
 
    XMPP_SUBSCRIPTION_BOTH
 
20
        XMPP_SUBSCRIPTION_REMOVE,
 
21
        XMPP_SUBSCRIPTION_NONE,
 
22
        XMPP_SUBSCRIPTION_TO,
 
23
        XMPP_SUBSCRIPTION_FROM,
 
24
        XMPP_SUBSCRIPTION_BOTH
21
25
};
22
 
extern const gchar *xmpp_subscription[];
23
 
 
24
 
extern const gchar *xmpp_service_name;
25
 
 
26
 
typedef struct _XmppRosterRessource {
27
 
    gchar  *name;
28
 
    gint    priority;
29
 
    gint    show;
30
 
    gchar  *status;
31
 
} XmppRosterRessource;
32
 
 
33
 
typedef struct _XmppRosterUser {
34
 
    gchar  *jid;
35
 
    gchar  *name;
36
 
    gint    subscription;
37
 
    gboolean error;
38
 
 
39
 
    GSList *ressources;
40
 
} XmppRosterUser;
41
 
 
42
 
typedef struct _XmppRosterGroup {
43
 
    gchar  *name;
44
 
 
45
 
    GSList *users;
46
 
} XmppRosterGroup;
47
 
 
48
 
gint    xmpp_sort_user_func(gconstpointer, gconstpointer);
49
 
XmppRosterUser *xmpp_find_user_from_groups(GSList *, const gchar *, 
50
 
    XmppRosterGroup **);
51
 
gboolean        xmpp_roster_show_user(XmppRosterUser *);
52
 
void    xmpp_roster_update(XMPP_SERVER_REC *, LmMessageNode *);
53
 
void    xmpp_roster_update_presence(XMPP_SERVER_REC *, const gchar *,
54
 
    const gchar *, const gchar *, const gchar *);
55
 
void    xmpp_roster_presence_error(XMPP_SERVER_REC *, const gchar *);
56
 
void    xmpp_roster_presence_unavailable(XMPP_SERVER_REC *, const gchar *,
57
 
    const gchar *);
58
 
void    xmpp_roster_cleanup(XMPP_SERVER_REC *);
 
26
extern const char *xmpp_subscription[];
 
27
 
 
28
/* roster structure */
 
29
typedef struct _XMPP_ROSTER_RESOURCE_REC {
 
30
        char    *name;
 
31
        int      priority;
 
32
        int      show;
 
33
        char    *status;
 
34
        char    *composing_id;
 
35
} XMPP_ROSTER_RESOURCE_REC;
 
36
 
 
37
typedef struct _XMPP_ROSTER_USER_REC {
 
38
        char    *jid;
 
39
        char    *name;
 
40
        int      subscription;
 
41
        gboolean error;
 
42
 
 
43
        GSList  *resources;
 
44
} XMPP_ROSTER_USER_REC;
 
45
 
 
46
typedef struct _XMPP_ROSTER_GROUP_REC {
 
47
        char    *name;
 
48
 
 
49
        GSList  *users;
 
50
} XMPP_ROSTER_GROUP_REC;
 
51
 
 
52
__BEGIN_DECLS
 
53
void xmpp_rosters_init(void);
 
54
void xmpp_rosters_deinit(void);
 
55
__END_DECLS
59
56
 
60
57
#endif