network-api.txt 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. BlueZ D-Bus Network API description
  2. ***********************************
  3. Network hierarchy
  4. =================
  5. Service org.bluez
  6. Interface org.bluez.Network1
  7. Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
  8. Methods string Connect(string uuid)
  9. Connect to the network device and return the network
  10. interface name. Examples of the interface name are
  11. bnep0, bnep1 etc.
  12. uuid can be either one of "gn", "panu" or "nap" (case
  13. insensitive) or a traditional string representation of
  14. UUID or a hexadecimal number.
  15. The connection will be closed and network device
  16. released either upon calling Disconnect() or when
  17. the client disappears from the message bus.
  18. Possible errors: org.bluez.Error.AlreadyConnected
  19. org.bluez.Error.ConnectionAttemptFailed
  20. void Disconnect()
  21. Disconnect from the network device.
  22. To abort a connection attempt in case of errors or
  23. timeouts in the client it is fine to call this method.
  24. Possible errors: org.bluez.Error.Failed
  25. Properties boolean Connected [readonly]
  26. Indicates if the device is connected.
  27. string Interface [readonly]
  28. Indicates the network interface name when available.
  29. string UUID [readonly]
  30. Indicates the connection role when available.
  31. Network server hierarchy
  32. ========================
  33. Service org.bluez
  34. Interface org.bluez.NetworkServer1
  35. Object path /org/bluez/{hci0,hci1,...}
  36. Methods void Register(string uuid, string bridge)
  37. Register server for the provided UUID. Every new
  38. connection to this server will be added the bridge
  39. interface.
  40. Valid UUIDs are "gn", "panu" or "nap".
  41. Initially no network server SDP is provided. Only
  42. after this method a SDP record will be available
  43. and the BNEP server will be ready for incoming
  44. connections.
  45. void Unregister(string uuid)
  46. Unregister the server for provided UUID.
  47. All servers will be automatically unregistered when
  48. the calling application terminates.