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 _CC_SERVICE_H_ |
michael@0 | 6 | #define _CC_SERVICE_H_ |
michael@0 | 7 | |
michael@0 | 8 | #include "cc_constants.h" |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * Defines the management methods. |
michael@0 | 12 | */ |
michael@0 | 13 | /** |
michael@0 | 14 | * The following methods are defined to bring up the pSipcc stack |
michael@0 | 15 | */ |
michael@0 | 16 | /** |
michael@0 | 17 | * Initialize the pSipcc stack. CC_Service_create() must be called before |
michael@0 | 18 | * calling this function. |
michael@0 | 19 | * @return SUCCESS or FAILURE |
michael@0 | 20 | */ |
michael@0 | 21 | cc_return_t CC_Service_init(); |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * This function creates various data module needed for initialization of |
michael@0 | 25 | * pSipcc stack. On reboot or after CC_Service_destroy(), application must call |
michael@0 | 26 | * first this function followed by CC_Service_init() and then |
michael@0 | 27 | * CC_Service_start() to bring pSipcc stack in in-service. This function |
michael@0 | 28 | * need to be called only once. |
michael@0 | 29 | * @return SUCCESS or FAILURE |
michael@0 | 30 | */ |
michael@0 | 31 | cc_return_t CC_Service_create(); |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Gracefully unload the pSipcc stack. To bring up the pSipcc stack again, |
michael@0 | 35 | * follow the function calling sequence starting from CC_Service_create(). |
michael@0 | 36 | * @return SUCCESS |
michael@0 | 37 | */ |
michael@0 | 38 | cc_return_t CC_Service_destroy(); |
michael@0 | 39 | |
michael@0 | 40 | /** |
michael@0 | 41 | * Bring up the pSipcc stack in service. CC_Service_init() must be called |
michael@0 | 42 | * before calling this function. |
michael@0 | 43 | * @return SUCCESS or FAILURE |
michael@0 | 44 | */ |
michael@0 | 45 | cc_return_t CC_Service_start(); |
michael@0 | 46 | |
michael@0 | 47 | /** |
michael@0 | 48 | * Shutdown pSipcc stack for restarting |
michael@0 | 49 | * @param mgmt_reason the reason to shutdown pSipcc stack |
michael@0 | 50 | * @param reason_string literal string for shutdown |
michael@0 | 51 | * @return SUCCESS or FAILURE |
michael@0 | 52 | */ |
michael@0 | 53 | cc_return_t CC_Service_shutdown(cc_shutdown_reason_t mgmt_reason, cc_string_t reason_string); |
michael@0 | 54 | |
michael@0 | 55 | /** |
michael@0 | 56 | * Unregister all lines of a phone |
michael@0 | 57 | * @param mgmt_reason the reason to bring down the registration |
michael@0 | 58 | * @param reason_string the literal string for unregistration |
michael@0 | 59 | * @return SUCCESS or FAILURE |
michael@0 | 60 | */ |
michael@0 | 61 | cc_return_t CC_Service_unregisterAllLines(cc_shutdown_reason_t mgmt_reason, cc_string_t reason_string); |
michael@0 | 62 | |
michael@0 | 63 | /** |
michael@0 | 64 | * Register all lines for a phone. |
michael@0 | 65 | * @param mgmt_reason the reason of registration |
michael@0 | 66 | * @param reason_string the literal string of the registration |
michael@0 | 67 | * @return SUCCESS or FAILURE |
michael@0 | 68 | */ |
michael@0 | 69 | cc_return_t CC_Service_registerAllLines(cc_shutdown_reason_t mgmt_reason, cc_string_t reason_string); |
michael@0 | 70 | |
michael@0 | 71 | /** |
michael@0 | 72 | * Restart pSipcc stack |
michael@0 | 73 | * @return SUCCESS or FAILURE |
michael@0 | 74 | */ |
michael@0 | 75 | cc_return_t CC_Service_restart(); |
michael@0 | 76 | |
michael@0 | 77 | #endif /* _CC_SERVICE_H_ */ |