Thu, 15 Jan 2015 15:59:08 +0100
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.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef _CCAPI_SERVICE_H_ |
michael@0 | 6 | #define _CCAPI_SERVICE_H_ |
michael@0 | 7 | #include "cc_constants.h" |
michael@0 | 8 | |
michael@0 | 9 | /** |
michael@0 | 10 | * Globals defined in ccapi_service.c |
michael@0 | 11 | */ |
michael@0 | 12 | extern int g_dev_hdl; |
michael@0 | 13 | #define G_DEV_NAME_SIZE 64 |
michael@0 | 14 | extern char g_dev_name[G_DEV_NAME_SIZE]; |
michael@0 | 15 | #define G_CFG_P_SIZE 256 |
michael@0 | 16 | extern char g_cfg_p[G_CFG_P_SIZE]; |
michael@0 | 17 | extern int g_compl_cfg; |
michael@0 | 18 | |
michael@0 | 19 | /** |
michael@0 | 20 | * Defines the management methods. |
michael@0 | 21 | */ |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * The following methods are defined to bring up the pSipcc stack |
michael@0 | 25 | */ |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * This function creates various data module needed for initialization of |
michael@0 | 29 | * Sipcc stack. On reboot or after CCAPI_Service_destroy(), application must call |
michael@0 | 30 | * first this function followed by CC_Service_start() |
michael@0 | 31 | * to bring Sipcc stack in in-service. This function |
michael@0 | 32 | * need to be called only once. |
michael@0 | 33 | * @return SUCCESS or FAILURE |
michael@0 | 34 | */ |
michael@0 | 35 | cc_return_t CCAPI_Service_create(); |
michael@0 | 36 | |
michael@0 | 37 | /** |
michael@0 | 38 | * Gracefully unload the Sipcc stack. To bring up the pSipcc stack again, |
michael@0 | 39 | * follow the function calling sequence starting from CCAPI_Service_create(). |
michael@0 | 40 | * @return SUCCESS |
michael@0 | 41 | */ |
michael@0 | 42 | cc_return_t CCAPI_Service_destroy(); |
michael@0 | 43 | |
michael@0 | 44 | /** |
michael@0 | 45 | * Bring up the Sipcc stack in service. |
michael@0 | 46 | * |
michael@0 | 47 | * @return SUCCESS or FAILURE |
michael@0 | 48 | */ |
michael@0 | 49 | cc_return_t CCAPI_Service_start(); |
michael@0 | 50 | |
michael@0 | 51 | /** |
michael@0 | 52 | * Stop Sipcc stack |
michael@0 | 53 | * |
michael@0 | 54 | * @return SUCCESS or FAILURE |
michael@0 | 55 | */ |
michael@0 | 56 | cc_return_t CCAPI_Service_stop(); |
michael@0 | 57 | |
michael@0 | 58 | /** |
michael@0 | 59 | * CCAPI_Service_reregister |
michael@0 | 60 | * |
michael@0 | 61 | * This API will result in stopping the stip stack (i.e unregister) followed |
michael@0 | 62 | * by parsing of the current config followed by a |
michael@0 | 63 | * start (i.e register) of the SIP stack, without the download of a new config |
michael@0 | 64 | * file. This API is used in the APPLY config case |
michael@0 | 65 | * |
michael@0 | 66 | * @param device_handle handle of the device, the response is for |
michael@0 | 67 | * @param device_name |
michael@0 | 68 | * @param cfg the config file name and path or the complete configuration |
michael@0 | 69 | * in memory. |
michael@0 | 70 | * @param from_memory boolean flag to indicate if the complete config |
michael@0 | 71 | * is sent. This parameter is meant to indicate if the "cfg" parameter |
michael@0 | 72 | * points to the file name or is a pointer to the complete config in memory. |
michael@0 | 73 | * @return |
michael@0 | 74 | */ |
michael@0 | 75 | cc_return_t CCAPI_Service_reregister (int device_handle, const char *device_name, |
michael@0 | 76 | const char *cfg, int from_memory); |
michael@0 | 77 | |
michael@0 | 78 | /** |
michael@0 | 79 | * Reset request from the Reset Manager |
michael@0 | 80 | * |
michael@0 | 81 | * @return void |
michael@0 | 82 | */ |
michael@0 | 83 | void CCAPI_Service_reset_request(); |
michael@0 | 84 | |
michael@0 | 85 | #endif /* _CCAPI_SERVICE_H_ */ |