empathy r2589 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2589 - trunk/libempathy
- Date: Fri, 6 Mar 2009 11:51:55 +0000 (UTC)
Author: xclaesse
Date: Fri Mar 6 11:51:55 2009
New Revision: 2589
URL: http://svn.gnome.org/viewvc/empathy?rev=2589&view=rev
Log:
Added get_name function to EmpathyLogSource.
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
Modified:
trunk/libempathy/empathy-log-source-empathy.c
trunk/libempathy/empathy-log-source.c
trunk/libempathy/empathy-log-source.h
Modified: trunk/libempathy/empathy-log-source-empathy.c
==============================================================================
--- trunk/libempathy/empathy-log-source-empathy.c (original)
+++ trunk/libempathy/empathy-log-source-empathy.c Fri Mar 6 11:51:55 2009
@@ -58,6 +58,7 @@
typedef struct
{
gchar *basedir;
+ gchar *name;
} EmpathyLogSourceEmpathyPriv;
static void log_source_iface_init (gpointer g_iface,gpointer iface_data);
@@ -73,6 +74,7 @@
EmpathyLogSourceEmpathyPriv *priv = GET_PRIV (self);
g_free (priv->basedir);
+ g_free (priv->name);
}
static void
@@ -95,6 +97,8 @@
priv->basedir = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (),
".gnome2", PACKAGE_NAME, "logs", NULL);
+
+ priv->name = g_strdup ("Empathy");
}
static gchar *
@@ -682,12 +686,21 @@
return hits;
}
+static const gchar *
+log_source_empathy_get_name (EmpathyLogSource *self)
+{
+ EmpathyLogSourceEmpathyPriv *priv = GET_PRIV (self);
+
+ return priv->name;
+}
+
static void
log_source_iface_init (gpointer g_iface,
gpointer iface_data)
{
EmpathyLogSourceInterface *iface = (EmpathyLogSourceInterface *) g_iface;
+ iface->get_name = log_source_empathy_get_name;
iface->exists = log_source_empathy_exists;
iface->add_message = log_source_empathy_add_message;
iface->get_dates = log_source_empathy_get_dates;
Modified: trunk/libempathy/empathy-log-source.c
==============================================================================
--- trunk/libempathy/empathy-log-source.c (original)
+++ trunk/libempathy/empathy-log-source.c Fri Mar 6 11:51:55 2009
@@ -44,6 +44,15 @@
return type;
}
+const gchar *
+empathy_log_source_get_name (EmpathyLogSource *self)
+{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_name)
+ return NULL;
+
+ return EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_name (self);
+}
+
gboolean
empathy_log_source_exists (EmpathyLogSource *self,
McAccount *account,
Modified: trunk/libempathy/empathy-log-source.h
==============================================================================
--- trunk/libempathy/empathy-log-source.h (original)
+++ trunk/libempathy/empathy-log-source.h Fri Mar 6 11:51:55 2009
@@ -48,6 +48,7 @@
{
GTypeInterface parent;
+ const gchar * (*get_name) (EmpathyLogSource *self);
gboolean (*exists) (EmpathyLogSource *self, McAccount *account,
const gchar *chat_id, gboolean chatroom);
void (*add_message) (EmpathyLogSource *self, const gchar *chat_id,
@@ -68,6 +69,7 @@
GType empathy_log_source_get_type (void) G_GNUC_CONST;
+const gchar *empathy_log_source_get_name (EmpathyLogSource *self);
gboolean empathy_log_source_exists (EmpathyLogSource *self,
McAccount *account, const gchar *chat_id, gboolean chatroom);
void empathy_log_source_add_message (EmpathyLogSource *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]