blob: c7a0da8e5e4b1b44390d4052029ff4a835141999 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lamaa8e15a2014-02-11 23:30:06 -08002 * Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
3 * All Rights Reserved.
4 * Qualcomm Atheros Confidential and Proprietary.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08005 */
Jeff Johnson295189b2012-06-20 16:38:30 -07006#if !defined( __VOS_GETBIN_H )
7#define __VOS_GETBIN_H
8
9/**=========================================================================
Jeff Johnsonf811b1b2013-02-27 10:38:50 -080010
Jeff Johnson295189b2012-06-20 16:38:30 -070011 \file vos_getBin.h
Jeff Johnsonf811b1b2013-02-27 10:38:50 -080012
Jeff Johnson295189b2012-06-20 16:38:30 -070013 \brief virtual Operating System Services (vOSS) binary APIs
Jeff Johnsonf811b1b2013-02-27 10:38:50 -080014
Jeff Johnson295189b2012-06-20 16:38:30 -070015 Binary retrieval definitions and APIs.
Jeff Johnsonf811b1b2013-02-27 10:38:50 -080016
Jeff Johnson295189b2012-06-20 16:38:30 -070017 These APIs allow components to retrieve binary contents (firmware,
18 configuration data, etc.) from a storage medium on the platform.
Jeff Johnson295189b2012-06-20 16:38:30 -070019 ========================================================================*/
20
21/* $Header$ */
22
23/*--------------------------------------------------------------------------
24 Include Files
25 ------------------------------------------------------------------------*/
26#include <vos_types.h>
27#include <vos_status.h>
28
29/*--------------------------------------------------------------------------
30 Preprocessor definitions and constants
31 ------------------------------------------------------------------------*/
32
33/*--------------------------------------------------------------------------
34 Type declarations
35 ------------------------------------------------------------------------*/
36/// Binary IDs
37typedef enum
38{
39 /// Binary ID for firmware
40 VOS_BINARY_ID_FIRMWARE,
41
42 /// Binary ID for Configuration data
43 VOS_BINARY_ID_CONFIG,
44
45 /// Binary ID for country code to regulatory domain mapping
46 VOS_BINARY_ID_COUNTRY_INFO,
47
48 /// Binary ID for Handoff Configuration data
Prasanna Kumarf6c94ae2013-04-11 20:05:21 -070049 VOS_BINARY_ID_HO_CONFIG,
50
51 /// Binary ID for Dictionary Configuration data
52 VOS_BINARY_ID_DICT_CONFIG
Jeff Johnson295189b2012-06-20 16:38:30 -070053
54
55} VOS_BINARY_ID;
56
57
58
59/*-------------------------------------------------------------------------
60 Function declarations and documenation
61 ------------------------------------------------------------------------*/
62
63
64/**---------------------------------------------------------------------------
65
66 \brief vos_get_binary_blob() - get binary data from platform
67
68 This API allows components to get binary data from the platform independent
69 of where the data is stored on the device.
70
71 <ul>
72 <li> Firmware
73 <li> Configuration Data
74 </ul>
75
76 \param binaryId - identifies the binary data to return to the caller.
77
78 \param pBuffer - a pointer to the buffer where the binary data will be
79 retrieved. Memory for this buffer is allocated by the caller
80 and free'd by the caller. vOSS will fill this buffer with
81 raw binary data and update the *pBufferSize with the exact
82 size of the data that has been retreived.
83
84 Input value of NULL is valid and will cause the API to return
85 the size of the binary data in *pBufferSize.
86
87 \param pBufferSize - pointer to a variable that upon input contains the
88 size of the data buffer available at pBuffer. Upon success, this
89 variable is updated with the size of the binary data that was
90 retreived and written to the buffer at pBuffer.
91
92 Input value of 0 is valid and will cause the API to return
93 the size of the binary data in *pBufferSize.
94
95 \return VOS_STATUS_SUCCESS - the binary data has been successfully
96 retreived and written to the buffer.
97
98 VOS_STATUS_E_INVAL - The value specified by binaryId does not
99 refer to a valid VOS Binary ID.
100
101 VOS_STATUS_E_FAULT - pBufferSize is not a valid pointer to a
102 variable that the API can write to.
103
104 VOS_STATUS_E_NOMEM - the memory referred to by pBuffer and
105 *pBufferSize is not big enough to contain the binary.
106
107 \sa
108
109 --------------------------------------------------------------------------*/
110VOS_STATUS vos_get_binary_blob( VOS_BINARY_ID binaryId,
111 v_VOID_t *pBuffer, v_SIZE_t *pBufferSize );
112
Jeff Johnson295189b2012-06-20 16:38:30 -0700113/**----------------------------------------------------------------------------
114 \brief vos_get_conparam()- function to read the insmod parameters
115-----------------------------------------------------------------------------*/
116tVOS_CON_MODE vos_get_conparam( void );
Jeff Johnson295189b2012-06-20 16:38:30 -0700117tVOS_CONCURRENCY_MODE vos_get_concurrency_mode( void );
118v_BOOL_t vos_concurrent_sessions_running(void);
119
120#endif // !defined __VOS_GETBIN_H