summaryrefslogtreecommitdiffstats
path: root/src/voicecall.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-08-18 19:28:20 -0500
committerDenis Kenzior <denkenz@gmail.com>2011-08-18 19:28:20 -0500
commit236f1ffb36bf56efaefb99eb93e7b0eaa8be8650 (patch)
tree1fe7f75079f614b1025ca1c10f69acd75efe7a06 /src/voicecall.c
parentddbacc2dda8db476924181bff49356087c8ccc70 (diff)
downloadofono-236f1ffb36bf56efaefb99eb93e7b0eaa8be8650.tar.bz2
voicecall: Move stuff around
Diffstat (limited to 'src/voicecall.c')
-rw-r--r--src/voicecall.c96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/voicecall.c b/src/voicecall.c
index 168ce964..ec04f8d2 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -262,6 +262,54 @@ static unsigned int voicecalls_num_connecting(struct ofono_voicecall *vc)
return r;
}
+static gboolean voicecalls_have_active(struct ofono_voicecall *vc)
+{
+ GSList *l;
+ struct voicecall *v;
+
+ for (l = vc->call_list; l; l = l->next) {
+ v = l->data;
+
+ if (v->call->status == CALL_STATUS_ACTIVE ||
+ v->call->status == CALL_STATUS_DIALING ||
+ v->call->status == CALL_STATUS_ALERTING)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static gboolean voicecalls_have_with_status(struct ofono_voicecall *vc,
+ int status)
+{
+ GSList *l;
+ struct voicecall *v;
+
+ for (l = vc->call_list; l; l = l->next) {
+ v = l->data;
+
+ if (v->call->status == status)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static gboolean voicecalls_have_held(struct ofono_voicecall *vc)
+{
+ return voicecalls_have_with_status(vc, CALL_STATUS_HELD);
+}
+
+static gboolean voicecalls_have_waiting(struct ofono_voicecall *vc)
+{
+ return voicecalls_have_with_status(vc, CALL_STATUS_WAITING);
+}
+
+static gboolean voicecalls_have_incoming(struct ofono_voicecall *vc)
+{
+ return voicecalls_have_with_status(vc, CALL_STATUS_INCOMING);
+}
+
static void dial_request_finish(struct ofono_voicecall *vc)
{
struct dial_request *dial_req = vc->dial_req;
@@ -1040,44 +1088,6 @@ static int voicecalls_path_list(struct ofono_voicecall *vc, GSList *call_list,
return 0;
}
-static gboolean voicecalls_have_active(struct ofono_voicecall *vc)
-{
- GSList *l;
- struct voicecall *v;
-
- for (l = vc->call_list; l; l = l->next) {
- v = l->data;
-
- if (v->call->status == CALL_STATUS_ACTIVE ||
- v->call->status == CALL_STATUS_DIALING ||
- v->call->status == CALL_STATUS_ALERTING)
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean voicecalls_have_with_status(struct ofono_voicecall *vc,
- int status)
-{
- GSList *l;
- struct voicecall *v;
-
- for (l = vc->call_list; l; l = l->next) {
- v = l->data;
-
- if (v->call->status == status)
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean voicecalls_have_held(struct ofono_voicecall *vc)
-{
- return voicecalls_have_with_status(vc, CALL_STATUS_HELD);
-}
-
static GSList *voicecalls_held_list(struct ofono_voicecall *vc)
{
GSList *l;
@@ -1120,16 +1130,6 @@ static GSList *voicecalls_active_list(struct ofono_voicecall *vc)
return r;
}
-static gboolean voicecalls_have_waiting(struct ofono_voicecall *vc)
-{
- return voicecalls_have_with_status(vc, CALL_STATUS_WAITING);
-}
-
-static gboolean voicecalls_have_incoming(struct ofono_voicecall *vc)
-{
- return voicecalls_have_with_status(vc, CALL_STATUS_INCOMING);
-}
-
struct ofono_call *__ofono_voicecall_find_call_with_status(
struct ofono_voicecall *vc, int status)
{