aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/gossip-contact.h
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2007-04-26 05:59:20 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-04-26 05:59:20 +0800
commit40c0d1ba5434b5c5d4f8b7ff6fedd1add5c03ce6 (patch)
treec1426dc8388fc711bf4a5e8de42fd3a4b76e6842 /libempathy/gossip-contact.h
downloadgsoc2013-empathy-40c0d1ba5434b5c5d4f8b7ff6fedd1add5c03ce6.tar
gsoc2013-empathy-40c0d1ba5434b5c5d4f8b7ff6fedd1add5c03ce6.tar.gz
gsoc2013-empathy-40c0d1ba5434b5c5d4f8b7ff6fedd1add5c03ce6.tar.bz2
gsoc2013-empathy-40c0d1ba5434b5c5d4f8b7ff6fedd1add5c03ce6.tar.lz
gsoc2013-empathy-40c0d1ba5434b5c5d4f8b7ff6fedd1add5c03ce6.tar.xz
gsoc2013-empathy-40c0d1ba5434b5c5d4f8b7ff6fedd1add5c03ce6.tar.zst
gsoc2013-empathy-40c0d1ba5434b5c5d4f8b7ff6fedd1add5c03ce6.zip
[darcs-to-svn @ initial import]
svn path=/trunk/; revision=2
Diffstat (limited to 'libempathy/gossip-contact.h')
-rw-r--r--libempathy/gossip-contact.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/libempathy/gossip-contact.h b/libempathy/gossip-contact.h
new file mode 100644
index 000000000..92caee9ea
--- /dev/null
+++ b/libempathy/gossip-contact.h
@@ -0,0 +1,102 @@
+/* -*- 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_CONTACT_H__
+#define __GOSSIP_CONTACT_H__
+
+#include <glib-object.h>
+
+#include <libmissioncontrol/mc-account.h>
+
+#include "gossip-avatar.h"
+#include "gossip-presence.h"
+
+G_BEGIN_DECLS
+
+#define GOSSIP_TYPE_CONTACT (gossip_contact_get_gtype ())
+#define GOSSIP_CONTACT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CONTACT, GossipContact))
+#define GOSSIP_CONTACT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_CONTACT, GossipContactClass))
+#define GOSSIP_IS_CONTACT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CONTACT))
+#define GOSSIP_IS_CONTACT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CONTACT))
+#define GOSSIP_CONTACT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CONTACT, GossipContactClass))
+
+typedef struct _GossipContact GossipContact;
+typedef struct _GossipContactClass GossipContactClass;
+
+struct _GossipContact {
+ GObject parent;
+};
+
+struct _GossipContactClass {
+ GObjectClass parent_class;
+};
+
+typedef enum {
+ GOSSIP_SUBSCRIPTION_NONE = 0,
+ GOSSIP_SUBSCRIPTION_TO = 1 << 0, /* We send our presence to that contact */
+ GOSSIP_SUBSCRIPTION_FROM = 1 << 1, /* That contact sends his presence to us */
+ GOSSIP_SUBSCRIPTION_BOTH = GOSSIP_SUBSCRIPTION_TO | GOSSIP_SUBSCRIPTION_FROM
+} GossipSubscription;
+
+GType gossip_contact_get_gtype (void) G_GNUC_CONST;
+
+GossipContact * gossip_contact_new (McAccount *account);
+GossipContact * gossip_contact_new_full (McAccount *account,
+ const gchar *id,
+ const gchar *name);
+const gchar * gossip_contact_get_id (GossipContact *contact);
+const gchar * gossip_contact_get_name (GossipContact *contact);
+GossipAvatar * gossip_contact_get_avatar (GossipContact *contact);
+McAccount * gossip_contact_get_account (GossipContact *contact);
+void gossip_contact_add_presence (GossipContact *contact,
+ GossipPresence *presence);
+void gossip_contact_remove_presence (GossipContact *contact,
+ GossipPresence *presence);
+GossipPresence * gossip_contact_get_presence_for_resource (GossipContact *contact,
+ const gchar *resource);
+GossipPresence * gossip_contact_get_active_presence (GossipContact *contact);
+GList * gossip_contact_get_presence_list (GossipContact *contact);
+GList * gossip_contact_get_groups (GossipContact *contact);
+GossipSubscription gossip_contact_get_subscription (GossipContact *contact);
+guint gossip_contact_get_handle (GossipContact *contact);
+void gossip_contact_set_id (GossipContact *contact,
+ const gchar *id);
+void gossip_contact_set_name (GossipContact *contact,
+ const gchar *name);
+void gossip_contact_set_avatar (GossipContact *contact,
+ GossipAvatar *avatar);
+void gossip_contact_set_account (GossipContact *contact,
+ McAccount *account);
+void gossip_contact_set_groups (GossipContact *contact,
+ GList *categories);
+void gossip_contact_set_subscription (GossipContact *contact,
+ GossipSubscription subscription);
+void gossip_contact_set_handle (GossipContact *contact,
+ guint handle);
+gboolean gossip_contact_is_online (GossipContact *contact);
+const gchar * gossip_contact_get_status (GossipContact *contact);
+gboolean gossip_contact_equal (gconstpointer v1,
+ gconstpointer v2);
+guint gossip_contact_hash (gconstpointer key);
+
+G_END_DECLS
+
+#endif /* __GOSSIP_CONTACT_H__ */
+