profile-api.txt 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. BlueZ D-Bus Profile API description
  2. ***********************************
  3. Profile Manager hierarchy
  4. =========================
  5. Service org.bluez
  6. Interface org.bluez.ProfileManager1
  7. Object path /org/bluez
  8. void RegisterProfile(object profile, string uuid, dict options)
  9. This registers a profile implementation.
  10. If an application disconnects from the bus all
  11. its registered profiles will be removed.
  12. Some predefined services:
  13. HFP AG UUID: 0000111f-0000-1000-8000-00805f9b34fb
  14. Default profile Version is 1.7, profile Features
  15. is 0b001001 and RFCOMM channel is 13.
  16. Authentication is required.
  17. HFP HS UUID: 0000111e-0000-1000-8000-00805f9b34fb
  18. Default profile Version is 1.7, profile Features
  19. is 0b000000 and RFCOMM channel is 7.
  20. Authentication is required.
  21. HSP AG UUID: 00001112-0000-1000-8000-00805f9b34fb
  22. Default profile Version is 1.2, RFCOMM channel
  23. is 12 and Authentication is required. Does not
  24. support any Features, option is ignored.
  25. HSP HS UUID: 00001108-0000-1000-8000-00805f9b34fb
  26. Default profile Version is 1.2, profile Features
  27. is 0b0 and RFCOMM channel is 6. Authentication
  28. is required. Features is one bit value, specify
  29. capability of Remote Audio Volume Control
  30. (by default turned off).
  31. Available options:
  32. string Name
  33. Human readable name for the profile
  34. string Service
  35. The primary service class UUID
  36. (if different from the actual
  37. profile UUID)
  38. string Role
  39. For asymmetric profiles that do not
  40. have UUIDs available to uniquely
  41. identify each side this
  42. parameter allows specifying the
  43. precise local role.
  44. Possible values: "client", "server"
  45. uint16 Channel
  46. RFCOMM channel number that is used
  47. for client and server UUIDs.
  48. If applicable it will be used in the
  49. SDP record as well.
  50. uint16 PSM
  51. PSM number that is used for client
  52. and server UUIDs.
  53. If applicable it will be used in the
  54. SDP record as well.
  55. boolean RequireAuthentication
  56. Pairing is required before connections
  57. will be established. No devices will
  58. be connected if not paired.
  59. boolean RequireAuthorization
  60. Request authorization before any
  61. connection will be established.
  62. boolean AutoConnect
  63. In case of a client UUID this will
  64. force connection of the RFCOMM or
  65. L2CAP channels when a remote device
  66. is connected.
  67. string ServiceRecord
  68. Provide a manual SDP record.
  69. uint16 Version
  70. Profile version (for SDP record)
  71. uint16 Features
  72. Profile features (for SDP record)
  73. Possible errors: org.bluez.Error.InvalidArguments
  74. org.bluez.Error.AlreadyExists
  75. void UnregisterProfile(object profile)
  76. This unregisters the profile that has been previously
  77. registered. The object path parameter must match the
  78. same value that has been used on registration.
  79. Possible errors: org.bluez.Error.DoesNotExist
  80. Profile hierarchy
  81. =================
  82. Service unique name
  83. Interface org.bluez.Profile1
  84. Object path freely definable
  85. Methods void Release() [noreply]
  86. This method gets called when the service daemon
  87. unregisters the profile. A profile can use it to do
  88. cleanup tasks. There is no need to unregister the
  89. profile, because when this method gets called it has
  90. already been unregistered.
  91. void NewConnection(object device, fd, dict fd_properties)
  92. This method gets called when a new service level
  93. connection has been made and authorized.
  94. Common fd_properties:
  95. uint16 Version Profile version (optional)
  96. uint16 Features Profile features (optional)
  97. Possible errors: org.bluez.Error.Rejected
  98. org.bluez.Error.Canceled
  99. void RequestDisconnection(object device)
  100. This method gets called when a profile gets
  101. disconnected.
  102. The file descriptor is no longer owned by the service
  103. daemon and the profile implementation needs to take
  104. care of cleaning up all connections.
  105. If multiple file descriptors are indicated via
  106. NewConnection, it is expected that all of them
  107. are disconnected before returning from this
  108. method call.
  109. Possible errors: org.bluez.Error.Rejected
  110. org.bluez.Error.Canceled