diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-07-01 20:52:40 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-07-11 23:21:00 +0200 |
commit | de2c24ec440c0a9f618f6c83b34a8bdf67d10fc2 (patch) | |
tree | 72b72c694136bc097ab8039a92d61faf1732081a /src/mm-call-list.c | |
parent | 13b4c9f6ac91baa89a37135cef40b04d2ad2ca1b (diff) |
call-list: allow getting call object by DBus path
Diffstat (limited to 'src/mm-call-list.c')
-rw-r--r-- | src/mm-call-list.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mm-call-list.c b/src/mm-call-list.c index e4798d47..e131d20e 100644 --- a/src/mm-call-list.c +++ b/src/mm-call-list.c @@ -135,6 +135,19 @@ cmp_call_by_path (MMBaseCall *call, return g_strcmp0 (mm_base_call_get_path (call), path); } +MMBaseCall * +mm_call_list_get_call (MMCallList *self, + const gchar *call_path) +{ + GList *l; + + l = g_list_find_custom (self->priv->list, + (gpointer)call_path, + (GCompareFunc)cmp_call_by_path); + + return (l ? MM_BASE_CALL (l->data) : NULL); +} + gboolean mm_call_list_delete_call (MMCallList *self, const gchar *call_path, |