FreeCalypso > hg > fc-magnetite
comparison src/ui3/mfw/mfw_Btips.h @ 420:e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sun, 21 Jan 2018 03:09:00 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 419:59143cd42ec7 | 420:e8ddbb0837ed |
|---|---|
| 1 #ifndef DEF_MFW_BTIPS | |
| 2 #define DEF_MFW_BTIPS | |
| 3 /* ========================================================= | |
| 4 * Texas Instruments OMAP(TM) Platform Software | |
| 5 * (c) Copyright Texas Instruments, Incorporated. All Rights Reserved. | |
| 6 * | |
| 7 * Use of this software is controlled by the terms and conditions found | |
| 8 * in the license agreement under which this software has been supplied. | |
| 9 * ========================================================== */ | |
| 10 /* | |
| 11 $Project name: Basic Bluetooth MMI | |
| 12 $Project code: | |
| 13 $Module: Bluetooth BMG MFW | |
| 14 $File: Mfw_Btips.h | |
| 15 $Revision: 1.0 | |
| 16 $Author: Texas Instruments | |
| 17 $Date: 26/06/07 | |
| 18 | |
| 19 ******************************************************************************** | |
| 20 | |
| 21 Description: | |
| 22 | |
| 23 This module provides the BTIPS BMG APPlication functionality. | |
| 24 | |
| 25 ******************************************************************************** | |
| 26 $History: Mfw_Btips.h | |
| 27 | |
| 28 26/06/07 Sasken original version | |
| 29 | |
| 30 $End | |
| 31 | |
| 32 *******************************************************************************/ | |
| 33 | |
| 34 #define MFW_BTIPS_SUCCESS 1 | |
| 35 #define MFW_BTIPS_FAILED 0 | |
| 36 | |
| 37 #define BT_FS_MAX_PATH_LENGTH 256 | |
| 38 #define BT_MAX_REM_DEV_NAME 248 | |
| 39 #define BT_DEMO_FOLDER_PATH "/MfwBtDemo" | |
| 40 /* Macro for sending events to UI - meanwhile, trace message to PCO Viewer */ | |
| 41 void mfw_BtipsReport(char *format,...); | |
| 42 #define mfw_BtipsReport(f) vsi_o_event_ttrace(f); | |
| 43 | |
| 44 #define BT_MAX_REM_DEV_NAME 248 | |
| 45 #define BT_MAX_OBJECT_NAME_LEN 256 | |
| 46 | |
| 47 | |
| 48 typedef U8 MfwBtMainEvent; | |
| 49 | |
| 50 typedef U8 BtEventType; | |
| 51 | |
| 52 typedef U8 MfwFtpsEventType; | |
| 53 typedef U8 MfwVgEventType; | |
| 54 | |
| 55 typedef struct _mfwBtBmgEvent | |
| 56 { | |
| 57 BtEventType eventType; /* BtEventType - ME Event Type*/ | |
| 58 BtErrorCode errCode; /* BtErrorCode - Error code */ | |
| 59 BD_ADDR bdAddr; /* Device Address */ | |
| 60 union | |
| 61 { | |
| 62 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 63 /* Results for BTEVENT_DISCOVER_SERVICES_RESULT event */ | |
| 64 SdpServicesMask discoveredServicesMask; | |
| 65 }p; | |
| 66 | |
| 67 }MfwBtBmgEvent; | |
| 68 | |
| 69 typedef struct _mfwBtOppsEvent | |
| 70 { | |
| 71 BtEventType mfwOppsEventType; /* BtEventType - ME Event Type*/ | |
| 72 union | |
| 73 { | |
| 74 struct | |
| 75 { | |
| 76 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 77 U8 oppObjectName[80]; | |
| 78 }opps; | |
| 79 }p; | |
| 80 }MfwBtOppsEvent; | |
| 81 typedef struct _mfwBtVgEvent | |
| 82 { | |
| 83 MfwVgEventType event; | |
| 84 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 85 BD_ADDR bdAddr; | |
| 86 }MfwBtVgEvent; | |
| 87 | |
| 88 typedef struct _mfwBtFtpsEvent | |
| 89 { | |
| 90 MfwFtpsEventType event; | |
| 91 union | |
| 92 { | |
| 93 struct | |
| 94 { | |
| 95 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 96 BD_ADDR bdAddr; | |
| 97 }ftpConnect; | |
| 98 struct | |
| 99 { | |
| 100 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 101 BD_ADDR bdAddr; | |
| 102 }ftpDisconnect; | |
| 103 struct | |
| 104 { | |
| 105 U16 percent; | |
| 106 }ftpPercentComplete; | |
| 107 struct | |
| 108 { | |
| 109 U8 objectName[BT_MAX_OBJECT_NAME_LEN]; | |
| 110 }ftpComplete; | |
| 111 struct | |
| 112 { | |
| 113 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 114 BD_ADDR bdAddr; | |
| 115 U8 objectName[BT_MAX_OBJECT_NAME_LEN]; | |
| 116 }ftpGetRequest; | |
| 117 struct | |
| 118 { | |
| 119 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 120 BD_ADDR bdAddr; | |
| 121 U8 objectName[BT_MAX_OBJECT_NAME_LEN]; | |
| 122 }ftpPutRequest; | |
| 123 struct | |
| 124 { | |
| 125 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 126 BD_ADDR bdAddr; | |
| 127 U8 objectName[BT_MAX_OBJECT_NAME_LEN]; | |
| 128 }ftpDeleteRequest; | |
| 129 | |
| 130 }p; | |
| 131 | |
| 132 }MfwBtFtpsEvent; | |
| 133 | |
| 134 typedef struct _mfwBtMdgEvent | |
| 135 { | |
| 136 BtEventType mfwMdgEventType; /* BtEventType - ME Event Type*/ | |
| 137 union | |
| 138 { | |
| 139 struct | |
| 140 { | |
| 141 U8 deviceName[BT_MAX_REM_DEV_NAME + 1]; | |
| 142 }mdg; | |
| 143 }p; | |
| 144 }MfwBtMdgEvent; | |
| 145 | |
| 146 typedef U8 MfwBtOppcEvent; | |
| 147 typedef U8 MfwBtA2dpEvent; | |
| 148 /*mfwBtipsEventType modules*/ | |
| 149 #define MFW_BTIPS_MAIN_EVENT 0 | |
| 150 #define MFW_BTIPS_BMG_EVENT 1 | |
| 151 #define MFW_BTIPS_OPPS_EVENT 2 | |
| 152 #define MFW_BTIPS_OPPC_EVENT 3 | |
| 153 #define MFW_BTIPS_FTPS_EVENT 4 | |
| 154 #define MFW_BTIPS_VG_EVENT 5 | |
| 155 #define MFW_BTIPS_MDG_EVENT 6 | |
| 156 | |
| 157 #define MFW_BTIPS_FTPS_PUT_EVENT 1 | |
| 158 #define MFW_BTIPS_FTPS_GET_EVENT 2 | |
| 159 #define MFW_BTIPS_FTPS_DELETE_EVENT 3 | |
| 160 #define MFW_BTIPS_FTPS_COMPLETE_EVENT 4 //vamsee | |
| 161 #define MFW_BTIPS_FTPS_ABORTED_EVENT 5 //vamsee | |
| 162 #define MFW_BTIPS_FTPS_PUT_COMP_EVENT 6 | |
| 163 //#define MFW_BTIPS_FTPS_GET_COMP_EVENT 7 | |
| 164 #define MFW_BTIPS_FTPS_DELETE_COMP_EVENT 8 | |
| 165 #define MFW_BTIPS_FTPS_CONNECT_EVENT 9 | |
| 166 #define MFW_BTIPS_FTPS_DISCONNECT_EVENT 10 | |
| 167 | |
| 168 | |
| 169 #define MFW_BTIPS_VG_CONNECT_EVENT 1 | |
| 170 #define MFW_BTIPS_VG_DISCONNECT_EVENT 2 | |
| 171 #define MFW_BTIPS_VG_AUDIO_CONNECT_EVENT 3 | |
| 172 #define MFW_BTIPS_VG_AUDIO_DISCONNECT_EVENT 4 | |
| 173 | |
| 174 #define MFW_BTIPS_OPPS_PUSH_EVENT 1 | |
| 175 #define MFW_BTIPS_OPPS_PULL_EVENT 2 | |
| 176 #define MFW_BTIPS_OPPS_PUSH_COMP_EVENT 6 | |
| 177 #define MFW_BTIPS_OPPS_PULL_COMP_EVENT 4 | |
| 178 //#define MFW_BTIPS_OPPS_DISCONNECT_EVENT 4 | |
| 179 | |
| 180 typedef struct _T_BTIPS_MMI_IND | |
| 181 { | |
| 182 U8 mfwBtipsEventType; | |
| 183 union | |
| 184 { | |
| 185 MfwBtMainEvent btlBtEvent; | |
| 186 MfwBtBmgEvent bmgBtEvent; | |
| 187 /*Give yr own required Structure definition for the data that is to be carried | |
| 188 from BTS context to the MMI (ACI) context*/ | |
| 189 MfwBtOppsEvent oppsBtEvent; | |
| 190 MfwBtOppcEvent oppcBtEvent; | |
| 191 MfwBtFtpsEvent ftpsBtEvent; | |
| 192 MfwBtVgEvent vgBtEvent; | |
| 193 MfwBtMdgEvent mdgBtEvent; | |
| 194 MfwBtA2dpEvent a2dpBtEvent; | |
| 195 | |
| 196 /*.....Event types can be defined for other modules*/ | |
| 197 }data; | |
| 198 | |
| 199 }T_BTIPS_MMI_IND; | |
| 200 | |
| 201 /******************BTIPS Generic EVENTS************************/ | |
| 202 #define E_BTIPS_POWERON_SUCCESS (T_MFW_EVENT)0x00000001 | |
| 203 #define E_BTIPS_POWERON_FAILURE (T_MFW_EVENT)0x00000002 | |
| 204 #define E_BTIPS_POWEROFF_SUCCESS (T_MFW_EVENT)0x00000004 | |
| 205 #define E_BTIPS_BMG_PAIRING_COMPLETE (T_MFW_EVENT)0x00000008 | |
| 206 #define E_BTIPS_INCOMING_PIN_REQ (T_MFW_EVENT)0x00000010 | |
| 207 #define E_BTIPS_BT_NOT_ON (T_MFW_EVENT)0x00000020 | |
| 208 #define E_BTIPS_FATAL_ERROR (T_MFW_EVENT)0x00000040 | |
| 209 #define E_BTIPS_FTPS_PUT_EVENT (T_MFW_EVENT)0x00000080 | |
| 210 #define E_BTIPS_FTPS_GET_EVENT (T_MFW_EVENT)0x00000100 | |
| 211 #define E_BTIPS_FTPS_COMPLETE_EVENT (T_MFW_EVENT)0x00400000 //sundeep | |
| 212 #define E_BTIPS_FTPS_ABORTED_EVENT (T_MFW_EVENT)0x00800000 //vamsee | |
| 213 #define E_BTIPS_FTPS_PUT_COMP_EVENT (T_MFW_EVENT)0x01000000 //sundeep | |
| 214 //#define E_BTIPS_FTPS_GET_COMP_EVENT (T_MFW_EVENT)0x02000000 //sundeep | |
| 215 #define E_BTIPS_FTPS_DELETE_COMP_EVENT (T_MFW_EVENT)0x04000000 //sundeep | |
| 216 #define E_BTIPS_FTPS_CONNECT_EVENT (T_MFW_EVENT)0x20000000 //sundeep | |
| 217 #define E_BTIPS_FTPS_DISCONNECT_EVENT (T_MFW_EVENT)0x40000000 //sundeep | |
| 218 | |
| 219 | |
| 220 #define E_BTIPS_FTPS_DELETE_EVENT (T_MFW_EVENT)0x00000200 | |
| 221 #define E_BTIPS_VG_CONNECT_EVENT (T_MFW_EVENT)0x00000400 | |
| 222 #define E_BTIPS_VG_DISCONNECT_EVENT (T_MFW_EVENT)0x00000800 | |
| 223 #define E_BTIPS_VG_AUDIO_CONNECT_EVENT (T_MFW_EVENT)0x00001000 | |
| 224 #define E_BTIPS_VG_AUDIO_DISCONNECT_EVENT (T_MFW_EVENT)0x00002000 | |
| 225 | |
| 226 /******************BMG EVENTS*********************************/ | |
| 227 #define E_BTIPS_BMG_NAME_RESULT (T_MFW_EVENT)0x00004000 | |
| 228 #define E_BTIPS_BMG_SEARCH_COMPLETE (T_MFW_EVENT)0x00008000 | |
| 229 #define E_BTIPS_BMG_SEARCH_CANCELLED (T_MFW_EVENT)0x00010000 | |
| 230 #define E_BTIPS_BMG_BOND_COMPLETE (T_MFW_EVENT)0x00020000 | |
| 231 #define E_BTIPS_BMG_DEVICE_SERVICES (T_MFW_EVENT)0x00040000 | |
| 232 #define E_BTIPS_OPPS_PUSH_EVENT (T_MFW_EVENT)0x00080000 | |
| 233 #define E_BTIPS_OPPS_PULL_EVENT (T_MFW_EVENT)0x00100000 | |
| 234 #define E_BTIPS_BMG_BOND_CANCELLED (T_MFW_EVENT)0x00200000 | |
| 235 | |
| 236 //#if 0 | |
| 237 #define E_BTIPS_OPPS_PULL_COMP_EVENT (T_MFW_EVENT)0x08000000 | |
| 238 #define E_BTIPS_OPPS_PUSH_COMP_EVENT (T_MFW_EVENT)0x10000000 | |
| 239 //#endif | |
| 240 | |
| 241 #define E_BTIPS_ALL_SERVICES (T_MFW_EVENT)0xFFFFFFFF | |
| 242 | |
| 243 typedef T_BTIPS_MMI_IND T_MFW_BTIPS_PARA; | |
| 244 | |
| 245 typedef struct | |
| 246 { | |
| 247 T_MFW_EVENT emask; /* events of interest */ | |
| 248 T_MFW_EVENT event; /* current event */ | |
| 249 T_MFW_CB handler; | |
| 250 T_MFW_BTIPS_PARA para; | |
| 251 } T_MFW_BTIPS; | |
| 252 | |
| 253 | |
| 254 void Btips_ffs_log_message(char *LogMsg,...); | |
| 255 | |
| 256 | |
| 257 #ifdef FF_MMI_BTIPS_APP | |
| 258 #define BTIPS_MMI_IND 0x1107 //TISH: 0x110 this value is same as Camera primiive. | |
| 259 GLOBAL BOOL btipsPrimHandler (USHORT opc, void * data); | |
| 260 #endif//BT-MMI - FF_MMI_BTIPS_APP | |
| 261 | |
| 262 BOOL mfw_btips_checkStatus(BtStatus btStatus); | |
| 263 | |
| 264 void mfw_btips_signal(T_MFW_EVENT event, T_BTIPS_MMI_IND * para); | |
| 265 int mmi_btips_app_root_cb(T_MFW_EVENT evnt, void *para); | |
| 266 void mfw_btips_ftpsAcceptObjectRequest (BOOL flag); | |
| 267 void mfw_btips_ftpsDisconnect (void); | |
| 268 | |
| 269 #endif | |
| 270 |
