Add utility to get the next free call id
authorDenis Kenzior <denkenz@gmail.com>
Fri, 4 Dec 2009 22:21:02 +0000 (16:21 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 4 Dec 2009 22:52:30 +0000 (16:52 -0600)
include/voicecall.h
src/voicecall.c

index b8ac45c..e3ac67b 100644 (file)
@@ -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
 }
index c89b2be..8a73de2 100644 (file)
@@ -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);
+}