X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fsrc%2Fbt_le_adapter%2Flinux%2Fservice.h;h=ad1f146c5020ea79420b4ee8ba9105329485ef1b;hb=390866079e285d2c74918432c0d597d5da52f8a0;hp=2cfbc3e3387b093ae86a59fcb623bdc99108c1e5;hpb=3e9402ad71cb3e93266a77796f44d17bab9853fd;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/src/bt_le_adapter/linux/service.h b/resource/csdk/connectivity/src/bt_le_adapter/linux/service.h index 2cfbc3e..ad1f146 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/linux/service.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/linux/service.h @@ -56,15 +56,40 @@ typedef struct CAGattService } CAGattService; /** + * Make the pseudo-address for the peer connected to the service. + * + * @param[in] c Information about GATT service for which the + * peer (client) address is being created. + * + * @return @c String containing an encoded address associated with the + * peer connected to the peripheral on which the service + * implementation resides, or @c NULL on error. + */ +char * CAGattServiceMakePeerAddress(CAGattService * s); + +/** + * Decode @c CAGattService pointer from peer @c address. + * + * @param[in] address String containing a client/peer pseudo-address + * corresponding to the GATT service through which + * communication is performed. + * + * @return Pointer to ::CAGattService object corresponding to the + * given address. + */ +CAGattService * CAGattServiceDecodeAddress(char const * address); + +/** * Initialize GATT service fields. * * This function initializes the @c CAGattService object fields. * * @param[out] service GATT service information to be initialized. - * @param[in] context Object containing the D-Bus connection to the - * bus on which the service will be exported. * @param[in] hci_name Name of the bluetooth adapter installed on the * system, e.g. @c "hci0". + * @param[in] context Object containing the D-Bus connection to the + * bus on which the service will be exported, as + * well as an address-to-characteristic map. * * @return @c true on success, @c false otherwise. * @@ -73,8 +98,8 @@ typedef struct CAGattService * memory. */ bool CAGattServiceInitialize(CAGattService * service, - CALEContext * context, - char const * hci_name); + char const * hci_name, + CALEContext * context); /** * Destroy GATT service fields. @@ -89,5 +114,4 @@ bool CAGattServiceInitialize(CAGattService * service, */ void CAGattServiceDestroy(CAGattService * service); - #endif // CA_BLE_LINUX_SERVICE_H