michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _CCAPI_DEVICE_H_ michael@0: #define _CCAPI_DEVICE_H_ michael@0: michael@0: #include "ccapi_types.h" michael@0: michael@0: michael@0: /** michael@0: * Get device ID michael@0: * @return cc_deviceinfo_ref_t - reference handle of the device michael@0: */ michael@0: cc_device_handle_t CCAPI_Device_getDeviceID(); michael@0: michael@0: /** michael@0: * Get device reference handle michael@0: * @param [in] id - device ID michael@0: * @return cc_deviceinfo_ref_t - reference handle of the device michael@0: * NOTE: The info returned by this method must be released using CCAPI_Device_releaseDeviceInfo() michael@0: */ michael@0: cc_deviceinfo_ref_t CCAPI_Device_getDeviceInfo(cc_device_handle_t id); michael@0: michael@0: /** michael@0: * Set full path of device configuration file. API will download and parse the config file using michael@0: * provided location. michael@0: * @param handle - device handle michael@0: * @param [in] file_path - device config file full path michael@0: * @return void michael@0: */ michael@0: void CCAPI_Device_configUpdate(cc_device_handle_t handle, file_path_t file_path); michael@0: michael@0: /** michael@0: * Retain the deviceInfo snapshot - this info shall not be freed until a michael@0: * CCAPI_Device_releaseDeviceInfo() API releases this resource. michael@0: * @param [in] ref - refrence to the block to be freed michael@0: * @return void michael@0: * NOTE: Application may use this API to retain the device info using this API inside michael@0: * CCAPI_DeviceListener_onDeviceEvent() App must release the Info using michael@0: * CCAPI_Device_releaseDeviceInfo() once it is done with it. michael@0: */ michael@0: void CCAPI_Device_retainDeviceInfo(cc_deviceinfo_ref_t ref); michael@0: michael@0: /** michael@0: * Release the deviceInfo snapshot michael@0: * @param [in] ref - reference to the block to be freed michael@0: * @return void michael@0: */ michael@0: void CCAPI_Device_releaseDeviceInfo(cc_deviceinfo_ref_t ref); michael@0: michael@0: /** michael@0: * Create a call on the device michael@0: * Line selection is on the first available line. Lines that have there MNC reached will be skipped. michael@0: * @param handle - device handle michael@0: * @return cc_call_handle_t - handle of the call created michael@0: */ michael@0: cc_call_handle_t CCAPI_Device_CreateCall(cc_device_handle_t handle); michael@0: michael@0: /** michael@0: * Enable or disable video capability of the device. michael@0: * @param handle - device handle michael@0: * @param [in] enable - a flag to indicate that application wants to enable of michael@0: * disable video capability of the device. michael@0: * @return void michael@0: */ michael@0: void CCAPI_Device_enableVideo(cc_device_handle_t handle, cc_boolean enable); michael@0: michael@0: /** michael@0: * Enable or disable camera capability of the device. michael@0: * @param handle - device handle michael@0: * @param [in] enable - a flag to indicate that application wants to enable of michael@0: * disable camera capability of the device. michael@0: * @return void michael@0: */ michael@0: void CCAPI_Device_enableCamera(cc_device_handle_t handle, cc_boolean enable); michael@0: michael@0: michael@0: /** michael@0: * CCAPI_Device_setDigestNamePasswd michael@0: * michael@0: * @param handle - device handle michael@0: * @param name - The Digest auth name michael@0: * @param passwd - The password for that name for the line michael@0: * @return void michael@0: */ michael@0: void CCAPI_Device_setDigestNamePasswd (cc_device_handle_t handle, michael@0: char *name, char *pw); michael@0: michael@0: michael@0: /** michael@0: * CCAPI_Device_IP_Update michael@0: * michael@0: * There is a update in the IP address and the values of new set michael@0: * of signaling and media IP addresses are provided. michael@0: * These value are compared with the current IP address values michael@0: * and depending on what changed, restart and/or re-invite michael@0: * action is taken. michael@0: * michael@0: * The case being addressed. michael@0: * 1) If the signaling IP change happens during a call, michael@0: * the change is deferred till phone is idle. michael@0: * 2)If media IP change happens during a call, it is applied immediately. michael@0: * 3) If both change, and call is active, that is treated same michael@0: * combination of case 1) and 2). michael@0: * 4) If no call is present, and signaling IP change, michael@0: * sipcc will re-register with new IP. michael@0: * michael@0: * @param handle - device handle michael@0: * @param signaling_ip - IP address that Must be used for signalling michael@0: * @param signaling_interface - Interface name associated with signaling IP michael@0: * @param signaling_int_type - Interface Type associated with signaling IP michael@0: * @param media_ip - IP address that Must be used for media michael@0: * @param media_interface - Interface name associated with Media IP michael@0: * @param media_int_type - Interface Type associated with Media IP michael@0: * @return void michael@0: */ michael@0: void CCAPI_Device_IP_Update (cc_device_handle_t handle, michael@0: const char *signaling_ip, michael@0: const char *sig_interface, michael@0: int sig_int_type, michael@0: const char *media_ip, michael@0: const char *media_interface, michael@0: int media_int_type); michael@0: michael@0: michael@0: /** michael@0: * CCAPI_Device_setVideoAutoTxPreference michael@0: * michael@0: * @param handle - device handle michael@0: * @param txPref - TRUE=> auto Tx Video prefered michael@0: * @return void michael@0: */ michael@0: void CCAPI_Device_setVideoAutoTxPreference (cc_device_handle_t handle, cc_boolean txPref); michael@0: michael@0: #endif /* _CCAPIAPI_DEVICE_H_ */