health-api.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. BlueZ D-Bus Health API description
  2. **********************************
  3. HealthManager hierarchy
  4. =======================
  5. Service org.bluez
  6. Interface org.bluez.HealthManager1
  7. Object path /org/bluez/
  8. Methods object CreateApplication(dict config)
  9. Returns the path of the new registered application.
  10. Application will be closed by the call or implicitly
  11. when the programs leaves the bus.
  12. config:
  13. uint16 DataType:
  14. Mandatory
  15. string Role:
  16. Mandatory. Possible values: "source",
  17. "sink"
  18. string Description:
  19. Optional
  20. ChannelType:
  21. Optional, just for sources. Possible
  22. values: "reliable", "streaming"
  23. Possible Errors: org.bluez.Error.InvalidArguments
  24. void DestroyApplication(object application)
  25. Closes the HDP application identified by the object
  26. path. Also application will be closed if the process
  27. that started it leaves the bus. Only the creator of the
  28. application will be able to destroy it.
  29. Possible errors: org.bluez.Error.InvalidArguments
  30. org.bluez.Error.NotFound
  31. org.bluez.Error.NotAllowed
  32. HealthDevice hierarchy
  33. ======================
  34. Service org.bluez
  35. Interface org.bluez.HealthDevice1
  36. Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
  37. Methods boolean Echo()
  38. Sends an echo petition to the remote service. Returns
  39. True if response matches with the buffer sent. If some
  40. error is detected False value is returned.
  41. Possible errors: org.bluez.Error.InvalidArguments
  42. org.bluez.Error.OutOfRange
  43. object CreateChannel(object application, string configuration)
  44. Creates a new data channel. The configuration should
  45. indicate the channel quality of service using one of
  46. this values "reliable", "streaming", "any".
  47. Returns the object path that identifies the data
  48. channel that is already connected.
  49. Possible errors: org.bluez.Error.InvalidArguments
  50. org.bluez.Error.HealthError
  51. void DestroyChannel(object channel)
  52. Destroys the data channel object. Only the creator of
  53. the channel or the creator of the HealthApplication
  54. that received the data channel will be able to destroy
  55. it.
  56. Possible errors: org.bluez.Error.InvalidArguments
  57. org.bluez.Error.NotFound
  58. org.bluez.Error.NotAllowed
  59. Signals void ChannelConnected(object channel)
  60. This signal is launched when a new data channel is
  61. created or when a known data channel is reconnected.
  62. void ChannelDeleted(object channel)
  63. This signal is launched when a data channel is deleted.
  64. After this signal the data channel path will not be
  65. valid and its path can be reused for future data
  66. channels.
  67. Properties object MainChannel [readonly]
  68. The first reliable channel opened. It is needed by
  69. upper applications in order to send specific protocol
  70. data units. The first reliable can change after a
  71. reconnection.
  72. HealthChannel hierarchy
  73. =======================
  74. Service org.bluez
  75. Interface org.bluez.HealthChannel1
  76. Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/chanZZZ
  77. Only the process that created the data channel or the creator of the
  78. HealthApplication that received it will be able to call these methods.
  79. Methods fd Acquire()
  80. Returns the file descriptor for this data channel. If
  81. the data channel is not connected it will also
  82. reconnect.
  83. Possible Errors: org.bluez.Error.NotConnected
  84. org.bluez.Error.NotAllowed
  85. void Release()
  86. Releases the fd. Application should also need to
  87. close() it.
  88. Possible Errors: org.bluez.Error.NotAcquired
  89. org.bluez.Error.NotAllowed
  90. Properties string Type [readonly]
  91. The quality of service of the data channel. ("reliable"
  92. or "streaming")
  93. object Device [readonly]
  94. Identifies the Remote Device that is connected with.
  95. Maps with a HealthDevice object.
  96. object Application [readonly]
  97. Identifies the HealthApplication to which this channel
  98. is related to (which indirectly defines its role and
  99. data type).