aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-03-06 19:51:39 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-03-06 19:51:39 +0800
commit90cd18fecbdf2491d80d298bb766d11f3eb1be0a (patch)
treefcca52ea3d5f471ce0849706c94900ffc3d11cf1 /libempathy
parent5145abe6c2da274ad46c7fad47cd93d59d121b12 (diff)
downloadgsoc2013-empathy-90cd18fecbdf2491d80d298bb766d11f3eb1be0a.tar
gsoc2013-empathy-90cd18fecbdf2491d80d298bb766d11f3eb1be0a.tar.gz
gsoc2013-empathy-90cd18fecbdf2491d80d298bb766d11f3eb1be0a.tar.bz2
gsoc2013-empathy-90cd18fecbdf2491d80d298bb766d11f3eb1be0a.tar.lz
gsoc2013-empathy-90cd18fecbdf2491d80d298bb766d11f3eb1be0a.tar.xz
gsoc2013-empathy-90cd18fecbdf2491d80d298bb766d11f3eb1be0a.tar.zst
gsoc2013-empathy-90cd18fecbdf2491d80d298bb766d11f3eb1be0a.zip
Only call EmpathyLogSource methods if they are defined.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=2584
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-log-source.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libempathy/empathy-log-source.c b/libempathy/empathy-log-source.c
index 436556dbf..6a5e5b3b0 100644
--- a/libempathy/empathy-log-source.c
+++ b/libempathy/empathy-log-source.c
@@ -50,6 +50,9 @@ empathy_log_source_exists (EmpathyLogSource *self,
const gchar *chat_id,
gboolean chatroom)
{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->exists)
+ return FALSE;
+
return EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->exists (
self, account, chat_id, chatroom);
}
@@ -62,6 +65,9 @@ empathy_log_source_add_message (EmpathyLogSource *self,
gboolean chatroom,
EmpathyMessage *message)
{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->add_message)
+ return;
+
EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->add_message (
self, chat_id, chatroom, message);
}
@@ -72,6 +78,9 @@ empathy_log_source_get_dates (EmpathyLogSource *self,
const gchar *chat_id,
gboolean chatroom)
{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_dates)
+ return NULL;
+
return EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_dates (
self, account, chat_id, chatroom);
}
@@ -83,6 +92,9 @@ empathy_log_source_get_messages_for_date (EmpathyLogSource *self,
gboolean chatroom,
const gchar *date)
{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_messages_for_date)
+ return NULL;
+
return EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_messages_for_date (
self, account, chat_id, chatroom, date);
}
@@ -93,6 +105,9 @@ empathy_log_source_get_last_messages (EmpathyLogSource *self,
const gchar *chat_id,
gboolean chatroom)
{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_last_messages)
+ return NULL;
+
return EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_last_messages (
self, account, chat_id, chatroom);
}
@@ -101,6 +116,9 @@ GList *
empathy_log_source_get_chats (EmpathyLogSource *self,
McAccount *account)
{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_chats)
+ return NULL;
+
return EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->get_chats (self, account);
}
@@ -108,6 +126,9 @@ GList *
empathy_log_source_search_new (EmpathyLogSource *self,
const gchar *text)
{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->search_new)
+ return NULL;
+
return EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->search_new (self, text);
}
@@ -117,6 +138,9 @@ empathy_log_source_ack_message (EmpathyLogSource *self,
gboolean chatroom,
EmpathyMessage *message)
{
+ if (!EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->ack_message)
+ return;
+
EMPATHY_LOG_SOURCE_GET_INTERFACE (self)->ack_message (
self, chat_id, chatroom, message);
}