@@ -129,6 +129,17 @@ typedef struct
129129 cb_char serviceName [cbBCM_SERVICE_NAME_MAX_LEN ];
130130} cbBCM_ConnectionInfo ;
131131
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+
132143typedef void (* cbBCM_ConnectInd )(
133144 cbBCM_Handle handle ,
134145 cbBCM_ConnectionInfo info );
@@ -156,7 +167,7 @@ typedef struct
156167typedef void (* cbBCM_RoleDiscoveryCallback )(
157168 cbBCM_Handle handle ,
158169 cb_int8 status ,
159- cb_int8 role );
170+ cb_uint8 role );
160171
161172typedef void (* cbBCM_RssiCallback )(
162173 cbBCM_Handle handle ,
@@ -226,6 +237,13 @@ typedef void(*cbBCM_LinkQualityCallback)(
226237 cbBCM_LinkQualityEvt linkQualityEvt ,
227238 uint8 linkQuality );
228239
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+
229247/*===========================================================================
230248 * FUNCTIONS
231249 *=========================================================================*/
@@ -245,12 +263,14 @@ extern void cbBCM_init(void);
245263 * @param pServerChannel Pointer to return variable. The server channel is used to identify
246264 * incoming connections.
247265 * @param pConnectionCallback Callback structure for connection management.
266+ * @param pServiceClassEnabled Callback structure to inform when service is running.
248267 * @return If the operation is successful cbBCM_OK is returned.
249268 */
250269extern cb_int32 cbBCM_enableServerProfileSpp (
251270 cb_char * pServiceName ,
252271 cb_uint8 * pServerChannel ,
253- cbBCM_ConnectionCallback * pConnectionCallback );
272+ cbBCM_ConnectionCallback * pConnectionCallback ,
273+ cbBCM_ServiceClassEnabled pServiceClassEnabled );
254274
255275/**
256276 * Enable a Dial Up Networking Profile (DUN)service record to
@@ -260,12 +280,14 @@ extern cb_int32 cbBCM_enableServerProfileSpp(
260280 * @param pServerChannel Pointer to return variable. The server channel is used to identify
261281 * incoming connections.
262282 * @param pConnectionCallback Callback structure for connection management.
283+ * @param pServiceClassEnabled Callback structure to inform when service is running.
263284 * @return If the operation is successful cbBCM_OK is returned.
264285 */
265286extern cb_int32 cbBCM_enableServerProfileDun (
266287 cb_char * pServiceName ,
267288 cb_uint8 * pServerChannel ,
268- cbBCM_ConnectionCallback * pConnectionCallback );
289+ cbBCM_ConnectionCallback * pConnectionCallback ,
290+ cbBCM_ServiceClassEnabled pServiceClassEnabled );
269291
270292/**
271293 * Enable a service record with an application specific UUID.
@@ -276,13 +298,15 @@ extern cb_int32 cbBCM_enableServerProfileDun(
276298 * @param pServerChannel Pointer to return variable. The server channel is used to identify
277299 * incoming connections.
278300 * @param pConnectionCallback Callback structure for connection management.
301+ * @param pServiceClassEnabled Callback structure to inform when service is running.
279302 * @return If the operation is successful cbBCM_OK is returned.
280303 */
281304extern cb_int32 cbBCM_enableServerProfileUuid128 (
282305 cb_uint8 * pUuid128 ,
283306 cb_char * pServiceName ,
284307 cb_uint8 * pServerChannel ,
285- cbBCM_ConnectionCallback * pConnectionCallback );
308+ cbBCM_ConnectionCallback * pConnectionCallback ,
309+ cbBCM_ServiceClassEnabled pServiceClassEnabled );
286310
287311
288312/**
@@ -295,12 +319,14 @@ extern cb_int32 cbBCM_enableServerProfileUuid128(
295319* @param pServiceName The name of the service
296320* @param role The PAN role of the local device
297321* @param pConnectionCallback Callback structure for connection management.
322+ * @param pServiceClassEnabled Callback structure to inform when service is running.
298323* @return If the operation is successful cbBCM_OK is returned.
299324*/
300325extern cb_int32 cbBCM_enableServerProfilePan (
301326 cb_char * pServiceName ,
302327 cbBCM_PAN_Role role ,
303- cbBCM_ConnectionCallback * pConnectionCallback );
328+ cbBCM_ConnectionCallback * pConnectionCallback ,
329+ cbBCM_ServiceClassEnabled pServiceClassEnabled );
304330
305331/**
306332 * 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);
393419 * @param serverChannel RFCOMM server channel that shall be used. Set to
394420 * cbBCM_INVALID_SERVER_CHANNEL to perform automatic
395421 * 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
397423 * and master slave policy. Pass NULL to use default connection
398424 * parameters.
399425 * @param pConnectionCallback Callback structure for connection management.
@@ -439,7 +465,7 @@ extern cb_int32 cbBCM_rspConnectSppCnf(
439465 * @param serverChannel RFCOMM server channel that shall be used. Set to
440466 * cbBCM_INVALID_SERVER_CHANNEL to perform automatic
441467 * 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
443469 * and master slave policy. Pass NULL to use default connection
444470 * parameters.
445471 * @param pConnectionCallback Callback structure for connection management.
@@ -457,7 +483,7 @@ extern cbBCM_Handle cbBCM_reqConnectDun(
457483 * Accept or reject an incoming DUN connection. This is a
458484 * response to a cbBCM_ConnectInd connection indication.
459485 *
460- * @param handle Connection handle
486+ * @param handle Connection handle
461487 * @param accept TRUE to accept the incoming connection.
462488 FALSE to reject.
463489 * @return If the operation is successful cbBCM_OK is returned.
@@ -505,7 +531,7 @@ extern cbBCM_Handle cbBCM_reqConnectUuid(
505531 * Accept or reject an incoming SPP connection. This is a
506532 * response to a cbBCM_ConnectInd connection indication.
507533 *
508- * @param handle Connection handle
534+ * @param handle Connection handle
509535 * @param accept TRUE to accept the incoming connection.
510536 FALSE to reject.
511537 * @return If the operation is successful cbBCM_OK is returned.
@@ -542,7 +568,7 @@ extern cbBCM_Handle cbBCM_reqConnectPan(
542568* Accept or reject an incoming PAN connection. This is a
543569* response to a cbBCM_ConnectInd connection indication.
544570*
545- * @param handle Connection handle
571+ * @param handle Connection handle
546572* @param accept TRUE to accept the incoming connection.
547573* FALSE to reject.
548574* @return If the operation is successful cbBCM_OK is returned.
@@ -604,7 +630,7 @@ extern cbBCM_Handle cbBCM_reqConnectSps(
604630/**
605631 * Accept or reject an incoming SPS connection. This is a
606632 * response to a cbBCM_ConnectInd connection indication.
607- * @param handle Connection handle
633+ * @param handle Connection handle
608634 * @param accept TRUE to accept the incoming connection.
609635 * FALSE to reject.
610636 * @return If the operation is successful cbBCM_OK is returned.
@@ -813,10 +839,50 @@ extern cb_int32 cbBCM_registerDataCallback(
813839extern cbBCM_Handle cbBCM_getProtocolHandle (
814840 cbBCM_Handle handle );
815841
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+
816881#ifdef __cplusplus
817882}
818883#endif
819884
885+
820886#endif /* _CB_BT_CONN_MAN_H_ */
821887
822888
0 commit comments