aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/gossip-presence.h
blob: 0029906f378cdad6f2db90ee48e5ea8f0639e5b0 (plain) (blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2004 Imendio AB
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __GOSSIP_PRESENCE_H__
#define __GOSSIP_PRESENCE_H__

#include <glib-object.h>
#include <libmissioncontrol/mission-control.h>

G_BEGIN_DECLS

#define GOSSIP_TYPE_PRESENCE         (gossip_presence_get_type ())
#define GOSSIP_PRESENCE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_PRESENCE, GossipPresence))
#define GOSSIP_PRESENCE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_PRESENCE, GossipPresenceClass))
#define GOSSIP_IS_PRESENCE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_PRESENCE))
#define GOSSIP_IS_PRESENCE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_PRESENCE))
#define GOSSIP_PRESENCE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_PRESENCE, GossipPresenceClass))

typedef struct _GossipPresence      GossipPresence;
typedef struct _GossipPresenceClass GossipPresenceClass;

struct _GossipPresence {
    GObject parent;
};

struct _GossipPresenceClass {
    GObjectClass parent_class;
};

GType               gossip_presence_get_type                 (void) G_GNUC_CONST;

GossipPresence *    gossip_presence_new                      (void);
GossipPresence *    gossip_presence_new_full                 (McPresence      state,
                                  const gchar    *status);
McPresence          gossip_presence_get_state                (GossipPresence *presence);
const gchar *       gossip_presence_get_status               (GossipPresence *presence);
void                gossip_presence_set_state                (GossipPresence *presence,
                                  McPresence      state);
void                gossip_presence_set_status               (GossipPresence *presence,
                                  const gchar    *status);
gint                gossip_presence_sort_func                (gconstpointer   a,
                                  gconstpointer   b);
const gchar *       gossip_presence_state_get_default_status (McPresence      state);
const gchar *       gossip_presence_state_to_str             (McPresence      state);
McPresence          gossip_presence_state_from_str           (const gchar    *str);

G_END_DECLS

#endif /* __GOSSIP_PRESENCE_H__ */