]> sjero.net Git - linphone/commitdiff
add device identifier api
authorJehan Monnier <jehan.monnier@linphone.org>
Thu, 19 Jul 2012 13:22:51 +0000 (15:22 +0200)
committerJehan Monnier <jehan.monnier@linphone.org>
Mon, 3 Sep 2012 16:13:15 +0000 (18:13 +0200)
coreapi/linphonecall.c
coreapi/linphonecore.c
coreapi/linphonecore.h
coreapi/private.h

index 929814b52c3eace20e60fb7f4066def51f4bd6e8..786744fb2b27dcf3ee530653ab1f5ea0022a5722 100644 (file)
@@ -521,7 +521,11 @@ void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const
                        switch(call->reason){
                                case LinphoneReasonDeclined:
                                        call->log->status=LinphoneCallDeclined;
+<<<<<<< HEAD
                                break;
+=======
+                                       break;
+>>>>>>> add device identifier api
                                case LinphoneReasonNotAnswered:
                                        call->log->status=LinphoneCallMissed;
                                break;
index 47f8a61ae63af9ce2538aa3108e0371e26e22e42..d67ba6d564e1b99fa0fefc4d1710a4bddb0cccb4 100644 (file)
@@ -5104,3 +5104,10 @@ void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx,
        }else ms_warning("Could not apply zoom: video output wasn't activated.");
 }
 
+void linphone_core_set_device_identifier(LinphoneCore *lc,const char* device_id) {
+       if (lc->device_id) ms_free(lc->device_id);
+       lc->device_id=ms_strdup(device_id);
+}
+const char*  linphone_core_get_device_identifier(const LinphoneCore *lc) {
+       return lc->device_id;
+}
index 2972bc090bef4e4e4be3004f53f6391a74e35034..6376309975ec928d69c44b998fff623c6b7df1d9 100644 (file)
@@ -827,6 +827,24 @@ LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
 
 /* function to be periodically called in a main loop */
 void linphone_core_iterate(LinphoneCore *lc);
+#if 0 /*not implemented yet*/
+/**
+ * @ingroup initializing
+ * Provide Linphone Core with an unique identifier. This be later used to identified contact address coming from this device.
+ * Value is not saved.
+ * @param lc object
+ * @param string identifying the device, can be EMEI or UDID
+ *
+ */
+void linphone_core_set_device_identifier(LinphoneCore *lc,const char* device_id);
+/**
+ * @ingroup initializing
+ * get Linphone unique identifier
+ *
+ */
+const char*  linphone_core_get_device_identifier(const LinphoneCore *lc);
+
+#endif
 
 LinphoneAddress * linphone_core_interpret_url(LinphoneCore *lc, const char *url);
 
index 6c9ba8d29fa0ce57f74450a62b7b0eed9f896e50..2687ddc0385d3d557cc505397c3d79f8b952dbbe 100644 (file)
@@ -539,6 +539,7 @@ struct _LinphoneCore
        int device_rotation;
        int max_calls;
        LinphoneTunnel *tunnel;
+       char* device_id;
 };
 
 LinphoneTunnel *linphone_core_tunnel_new(LinphoneCore *lc);