empathy r790 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r790 - trunk/libempathy
- Date: Fri, 14 Mar 2008 13:05:38 +0000 (GMT)
Author: xclaesse
Date: Fri Mar 14 13:05:38 2008
New Revision: 790
URL: http://svn.gnome.org/viewvc/empathy?rev=790&view=rev
Log:
Add a ready property on EmpathyTpContactFactory
Modified:
trunk/libempathy/empathy-contact-factory.c
trunk/libempathy/empathy-contact-factory.h
trunk/libempathy/empathy-tp-contact-factory.c
trunk/libempathy/empathy-tp-contact-factory.h
Modified: trunk/libempathy/empathy-contact-factory.c
==============================================================================
--- trunk/libempathy/empathy-contact-factory.c (original)
+++ trunk/libempathy/empathy-contact-factory.c Fri Mar 14 13:05:38 2008
@@ -22,7 +22,6 @@
#include <config.h>
#include "empathy-contact-factory.h"
-#include "empathy-tp-contact-factory.h"
#include "empathy-utils.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
@@ -37,9 +36,9 @@
G_DEFINE_TYPE (EmpathyContactFactory, empathy_contact_factory, G_TYPE_OBJECT);
-static EmpathyTpContactFactory *
-contact_factory_get_tp_factory (EmpathyContactFactory *factory,
- McAccount *account)
+EmpathyTpContactFactory *
+empathy_contact_factory_get_tp_factory (EmpathyContactFactory *factory,
+ McAccount *account)
{
EmpathyContactFactoryPriv *priv = GET_PRIV (factory);
EmpathyTpContactFactory *tp_factory;
@@ -61,7 +60,7 @@
{
EmpathyTpContactFactory *tp_factory;
- tp_factory = contact_factory_get_tp_factory (factory, account);
+ tp_factory = empathy_contact_factory_get_tp_factory (factory, account);
return empathy_tp_contact_factory_get_user (tp_factory);
}
@@ -73,7 +72,7 @@
{
EmpathyTpContactFactory *tp_factory;
- tp_factory = contact_factory_get_tp_factory (factory, account);
+ tp_factory = empathy_contact_factory_get_tp_factory (factory, account);
return empathy_tp_contact_factory_get_from_id (tp_factory, id);
}
@@ -85,7 +84,7 @@
{
EmpathyTpContactFactory *tp_factory;
- tp_factory = contact_factory_get_tp_factory (factory, account);
+ tp_factory = empathy_contact_factory_get_tp_factory (factory, account);
return empathy_tp_contact_factory_get_from_handle (tp_factory, handle);
}
@@ -97,7 +96,7 @@
{
EmpathyTpContactFactory *tp_factory;
- tp_factory = contact_factory_get_tp_factory (factory, account);
+ tp_factory = empathy_contact_factory_get_tp_factory (factory, account);
return empathy_tp_contact_factory_get_from_handles (tp_factory, handles);
}
@@ -111,7 +110,7 @@
McAccount *account;
account = empathy_contact_get_account (contact);
- tp_factory = contact_factory_get_tp_factory (factory, account);
+ tp_factory = empathy_contact_factory_get_tp_factory (factory, account);
return empathy_tp_contact_factory_set_alias (tp_factory, contact, alias);
}
@@ -125,7 +124,7 @@
{
EmpathyTpContactFactory *tp_factory;
- tp_factory = contact_factory_get_tp_factory (factory, account);
+ tp_factory = empathy_contact_factory_get_tp_factory (factory, account);
return empathy_tp_contact_factory_set_avatar (tp_factory,
data, size, mime_type);
Modified: trunk/libempathy/empathy-contact-factory.h
==============================================================================
--- trunk/libempathy/empathy-contact-factory.h (original)
+++ trunk/libempathy/empathy-contact-factory.h Fri Mar 14 13:05:38 2008
@@ -27,6 +27,7 @@
#include <libmissioncontrol/mc-account.h>
#include "empathy-contact.h"
+#include "empathy-tp-contact-factory.h"
G_BEGIN_DECLS
@@ -51,6 +52,8 @@
GType empathy_contact_factory_get_type (void) G_GNUC_CONST;
EmpathyContactFactory *empathy_contact_factory_new (void);
+EmpathyTpContactFactory *empathy_contact_factory_get_tp_factory (EmpathyContactFactory *factory,
+ McAccount *account);
EmpathyContact * empathy_contact_factory_get_user (EmpathyContactFactory *factory,
McAccount *account);
EmpathyContact * empathy_contact_factory_get_from_id (EmpathyContactFactory *factory,
Modified: trunk/libempathy/empathy-tp-contact-factory.c
==============================================================================
--- trunk/libempathy/empathy-tp-contact-factory.c (original)
+++ trunk/libempathy/empathy-tp-contact-factory.c Fri Mar 14 13:05:38 2008
@@ -54,6 +54,7 @@
enum {
PROP_0,
PROP_ACCOUNT,
+ PROP_READY
};
static EmpathyContact *
@@ -1142,6 +1143,16 @@
}
}
+gboolean
+empathy_tp_contact_factory_is_ready (EmpathyTpContactFactory *tp_factory)
+{
+ EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory);
+
+ g_return_val_if_fail (EMPATHY_IS_TP_CONTACT_FACTORY (tp_factory), FALSE);
+
+ return priv->ready;
+}
+
static void
tp_contact_factory_get_property (GObject *object,
guint param_id,
@@ -1154,6 +1165,9 @@
case PROP_ACCOUNT:
g_value_set_object (value, priv->account);
break;
+ case PROP_READY:
+ g_value_set_boolean (value, priv->ready);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
@@ -1244,7 +1258,6 @@
object_class->get_property = tp_contact_factory_get_property;
object_class->set_property = tp_contact_factory_set_property;
- /* Construct-only properties */
g_object_class_install_property (object_class,
PROP_ACCOUNT,
g_param_spec_object ("account",
@@ -1253,6 +1266,13 @@
MC_TYPE_ACCOUNT,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class,
+ PROP_READY,
+ g_param_spec_boolean ("ready",
+ "Wheter the factor is ready",
+ "Is the factory ready",
+ FALSE,
+ G_PARAM_READABLE));
g_type_class_add_private (object_class, sizeof (EmpathyTpContactFactoryPriv));
}
Modified: trunk/libempathy/empathy-tp-contact-factory.h
==============================================================================
--- trunk/libempathy/empathy-tp-contact-factory.h (original)
+++ trunk/libempathy/empathy-tp-contact-factory.h Fri Mar 14 13:05:38 2008
@@ -65,6 +65,7 @@
const gchar *data,
gsize size,
const gchar *mime_type);
+gboolean empathy_tp_contact_factory_is_ready (EmpathyTpContactFactory *tp_factory);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]