Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | aa8e15a | 2014-02-11 23:30:06 -0800 | [diff] [blame^] | 2 | * Copyright (c) 2012-2013 Qualcomm Atheros, Inc. |
| 3 | * All Rights Reserved. |
| 4 | * Qualcomm Atheros Confidential and Proprietary. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 5 | */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 6 | #if !defined( __VOS_GETBIN_H ) |
| 7 | #define __VOS_GETBIN_H |
| 8 | |
| 9 | /**========================================================================= |
Jeff Johnson | f811b1b | 2013-02-27 10:38:50 -0800 | [diff] [blame] | 10 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 11 | \file vos_getBin.h |
Jeff Johnson | f811b1b | 2013-02-27 10:38:50 -0800 | [diff] [blame] | 12 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 13 | \brief virtual Operating System Services (vOSS) binary APIs |
Jeff Johnson | f811b1b | 2013-02-27 10:38:50 -0800 | [diff] [blame] | 14 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 15 | Binary retrieval definitions and APIs. |
Jeff Johnson | f811b1b | 2013-02-27 10:38:50 -0800 | [diff] [blame] | 16 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 17 | These APIs allow components to retrieve binary contents (firmware, |
| 18 | configuration data, etc.) from a storage medium on the platform. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 19 | ========================================================================*/ |
| 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 |
| 37 | typedef 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 Kumar | f6c94ae | 2013-04-11 20:05:21 -0700 | [diff] [blame] | 49 | VOS_BINARY_ID_HO_CONFIG, |
| 50 | |
| 51 | /// Binary ID for Dictionary Configuration data |
| 52 | VOS_BINARY_ID_DICT_CONFIG |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 53 | |
| 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 | --------------------------------------------------------------------------*/ |
| 110 | VOS_STATUS vos_get_binary_blob( VOS_BINARY_ID binaryId, |
| 111 | v_VOID_t *pBuffer, v_SIZE_t *pBufferSize ); |
| 112 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 113 | /**---------------------------------------------------------------------------- |
| 114 | \brief vos_get_conparam()- function to read the insmod parameters |
| 115 | -----------------------------------------------------------------------------*/ |
| 116 | tVOS_CON_MODE vos_get_conparam( void ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 117 | tVOS_CONCURRENCY_MODE vos_get_concurrency_mode( void ); |
| 118 | v_BOOL_t vos_concurrent_sessions_running(void); |
| 119 | |
| 120 | #endif // !defined __VOS_GETBIN_H |