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

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef _CCAPI_DEVICE_H_
     6 #define _CCAPI_DEVICE_H_
     8 #include "ccapi_types.h"
    11 /**
    12  * Get device ID
    13  * @return cc_deviceinfo_ref_t - reference handle of the device
    14  */
    15 cc_device_handle_t CCAPI_Device_getDeviceID();
    17 /**
    18  * Get device reference handle
    19  * @param [in] id - device ID
    20  * @return cc_deviceinfo_ref_t - reference handle of the device
    21  * NOTE: The info returned by this method must be released using CCAPI_Device_releaseDeviceInfo()
    22  */
    23 cc_deviceinfo_ref_t CCAPI_Device_getDeviceInfo(cc_device_handle_t id);
    25 /**
    26  * Set full path of device configuration file. API will download and parse the config file using
    27  * provided location.
    28  * @param handle - device handle
    29  * @param [in] file_path - device config file full path
    30  * @return void
    31  */
    32 void CCAPI_Device_configUpdate(cc_device_handle_t handle, file_path_t file_path);
    34 /**
    35  * Retain the deviceInfo snapshot - this info shall not be freed until a
    36  * CCAPI_Device_releaseDeviceInfo() API releases this resource.
    37  * @param [in] ref - refrence to the block to be freed
    38  * @return void
    39  * NOTE: Application may use this API to retain the device info using this API inside
    40  * CCAPI_DeviceListener_onDeviceEvent() App must release the Info using
    41  * CCAPI_Device_releaseDeviceInfo() once it is done with it.
    42  */
    43 void CCAPI_Device_retainDeviceInfo(cc_deviceinfo_ref_t ref);
    45 /**
    46  * Release the deviceInfo snapshot
    47  * @param [in] ref - reference to the block to be freed
    48  * @return void
    49  */
    50 void CCAPI_Device_releaseDeviceInfo(cc_deviceinfo_ref_t ref);
    52 /**
    53  * Create a call on the device
    54  * Line selection is on the first available line. Lines that have there MNC reached will be skipped.
    55  * @param handle - device handle
    56  * @return cc_call_handle_t - handle of the call created
    57  */
    58 cc_call_handle_t CCAPI_Device_CreateCall(cc_device_handle_t handle);
    60 /**
    61  * Enable or disable video capability of the device.
    62  * @param handle - device handle
    63  * @param [in] enable - a flag to indicate that application wants to enable of
    64  * disable video capability of the device.
    65  * @return void
    66  */
    67 void CCAPI_Device_enableVideo(cc_device_handle_t handle, cc_boolean enable);
    69 /**
    70  * Enable or disable camera capability of the device.
    71  * @param handle - device handle
    72  * @param [in] enable - a flag to indicate that application wants to enable of
    73  * disable camera capability of the device.
    74  * @return void
    75  */
    76 void CCAPI_Device_enableCamera(cc_device_handle_t handle, cc_boolean enable);
    79 /**
    80  * CCAPI_Device_setDigestNamePasswd
    81  *
    82  * @param handle - device handle
    83  * @param name - The Digest auth name
    84  * @param passwd - The password for that name for the line
    85  * @return void
    86  */
    87 void CCAPI_Device_setDigestNamePasswd (cc_device_handle_t handle,
    88                                        char *name, char *pw);
    91 /**
    92  * CCAPI_Device_IP_Update
    93  *
    94  * There is a update in the IP address and the values of new set
    95  * of signaling and media IP addresses are provided.
    96  * These value are compared with the current IP address values
    97  * and depending on what changed, restart and/or re-invite
    98  * action is taken.
    99  *
   100  * The case being addressed.
   101  * 1) If the signaling IP change  happens during a call,
   102  *    the change is deferred till phone is idle.
   103  * 2)If media IP change happens during a call, it is applied immediately.
   104  * 3) If both change, and call is active, that is treated same
   105  *    combination of case 1) and 2).
   106  * 4) If no call is present, and signaling IP change,
   107  *    sipcc will re-register with new IP.
   108  *
   109  * @param handle - device handle
   110  * @param signaling_ip - IP address that Must be used for signalling
   111  * @param signaling_interface - Interface name associated with signaling IP
   112  * @param signaling_int_type - Interface Type associated with signaling IP
   113  * @param media_ip - IP address that Must be used for media
   114  * @param media_interface - Interface name associated with Media IP
   115  * @param media_int_type - Interface Type associated with Media IP
   116  * @return void
   117  */
   118 void CCAPI_Device_IP_Update (cc_device_handle_t handle,
   119                               const char *signaling_ip,
   120                               const char *sig_interface,
   121                               int sig_int_type,
   122                               const char *media_ip,
   123                               const char *media_interface,
   124                               int media_int_type);
   127 /**
   128  * CCAPI_Device_setVideoAutoTxPreference
   129  *
   130  * @param handle - device handle
   131  * @param txPref - TRUE=> auto Tx Video prefered
   132  * @return void
   133  */
   134 void CCAPI_Device_setVideoAutoTxPreference (cc_device_handle_t handle, cc_boolean txPref);
   136 #endif /* _CCAPIAPI_DEVICE_H_ */

mercurial