Commit 3cbabc10 authored by jehan's avatar jehan

add device identifier api

parent b86d76b4
......@@ -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;
......
......@@ -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;
}
......@@ -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);
......
......@@ -539,6 +539,7 @@ struct _LinphoneCore
int device_rotation;
int max_calls;
LinphoneTunnel *tunnel;
char* device_id;
};
LinphoneTunnel *linphone_core_tunnel_new(LinphoneCore *lc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment