summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-12-04 16:21:02 -0600
committerDenis Kenzior <denkenz@gmail.com>2009-12-04 16:52:30 -0600
commit0b754835f562585083e61bb7652139f329dc523f (patch)
tree713a69c80cd05fbdd9f02e1551450922a8cae095
parentc7ac706de15812287f4d55ce7a47f50b57021066 (diff)
downloadofono-0b754835f562585083e61bb7652139f329dc523f.tar.bz2
Add utility to get the next free call id
-rw-r--r--include/voicecall.h1
-rw-r--r--src/voicecall.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/include/voicecall.h b/include/voicecall.h
index b8ac45c2..e3ac67bb 100644
--- a/include/voicecall.h
+++ b/include/voicecall.h
@@ -112,6 +112,7 @@ void ofono_voicecall_remove(struct ofono_voicecall *vc);
void ofono_voicecall_set_data(struct ofono_voicecall *vc, void *data);
void *ofono_voicecall_get_data(struct ofono_voicecall *vc);
+int ofono_voicecall_get_next_callid(struct ofono_voicecall *vc);
#ifdef __cplusplus
}
diff --git a/src/voicecall.c b/src/voicecall.c
index c89b2beb..8a73de27 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -1887,3 +1887,14 @@ void *ofono_voicecall_get_data(struct ofono_voicecall *vc)
{
return vc->driver_data;
}
+
+int ofono_voicecall_get_next_callid(struct ofono_voicecall *vc)
+{
+ struct ofono_modem *modem;
+ if (vc == NULL || vc->atom == NULL)
+ return 0;
+
+ modem = __ofono_atom_get_modem(vc->atom);
+
+ return __ofono_modem_callid_next(modem);
+}