michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _CCAPI_SERVICE_H_ michael@0: #define _CCAPI_SERVICE_H_ michael@0: #include "cc_constants.h" michael@0: michael@0: /** michael@0: * Globals defined in ccapi_service.c michael@0: */ michael@0: extern int g_dev_hdl; michael@0: #define G_DEV_NAME_SIZE 64 michael@0: extern char g_dev_name[G_DEV_NAME_SIZE]; michael@0: #define G_CFG_P_SIZE 256 michael@0: extern char g_cfg_p[G_CFG_P_SIZE]; michael@0: extern int g_compl_cfg; michael@0: michael@0: /** michael@0: * Defines the management methods. michael@0: */ michael@0: michael@0: /** michael@0: * The following methods are defined to bring up the pSipcc stack michael@0: */ michael@0: michael@0: /** michael@0: * This function creates various data module needed for initialization of michael@0: * Sipcc stack. On reboot or after CCAPI_Service_destroy(), application must call michael@0: * first this function followed by CC_Service_start() michael@0: * to bring Sipcc stack in in-service. This function michael@0: * need to be called only once. michael@0: * @return SUCCESS or FAILURE michael@0: */ michael@0: cc_return_t CCAPI_Service_create(); michael@0: michael@0: /** michael@0: * Gracefully unload the Sipcc stack. To bring up the pSipcc stack again, michael@0: * follow the function calling sequence starting from CCAPI_Service_create(). michael@0: * @return SUCCESS michael@0: */ michael@0: cc_return_t CCAPI_Service_destroy(); michael@0: michael@0: /** michael@0: * Bring up the Sipcc stack in service. michael@0: * michael@0: * @return SUCCESS or FAILURE michael@0: */ michael@0: cc_return_t CCAPI_Service_start(); michael@0: michael@0: /** michael@0: * Stop Sipcc stack michael@0: * michael@0: * @return SUCCESS or FAILURE michael@0: */ michael@0: cc_return_t CCAPI_Service_stop(); michael@0: michael@0: /** michael@0: * CCAPI_Service_reregister michael@0: * michael@0: * This API will result in stopping the stip stack (i.e unregister) followed michael@0: * by parsing of the current config followed by a michael@0: * start (i.e register) of the SIP stack, without the download of a new config michael@0: * file. This API is used in the APPLY config case michael@0: * michael@0: * @param device_handle handle of the device, the response is for michael@0: * @param device_name michael@0: * @param cfg the config file name and path or the complete configuration michael@0: * in memory. michael@0: * @param from_memory boolean flag to indicate if the complete config michael@0: * is sent. This parameter is meant to indicate if the "cfg" parameter michael@0: * points to the file name or is a pointer to the complete config in memory. michael@0: * @return michael@0: */ michael@0: cc_return_t CCAPI_Service_reregister (int device_handle, const char *device_name, michael@0: const char *cfg, int from_memory); michael@0: michael@0: /** michael@0: * Reset request from the Reset Manager michael@0: * michael@0: * @return void michael@0: */ michael@0: void CCAPI_Service_reset_request(); michael@0: michael@0: #endif /* _CCAPI_SERVICE_H_ */