1 /******************************************************************************
2  *
3  *  Copyright (C) 2014 The Android Open Source Project
4  *  Copyright 2002 - 2004 Open Interface North America, Inc. All rights
5  *                        reserved.
6  *
7  *  Licensed under the Apache License, Version 2.0 (the "License");
8  *  you may not use this file except in compliance with the License.
9  *  You may obtain a copy of the License at:
10  *
11  *  http://www.apache.org/licenses/LICENSE-2.0
12  *
13  *  Unless required by applicable law or agreed to in writing, software
14  *  distributed under the License is distributed on an "AS IS" BASIS,
15  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  *  See the License for the specific language governing permissions and
17  *  limitations under the License.
18  *
19  ******************************************************************************/
20 #ifndef _OI_MODULES_H
21 #define _OI_MODULES_H
22 /**
23  * @file
24  *
25  * Enumeration type defining the inidivual stack components.
26  *
27  */
28 
29 /*******************************************************************************
30   $Revision: #1 $
31  ******************************************************************************/
32 
33 /** \addtogroup Misc Miscellaneous APIs */
34 /**@{*/
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /**
41  * This enumeration lists constants for referencing the components of
42  * the BLUEmagic 3.0 protocol stack, profiles, and other functionalities.
43  *
44  * In order to distinguish types of modules, items are grouped with markers to
45  * delineate start and end of the groups
46  *
47  * The module type is used for various purposes:
48  *      identification in debug print statements
49  *      access to initialization flags
50  *      access to the configuration table
51  */
52 
53 typedef enum {
54   /* profiles and protocols  --> Updates to oi_debug.c and oi_config_table.c */
55 
56   /*   XX --> Keep Enum values up-to-date! */
57   OI_MODULE_AT,           /**< 00 AT command processing */
58   OI_MODULE_A2DP,         /**< 01 Advanced Audio Distribution Profile */
59   OI_MODULE_AVCTP,        /**< 02 Audio-Visual Control Transport Profile */
60   OI_MODULE_AVDTP,        /**< 03 Audio-Visual Distribution Protocol */
61   OI_MODULE_AVRCP,        /**< 04 Audio-Visual Remote Control Profile */
62   OI_MODULE_BIP_CLI,      /**< 05 Basic Imaging Profile protocol client */
63   OI_MODULE_BIP_SRV,      /**< 06 Basic Imaging Profile protocol server */
64   OI_MODULE_BNEP,         /**< 07 Bluetooth Network Encapsulation Protocol */
65   OI_MODULE_BPP_SENDER,   /**< 08 Basic Printing Profile */
66   OI_MODULE_BPP_PRINTER,  /**< 09 Basic Printing Profile */
67   OI_MODULE_CTP,          /**< 10 Cordless Telephony Profile */
68   OI_MODULE_DUN,          /**< 11 Dial-Up Networking Profile */
69   OI_MODULE_FAX,          /**< 12 Fax Profile */
70   OI_MODULE_FTP_CLI,      /**< 13 File Transfer Profile protocol client */
71   OI_MODULE_FTP_SRV,      /**< 14 File Transfer Profile protocol server */
72   OI_MODULE_HANDSFREE,    /**< 15 Hands-Free Profile */
73   OI_MODULE_HANDSFREE_AG, /**< 16 Hands-Free Profile */
74   OI_MODULE_HCRP_CLI,     /**< 17 Hardcopy Cable Replacement Profile */
75   OI_MODULE_HCRP_SRV,     /**< 18 Hardcopy Cable Replacement Profile */
76   OI_MODULE_HEADSET,      /**< 19 Headset Profile */
77   OI_MODULE_HEADSET_AG,   /**< 20 Headset Profile */
78   OI_MODULE_HID,          /**< 21 Human Interface Device profile */
79   OI_MODULE_INTERCOM,     /**< 22 Intercom Profile */
80   OI_MODULE_OBEX_CLI,     /**< 23 OBEX protocol client, Generic Object Exchange
81                              Profile */
82   OI_MODULE_OBEX_SRV,     /**< 24 OBEX protocol server, Generic Object Exchange
83                              Profile */
84   OI_MODULE_OPP_CLI,      /**< 25 Object Push Profile protocol client */
85   OI_MODULE_OPP_SRV,      /**< 26 Object Push Profile protocol server */
86   OI_MODULE_PAN,          /**< 27 PAN profile */
87   OI_MODULE_PBAP_CLI,     /**< 28 Phonebook Access Profile client */
88   OI_MODULE_PBAP_SRV,     /**< 29 Phonebook Access Profile server */
89   OI_MODULE_SAP_CLI,      /**< 30 SIM Access Profile */
90   OI_MODULE_SAP_SRV,      /**< 31 SIM Access Profile */
91   OI_MODULE_SPP,          /**< 32 Serial Port Profile */
92   OI_MODULE_SYNC_CLI,     /**< 33 Synchronization Profile */
93   OI_MODULE_SYNC_SRV,     /**< 34 Synchronization Profile */
94   OI_MODULE_SYNC_CMD_CLI, /**< 35 Synchronization Profile */
95   OI_MODULE_SYNC_CMD_SRV, /**< 36 Synchronization Profile */
96   OI_MODULE_SYNCML,       /**< 37 SyncML Profile */
97   OI_MODULE_TCS,          /**< 38 TCS Binary */
98   OI_MODULE_VDP,          /**< 39 Video Distribution Profile */
99 
100   /* corestack components   --> Updates to oi_debug.c and oi_config_table.c */
101 
102   OI_MODULE_COMMON_CONFIG, /**< 40 Common configuration, module has no meaning
103                               other than for config struct */
104   OI_MODULE_CMDCHAIN,      /**< 41 Command chaining utility */
105   OI_MODULE_DISPATCH,      /**< 42 Dispatcher */
106   OI_MODULE_DATAELEM,      /**< 43 Data Elements, marshaller */
107   OI_MODULE_DEVMGR,        /**< 44 Device Manager */
108   OI_MODULE_DEVMGR_MODES,  /**< 45 Device Manager connectability/discoverability
109                               modes */
110   OI_MODULE_HCI,           /**< 46 Host Controller Interface command layer */
111   OI_MODULE_L2CAP,         /**< 47 L2CAP */
112   OI_MODULE_MEMMGR,        /**< 48 modules that do memory management */
113   OI_MODULE_POLICYMGR,     /**< 49 Policy Manager */
114   OI_MODULE_RFCOMM,        /**< 50 RFCOMM */
115   OI_MODULE_RFCOMM_SD,     /**< 51 RFCOMM Service discovery */
116   OI_MODULE_SDP_CLI,       /**< 52 Service Discovery Protocol client */
117   OI_MODULE_SDP_SRV,       /**< 53 Service Discovery Protocol server */
118   OI_MODULE_SDPDB,         /**< 54 Service Discovery Protocol database */
119   OI_MODULE_SECMGR,        /**< 55 Security Manager */
120   OI_MODULE_SNIFFLOG,      /**< 56 sniff log */
121   OI_MODULE_SUPPORT, /**< 57 support functions, including CThru Dispatcher, time
122                         functions, and stack initialization */
123   OI_MODULE_TRANSPORT, /**< 58 transport layer between HCI command layer and
124                           driver */
125   OI_MODULE_TEST, /**< 59 used to debug output from internal test programs */
126   OI_MODULE_XML,  /**< 60 XML/CSS parser */
127 
128   OI_MODULE_DI, /**< 61 Device Identification Profile */
129 
130   // bhapi components  --> Updates to oi_debug.c
131 
132   OI_MODULE_BHAPI,           /**< 62 BLUEmagic Host API generic */
133   OI_MODULE_BHCLI,           /**< 63 BLUEmagic Host API client side */
134   OI_MODULE_BHSRV,           /**< 64 BLUEmagic Host API server side */
135   OI_MODULE_MSGQ,            /**< 65 module that handles message queuing */
136   OI_MODULE_BHAPI_TRANSPORT, /**< 66 module that handles message queuing */
137   OI_MODULE_BLST_SRV, /**< 67 module that provides server side BHAPI Lightweight
138                          Serial Transport */
139   OI_MODULE_BLST_CLI, /**< 68 module that provides client side BHAPI Lightweight
140                          Serial Transport */
141 
142   // OEM files --> Updates to oi_debug.c
143   OI_MODULE_OEM, /**< 69 Application Memory allocation */
144 
145   // Application glue --> Updates to oi_debug.c
146   OI_MODULE_APP, /**< 70 Application Memory allocation */
147 
148   /* various pieces of code depend on these last 2 elements occuring in a
149      specific order:
150      OI_MODULE_ALL must be the 2nd to last element
151      OI_MODULE_UNKNOWN must be the last element
152      */
153   OI_MODULE_ALL,    /**< 71 special value identifying all modules - used for
154                        control of debug print statements */
155   OI_MODULE_UNKNOWN /**< 72 special value - used for debug print statements */
156 } OI_MODULE;
157 
158 /**
159  * This constant is the number of actual modules in the list.  ALL and UNKNOWN
160  * are special values that are not actually modules.
161  * Used for debug print and memmgr profiling
162  */
163 #define OI_NUM_MODULES OI_MODULE_ALL
164 
165 /**
166  * This constant is the number of profile and core components.  It is used to
167  * size the initialization and configuration tables.
168  */
169 #define OI_NUM_STACK_MODULES OI_MODULE_BHAPI
170 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 /**@}*/
176 
177 #endif /* _OI_MODULES_H */
178