media/webrtc/signaling/src/sipcc/include/config_api.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 _CONFIG_API_H_
     6 #define _CONFIG_API_H_
     8 #include "cc_types.h"
    11 /**
    12  * configFetchReq
    13  *
    14  * This function tells the config manager to fetch the CTL file
    15  * and then fetch the config  from the CUCM. It is expected that
    16  * this will result in processing of
    17  * the config file after the config managers response is received.
    18  *
    19  * The response received for this request is asynchronous and
    20  * should be handled via event provided by config manager.
    21  * The CCAPI_Config_reponse api needs to be called for the
    22  * handling of the response to the fetch request
    23  *
    24  */
    25 void configFetchReq(int device_handle);
    27 /**
    28  * configParserError
    29  *
    30  * Notify the config manager that the config file has an error
    31  * and a new config file needs to be downloaded.
    32  *
    33  * The error could be XML format error or minimum config not being
    34  * present in the config file.  It is expected that
    35  * this will result in processing of
    36  * the config file after the config managers response is received.
    37  *
    38  */
    39 void configParserError(void);
    41 /**
    42  * When called this function should register with CUCM without prior device file download.
    43  */
    44 void CCAPI_Start_response(int device_handle, const char *device_name, const char *sipUser, const char *sipPassword, const char *sipDomain);
    46 /**
    47  * Inform application that pSipcc stack has receive a NOTIFY message of event
    48  * type "service-control" and action=apply-config. The arguments passed to this
    49  * function contains the parameter values received in the message.
    50  *
    51  * @param config_version [in] latest version stamp of phone configuration.
    52  * @param dial_plan_version [in] latest version stamp of the dial plan.
    53  * @param fcp_version [in] latest version stamp of feature policy control.
    54  * @param cucm_result  [in] action taken by the cucm for the changes applied by the
    55  * user to the phone configuration. cucm result could be
    56  *  @li "no_change" - the new phone configuration changes do not impact Unified CM,
    57  *  @li "config_applied" - The Unified CM Administration applied the
    58  *  configuration changes dynamically without requiring phone to re-register,
    59  *  @li "reregister_needed" - The Unified CM Administration applied the
    60  *  configuration changes and required the phone to re-register to make them
    61  *  effective.
    62  * @param load_id [in] - firmware image name that phone should be running with
    63  * @param inactive_load_id [in] - firmware image name that phone should be in inactive partition.
    64  * @param load_server [in] - address of load server to download the  firmware
    65  * image load_id.
    66  * @param log_server [in] - log server address where error report need to be
    67  * sent. Error report, for example, could be related to image download failure
    68  * or phone configuration file download failure.
    69  * @param ppid [in] whether peer to peer upgrade is available
    70  * @return void
    71  */
    72 void configApplyConfigNotify(cc_string_t config_version,
    73 		cc_string_t dial_plan_version,
    74 		cc_string_t fcp_version,
    75 		cc_string_t cucm_result,
    76 		cc_string_t load_id,
    77 		cc_string_t inactive_load_id,
    78 		cc_string_t load_server,
    79 		cc_string_t log_server,
    80 		cc_boolean ppid);
    82 /**
    83  * dialPlanFetchReq
    84  *
    85  * This function tells the get file request service to fetch the latest dial
    86  * plan from the CUCM.
    87  *
    88  * @param device_handle [in] handle of the device, the response is for
    89  * @param dialPlanFileName [in] the name of dialplan file to retrieve
    90  * @return cc_boolean indicating success/failure
    91  *
    92  */
    93 cc_boolean dialPlanFetchReq(int device_handle, char* dialPlanFileName);
    95 /**
    96  * fcpFetchReq
    97  *
    98  * This function tells the get file request service to fetch the latest fcp
    99  * file from the CUCM.
   100  *
   101  * @param device_handle [in] handle of the device, the response is for
   102  * @param dialPlanFileName [in] the name of fcp file to retrieve
   103 *  @return cc_boolean indicating success/failure
   104  *
   105  */
   106 cc_boolean fcpFetchReq(int device_handle, char* fcpFileName);
   109 cc_boolean CCAPI_Config_set_server_address(const char *ip_address);
   110 cc_boolean CCAPI_Config_set_transport_udp(const cc_boolean is_udp);
   111 cc_boolean CCAPI_Config_set_local_voip_port(const int port);
   112 cc_boolean CCAPI_Config_set_remote_voip_port(const int port);
   113 int CCAPI_Config_get_local_voip_port();
   114 int CCAPI_Config_get_remote_voip_port();
   115 const char* CCAPI_Config_get_version();
   116 cc_boolean CCAPI_Config_set_p2p_mode(const cc_boolean is_p2p);
   117 cc_boolean CCAPI_Config_set_sdp_mode(const cc_boolean is_sdp);
   118 cc_boolean CCAPI_Config_set_avp_mode(const cc_boolean is_rtpsavpf);
   120 #endif  /* _CONFIG_API_H_ */

mercurial