aboutsummaryrefslogtreecommitdiff
path: root/src/mm-call-list.h
diff options
context:
space:
mode:
authorRiccardo Vangelisti <riccardo.vangelisti@sadel.it>2015-05-04 11:11:43 +0200
committerAleksander Morgado <aleksander@aleksander.es>2015-08-02 10:39:12 +0200
commitec5c539f553fdb6d1474aa9216b6944aa61e5bb0 (patch)
tree111f28c48d94b68ce315d0b1d46edb5ebccb2af1 /src/mm-call-list.h
parentc3bec1537b96b3b3071c2de787126ba11479ed88 (diff)
core: implemented new MMBaseCall object
Diffstat (limited to 'src/mm-call-list.h')
-rw-r--r--src/mm-call-list.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/mm-call-list.h b/src/mm-call-list.h
new file mode 100644
index 00000000..e3c2a65f
--- /dev/null
+++ b/src/mm-call-list.h
@@ -0,0 +1,75 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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:
+ *
+ * Copyright (C) 2015 Marco Bascetta <marco.bascetta@sadel.it>
+ */
+
+#ifndef MM_CALL_LIST_H
+#define MM_CALL_LIST_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "mm-base-modem.h"
+#include "mm-base-call.h"
+
+#define MM_TYPE_CALL_LIST (mm_call_list_get_type ())
+#define MM_CALL_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_CALL_LIST, MMCallList))
+#define MM_CALL_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_CALL_LIST, MMCallListClass))
+#define MM_IS_CALL_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_CALL_LIST))
+#define MM_IS_CALL_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_CALL_LIST))
+#define MM_CALL_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_CALL_LIST, MMCallListClass))
+
+typedef struct _MMCallList MMCallList;
+typedef struct _MMCallListClass MMCallListClass;
+typedef struct _MMCallListPrivate MMCallListPrivate;
+
+#define MM_CALL_LIST_MODEM "call-list-modem"
+
+#define MM_CALL_ADDED "call-added"
+#define MM_CALL_DELETED "call-deleted"
+
+struct _MMCallList {
+ GObject parent;
+ MMCallListPrivate *priv;
+};
+
+struct _MMCallListClass {
+ GObjectClass parent;
+
+ /* Signals */
+ void (*call_added) (MMCallList *self,
+ const gchar *call_path,
+ gboolean received);
+ void (*call_deleted) (MMCallList *self,
+ const gchar *call_path);
+};
+
+GType mm_call_list_get_type (void);
+
+MMCallList *mm_call_list_new (MMBaseModem *modem);
+
+GStrv mm_call_list_get_paths (MMCallList *self);
+guint mm_call_list_get_count (MMCallList *self);
+
+void mm_call_list_add_call (MMCallList *self,
+ MMBaseCall *call);
+
+void mm_call_list_delete_call (MMCallList *self,
+ const gchar *call_path,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_call_list_delete_call_finish (MMCallList *self,
+ GAsyncResult *res,
+ GError **error);
+
+#endif /* MM_CALL_LIST_H */