media/webrtc/signaling/src/sipcc/include/ccapi_device.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/webrtc/signaling/src/sipcc/include/ccapi_device.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,136 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef _CCAPI_DEVICE_H_
     1.9 +#define _CCAPI_DEVICE_H_
    1.10 +
    1.11 +#include "ccapi_types.h"
    1.12 +
    1.13 +
    1.14 +/**
    1.15 + * Get device ID
    1.16 + * @return cc_deviceinfo_ref_t - reference handle of the device
    1.17 + */
    1.18 +cc_device_handle_t CCAPI_Device_getDeviceID();
    1.19 +
    1.20 +/**
    1.21 + * Get device reference handle
    1.22 + * @param [in] id - device ID
    1.23 + * @return cc_deviceinfo_ref_t - reference handle of the device
    1.24 + * NOTE: The info returned by this method must be released using CCAPI_Device_releaseDeviceInfo()
    1.25 + */
    1.26 +cc_deviceinfo_ref_t CCAPI_Device_getDeviceInfo(cc_device_handle_t id);
    1.27 +
    1.28 +/**
    1.29 + * Set full path of device configuration file. API will download and parse the config file using
    1.30 + * provided location.
    1.31 + * @param handle - device handle
    1.32 + * @param [in] file_path - device config file full path
    1.33 + * @return void
    1.34 + */
    1.35 +void CCAPI_Device_configUpdate(cc_device_handle_t handle, file_path_t file_path);
    1.36 +
    1.37 +/**
    1.38 + * Retain the deviceInfo snapshot - this info shall not be freed until a
    1.39 + * CCAPI_Device_releaseDeviceInfo() API releases this resource.
    1.40 + * @param [in] ref - refrence to the block to be freed
    1.41 + * @return void
    1.42 + * NOTE: Application may use this API to retain the device info using this API inside
    1.43 + * CCAPI_DeviceListener_onDeviceEvent() App must release the Info using
    1.44 + * CCAPI_Device_releaseDeviceInfo() once it is done with it.
    1.45 + */
    1.46 +void CCAPI_Device_retainDeviceInfo(cc_deviceinfo_ref_t ref);
    1.47 +
    1.48 +/**
    1.49 + * Release the deviceInfo snapshot
    1.50 + * @param [in] ref - reference to the block to be freed
    1.51 + * @return void
    1.52 + */
    1.53 +void CCAPI_Device_releaseDeviceInfo(cc_deviceinfo_ref_t ref);
    1.54 +
    1.55 +/**
    1.56 + * Create a call on the device
    1.57 + * Line selection is on the first available line. Lines that have there MNC reached will be skipped.
    1.58 + * @param handle - device handle
    1.59 + * @return cc_call_handle_t - handle of the call created
    1.60 + */
    1.61 +cc_call_handle_t CCAPI_Device_CreateCall(cc_device_handle_t handle);
    1.62 +
    1.63 +/**
    1.64 + * Enable or disable video capability of the device.
    1.65 + * @param handle - device handle
    1.66 + * @param [in] enable - a flag to indicate that application wants to enable of
    1.67 + * disable video capability of the device.
    1.68 + * @return void
    1.69 + */
    1.70 +void CCAPI_Device_enableVideo(cc_device_handle_t handle, cc_boolean enable);
    1.71 +
    1.72 +/**
    1.73 + * Enable or disable camera capability of the device.
    1.74 + * @param handle - device handle
    1.75 + * @param [in] enable - a flag to indicate that application wants to enable of
    1.76 + * disable camera capability of the device.
    1.77 + * @return void
    1.78 + */
    1.79 +void CCAPI_Device_enableCamera(cc_device_handle_t handle, cc_boolean enable);
    1.80 +
    1.81 +
    1.82 +/**
    1.83 + * CCAPI_Device_setDigestNamePasswd
    1.84 + *
    1.85 + * @param handle - device handle
    1.86 + * @param name - The Digest auth name
    1.87 + * @param passwd - The password for that name for the line
    1.88 + * @return void
    1.89 + */
    1.90 +void CCAPI_Device_setDigestNamePasswd (cc_device_handle_t handle,
    1.91 +                                       char *name, char *pw);
    1.92 +
    1.93 +
    1.94 +/**
    1.95 + * CCAPI_Device_IP_Update
    1.96 + *
    1.97 + * There is a update in the IP address and the values of new set
    1.98 + * of signaling and media IP addresses are provided.
    1.99 + * These value are compared with the current IP address values
   1.100 + * and depending on what changed, restart and/or re-invite
   1.101 + * action is taken.
   1.102 + *
   1.103 + * The case being addressed.
   1.104 + * 1) If the signaling IP change  happens during a call,
   1.105 + *    the change is deferred till phone is idle.
   1.106 + * 2)If media IP change happens during a call, it is applied immediately.
   1.107 + * 3) If both change, and call is active, that is treated same
   1.108 + *    combination of case 1) and 2).
   1.109 + * 4) If no call is present, and signaling IP change,
   1.110 + *    sipcc will re-register with new IP.
   1.111 + *
   1.112 + * @param handle - device handle
   1.113 + * @param signaling_ip - IP address that Must be used for signalling
   1.114 + * @param signaling_interface - Interface name associated with signaling IP
   1.115 + * @param signaling_int_type - Interface Type associated with signaling IP
   1.116 + * @param media_ip - IP address that Must be used for media
   1.117 + * @param media_interface - Interface name associated with Media IP
   1.118 + * @param media_int_type - Interface Type associated with Media IP
   1.119 + * @return void
   1.120 + */
   1.121 +void CCAPI_Device_IP_Update (cc_device_handle_t handle,
   1.122 +                              const char *signaling_ip,
   1.123 +                              const char *sig_interface,
   1.124 +                              int sig_int_type,
   1.125 +                              const char *media_ip,
   1.126 +                              const char *media_interface,
   1.127 +                              int media_int_type);
   1.128 +
   1.129 +
   1.130 +/**
   1.131 + * CCAPI_Device_setVideoAutoTxPreference
   1.132 + *
   1.133 + * @param handle - device handle
   1.134 + * @param txPref - TRUE=> auto Tx Video prefered
   1.135 + * @return void
   1.136 + */
   1.137 +void CCAPI_Device_setVideoAutoTxPreference (cc_device_handle_t handle, cc_boolean txPref);
   1.138 +
   1.139 +#endif /* _CCAPIAPI_DEVICE_H_ */

mercurial