@@ -129,6 +129,17 @@ typedef struct
129
129
cb_char serviceName [cbBCM_SERVICE_NAME_MAX_LEN ];
130
130
} cbBCM_ConnectionInfo ;
131
131
132
+ typedef struct
133
+ {
134
+ cb_uint8 flags ; /** Reserved for future use. */
135
+ cb_uint8 flowDirection ; /** 0x00 for Outgoing Flow and 0x01 for Incoming Flow */
136
+ cb_uint8 serviceType ; /** 0x00 No Traffic; 0x01 Best Effort; 0x02 Guaranteed */
137
+ cb_uint32 tokenRate ; /** Token Rate in octets per second */
138
+ cb_uint32 tokenBucketSize ; /** Token Bucket Size in octets */
139
+ cb_uint32 peakBandwidth ; /** Peak Bandwidth in octets per second */
140
+ cb_uint32 latency ; /** Latency in microseconds */
141
+ } cbBCM_FlowSpecParams ;
142
+
132
143
typedef void (* cbBCM_ConnectInd )(
133
144
cbBCM_Handle handle ,
134
145
cbBCM_ConnectionInfo info );
@@ -156,7 +167,7 @@ typedef struct
156
167
typedef void (* cbBCM_RoleDiscoveryCallback )(
157
168
cbBCM_Handle handle ,
158
169
cb_int8 status ,
159
- cb_int8 role );
170
+ cb_uint8 role );
160
171
161
172
typedef void (* cbBCM_RssiCallback )(
162
173
cbBCM_Handle handle ,
@@ -226,6 +237,13 @@ typedef void(*cbBCM_LinkQualityCallback)(
226
237
cbBCM_LinkQualityEvt linkQualityEvt ,
227
238
uint8 linkQuality );
228
239
240
+ typedef void (* cbBCM_ServiceClassEnabled )(cb_uint8 serviceChannel );
241
+
242
+ typedef void (* cbBCM_SetFlowSpecCallback )(
243
+ cb_uint8 status ,
244
+ cbBCM_Handle handle ,
245
+ cbBCM_FlowSpecParams parameters );
246
+
229
247
/*===========================================================================
230
248
* FUNCTIONS
231
249
*=========================================================================*/
@@ -245,12 +263,14 @@ extern void cbBCM_init(void);
245
263
* @param pServerChannel Pointer to return variable. The server channel is used to identify
246
264
* incoming connections.
247
265
* @param pConnectionCallback Callback structure for connection management.
266
+ * @param pServiceClassEnabled Callback structure to inform when service is running.
248
267
* @return If the operation is successful cbBCM_OK is returned.
249
268
*/
250
269
extern cb_int32 cbBCM_enableServerProfileSpp (
251
270
cb_char * pServiceName ,
252
271
cb_uint8 * pServerChannel ,
253
- cbBCM_ConnectionCallback * pConnectionCallback );
272
+ cbBCM_ConnectionCallback * pConnectionCallback ,
273
+ cbBCM_ServiceClassEnabled pServiceClassEnabled );
254
274
255
275
/**
256
276
* Enable a Dial Up Networking Profile (DUN)service record to
@@ -260,12 +280,14 @@ extern cb_int32 cbBCM_enableServerProfileSpp(
260
280
* @param pServerChannel Pointer to return variable. The server channel is used to identify
261
281
* incoming connections.
262
282
* @param pConnectionCallback Callback structure for connection management.
283
+ * @param pServiceClassEnabled Callback structure to inform when service is running.
263
284
* @return If the operation is successful cbBCM_OK is returned.
264
285
*/
265
286
extern cb_int32 cbBCM_enableServerProfileDun (
266
287
cb_char * pServiceName ,
267
288
cb_uint8 * pServerChannel ,
268
- cbBCM_ConnectionCallback * pConnectionCallback );
289
+ cbBCM_ConnectionCallback * pConnectionCallback ,
290
+ cbBCM_ServiceClassEnabled pServiceClassEnabled );
269
291
270
292
/**
271
293
* Enable a service record with an application specific UUID.
@@ -276,13 +298,15 @@ extern cb_int32 cbBCM_enableServerProfileDun(
276
298
* @param pServerChannel Pointer to return variable. The server channel is used to identify
277
299
* incoming connections.
278
300
* @param pConnectionCallback Callback structure for connection management.
301
+ * @param pServiceClassEnabled Callback structure to inform when service is running.
279
302
* @return If the operation is successful cbBCM_OK is returned.
280
303
*/
281
304
extern cb_int32 cbBCM_enableServerProfileUuid128 (
282
305
cb_uint8 * pUuid128 ,
283
306
cb_char * pServiceName ,
284
307
cb_uint8 * pServerChannel ,
285
- cbBCM_ConnectionCallback * pConnectionCallback );
308
+ cbBCM_ConnectionCallback * pConnectionCallback ,
309
+ cbBCM_ServiceClassEnabled pServiceClassEnabled );
286
310
287
311
288
312
/**
@@ -295,12 +319,14 @@ extern cb_int32 cbBCM_enableServerProfileUuid128(
295
319
* @param pServiceName The name of the service
296
320
* @param role The PAN role of the local device
297
321
* @param pConnectionCallback Callback structure for connection management.
322
+ * @param pServiceClassEnabled Callback structure to inform when service is running.
298
323
* @return If the operation is successful cbBCM_OK is returned.
299
324
*/
300
325
extern cb_int32 cbBCM_enableServerProfilePan (
301
326
cb_char * pServiceName ,
302
327
cbBCM_PAN_Role role ,
303
- cbBCM_ConnectionCallback * pConnectionCallback );
328
+ cbBCM_ConnectionCallback * pConnectionCallback ,
329
+ cbBCM_ServiceClassEnabled pServiceClassEnabled );
304
330
305
331
/**
306
332
* Enable device id service record.The device id service record is a method by which
@@ -393,7 +419,7 @@ extern cb_uint16 cbBCM_getMaxLinksLE(void);
393
419
* @param serverChannel RFCOMM server channel that shall be used. Set to
394
420
* cbBCM_INVALID_SERVER_CHANNEL to perform automatic
395
421
* service search to find the server channel.
396
- * @param pAclParameters Link configuration including link supervision timeout
422
+ * @param pAclParameters Link configuration including link supervision timeout
397
423
* and master slave policy. Pass NULL to use default connection
398
424
* parameters.
399
425
* @param pConnectionCallback Callback structure for connection management.
@@ -439,7 +465,7 @@ extern cb_int32 cbBCM_rspConnectSppCnf(
439
465
* @param serverChannel RFCOMM server channel that shall be used. Set to
440
466
* cbBCM_INVALID_SERVER_CHANNEL to perform automatic
441
467
* service search to find the server channel.
442
- * @param pAclParameters Link configuration including link supervision timeout
468
+ * @param pAclParameters Link configuration including link supervision timeout
443
469
* and master slave policy. Pass NULL to use default connection
444
470
* parameters.
445
471
* @param pConnectionCallback Callback structure for connection management.
@@ -457,7 +483,7 @@ extern cbBCM_Handle cbBCM_reqConnectDun(
457
483
* Accept or reject an incoming DUN connection. This is a
458
484
* response to a cbBCM_ConnectInd connection indication.
459
485
*
460
- * @param handle Connection handle
486
+ * @param handle Connection handle
461
487
* @param accept TRUE to accept the incoming connection.
462
488
FALSE to reject.
463
489
* @return If the operation is successful cbBCM_OK is returned.
@@ -505,7 +531,7 @@ extern cbBCM_Handle cbBCM_reqConnectUuid(
505
531
* Accept or reject an incoming SPP connection. This is a
506
532
* response to a cbBCM_ConnectInd connection indication.
507
533
*
508
- * @param handle Connection handle
534
+ * @param handle Connection handle
509
535
* @param accept TRUE to accept the incoming connection.
510
536
FALSE to reject.
511
537
* @return If the operation is successful cbBCM_OK is returned.
@@ -542,7 +568,7 @@ extern cbBCM_Handle cbBCM_reqConnectPan(
542
568
* Accept or reject an incoming PAN connection. This is a
543
569
* response to a cbBCM_ConnectInd connection indication.
544
570
*
545
- * @param handle Connection handle
571
+ * @param handle Connection handle
546
572
* @param accept TRUE to accept the incoming connection.
547
573
* FALSE to reject.
548
574
* @return If the operation is successful cbBCM_OK is returned.
@@ -604,7 +630,7 @@ extern cbBCM_Handle cbBCM_reqConnectSps(
604
630
/**
605
631
* Accept or reject an incoming SPS connection. This is a
606
632
* response to a cbBCM_ConnectInd connection indication.
607
- * @param handle Connection handle
633
+ * @param handle Connection handle
608
634
* @param accept TRUE to accept the incoming connection.
609
635
* FALSE to reject.
610
636
* @return If the operation is successful cbBCM_OK is returned.
@@ -813,10 +839,50 @@ extern cb_int32 cbBCM_registerDataCallback(
813
839
extern cbBCM_Handle cbBCM_getProtocolHandle (
814
840
cbBCM_Handle handle );
815
841
842
+ /**
843
+ * @brief Get the bcm id from acl handle for an active connection.
844
+ *
845
+ * @param handle Connection handle
846
+ * @return bcm handle.
847
+ */
848
+ extern cbBCM_Handle cbBCM_getIdFromAclHandle (TConnHandle aclHandle );
849
+
850
+ /**
851
+ * @brief Get the acl handle from bcm handle.
852
+ *
853
+ * @param handle bcm handle
854
+ * @return acl handle
855
+ */
856
+ extern TConnHandle cbBCM_getAclFromIdHandle (cbBCM_Handle bcmHandle );
857
+ /**
858
+ * @brief This will send cbHCI_cmdFlowSpecification command for the specified link
859
+ * with the specified parameters.
860
+ * @param handle Connection handle
861
+ * @param parameters Flow Specification parameters. For details see Bluetooth Core
862
+ * Specification [Vol 3] Part A, Section 5.3
863
+ * @param flowSpecCallback Callback contains the data in Flow Specification Complete event
864
+ * @return If the operation is successful cbBCM_OK is returned.
865
+ */
866
+ extern cb_int32 cbBCM_setFlowSpecification (
867
+ cbBCM_Handle handle ,
868
+ cbBCM_FlowSpecParams parameters ,
869
+ cbBCM_SetFlowSpecCallback flowSpecCallback );
870
+
871
+ /**
872
+ * @brief Change which packet types can be used for the connection identified by the handle
873
+ * @param handle Connection handle
874
+ * @param aclPacketType bit map according to packet types defined in bt_types.h
875
+ * @return If the operation is successful cbBCM_OK is returned.
876
+ */
877
+ extern cb_int32 cbBCM_changeConnectionPacketType (
878
+ cbBCM_Handle handle ,
879
+ TPacketType aclPacketType );
880
+
816
881
#ifdef __cplusplus
817
882
}
818
883
#endif
819
884
885
+
820
886
#endif /* _CB_BT_CONN_MAN_H_ */
821
887
822
888
0 commit comments