mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
Update API descriptions to match new error codes
This commit is contained in:
parent
05ba90324d
commit
4392fbd3d9
@ -51,62 +51,25 @@ Error hierarchy
|
||||
|
||||
Interface org.bluez.Error
|
||||
|
||||
Errors Failed
|
||||
Shared Errors (Can be thrown by hcid or any bluetooth service)
|
||||
|
||||
DeviceUnreachable
|
||||
|
||||
The remote device is either powered down or out of range.
|
||||
|
||||
An unknown error occured. The error messages is
|
||||
taken from the strerror(errno) function.
|
||||
|
||||
InvalidArguments
|
||||
|
||||
Error returned when the argument list is invalid or
|
||||
out of specification for the method.
|
||||
|
||||
NotAuthorized
|
||||
|
||||
Error returned when the caller of a method is not
|
||||
authorized. This might happen if a caller tries to
|
||||
terminate a connection that it hasn't created.
|
||||
|
||||
OutOfMemory
|
||||
|
||||
Error returned when a memory allocation via malloc()
|
||||
fails. This error is similar to ENOMEM.
|
||||
|
||||
NoSuchAdapter
|
||||
|
||||
Error returned when the requested adapter doesn't
|
||||
exists. This error is similar to ENODEV.
|
||||
|
||||
NotReady
|
||||
|
||||
Error returned when the adapter is DOWN.
|
||||
|
||||
NotAvailable
|
||||
|
||||
Error returned when a specified record is not
|
||||
available.
|
||||
|
||||
NotConnected
|
||||
|
||||
Error returned when the remote device isn't connected
|
||||
at the moment.
|
||||
AlreadyConnected
|
||||
A connection request has been received on an already
|
||||
connected device.
|
||||
|
||||
ConnectionAttemptFailed
|
||||
|
||||
AlreadyExists
|
||||
An unexpected error (other than DeviceUnreachable) error
|
||||
has occured while attempting a connection to a device.
|
||||
|
||||
Error returned if a record for a specific procedure
|
||||
already exists and it has been tried create a new
|
||||
one. The error message however should indicate the
|
||||
procedure that fails. For example "Bonding already
|
||||
exists"
|
||||
|
||||
DoesNotExist
|
||||
|
||||
Error returned if a record for a specifc procedure
|
||||
doesn't exist. The error message however should
|
||||
indicate the procedure that fails. For example
|
||||
"Bonding does not exist".
|
||||
NotConnected
|
||||
The remote device is not connected, while the method call
|
||||
would expect it to be, or is not in the expected state to
|
||||
perform the action.
|
||||
|
||||
InProgress
|
||||
|
||||
@ -116,8 +79,75 @@ Errors Failed
|
||||
about what is in progress. For example "Bonding in
|
||||
progress".
|
||||
|
||||
NotSupported
|
||||
The feature is not supported by the remote device
|
||||
InvalidArguments
|
||||
|
||||
The DBUS request does not contain the right number of
|
||||
arguments with the right type, or the arguments are there
|
||||
but their value is wrong, or does not makes sense in the
|
||||
current context.
|
||||
|
||||
OutOfMemory
|
||||
|
||||
Error returned when a memory allocation via malloc()
|
||||
fails. This error is similar to ENOMEM.
|
||||
|
||||
NotAvailable
|
||||
|
||||
Error returned when a specified record is not
|
||||
available.
|
||||
|
||||
NotSupported
|
||||
|
||||
The remote device does not support the expected
|
||||
feature.
|
||||
|
||||
AlreadyExists
|
||||
One of the requested elements already exists
|
||||
|
||||
DoesNotExist
|
||||
One of the requested elements does not exist
|
||||
|
||||
Canceled
|
||||
The operation was canceled.
|
||||
|
||||
Failed
|
||||
|
||||
This is a the most generic error.
|
||||
It is thrown when something unexpected happens.
|
||||
|
||||
|
||||
Hcid specific Errors (Can be thrown by hcid only)
|
||||
|
||||
NotReady
|
||||
|
||||
Error returned when the adapter is DOWN.
|
||||
|
||||
UnknwownMethod
|
||||
|
||||
This is an experimental method.
|
||||
|
||||
NotAuthorized
|
||||
|
||||
Error returned when the caller of a method is not
|
||||
authorized. This might happen if a caller tries to
|
||||
terminate a connection that it hasn't created.
|
||||
|
||||
Rejected
|
||||
|
||||
NoSuchAdapter
|
||||
|
||||
Error returned when the requested adapter doesn't
|
||||
exists. This error is similar to ENODEV.
|
||||
|
||||
NoSuchService
|
||||
|
||||
RequestDeferred
|
||||
|
||||
NotInProgress
|
||||
|
||||
UnsupportedMajorClass
|
||||
|
||||
AuthenticationCanceled
|
||||
|
||||
AuthenticationFailed
|
||||
|
||||
@ -125,10 +155,7 @@ Errors Failed
|
||||
|
||||
AuthenticationRejected
|
||||
|
||||
AuthenticationCanceled
|
||||
|
||||
UnsupportedMajorClass
|
||||
|
||||
RepeatedAttempts
|
||||
|
||||
Manager hierarchy
|
||||
=================
|
||||
|
@ -21,10 +21,10 @@ Methods array{string} ListDevices()
|
||||
On success it will return the path of the
|
||||
newly created device object.
|
||||
|
||||
Possible errors: org.bluez.input.AlreadyExists
|
||||
org.bluez.input.NotSupported
|
||||
org.bluez.input.ConnectionAttemptFailed
|
||||
org.bluez.input.Failed
|
||||
Possible errors: org.bluez.Error.AlreadyExists
|
||||
org.bluez.Error.NotSupported
|
||||
org.bluez.Error.ConnectionAttemptFailed
|
||||
org.bluez.Error.Failed
|
||||
|
||||
string CreateSecureDevice(string address)
|
||||
|
||||
@ -34,18 +34,17 @@ Methods array{string} ListDevices()
|
||||
On success it will return the path of the
|
||||
newly created device object.
|
||||
|
||||
Possible errors: org.bluez.input.AlreadyExists
|
||||
org.bluez.input.NotSupported
|
||||
org.bluez.input.ConnectionAttemptFailed
|
||||
org.bluez.input.AuthenticationFailed
|
||||
org.bluez.input.Failed
|
||||
Possible errors: org.bluez.Error.AlreadyExists
|
||||
org.bluez.Error.NotSupported
|
||||
org.bluez.Error.ConnectionAttemptFailed
|
||||
org.bluez.Error.Failed
|
||||
|
||||
void RemoveDevice(string path)
|
||||
|
||||
Remove the input device object for a given path.
|
||||
|
||||
Possible errors:org.bluez.input.DoesNotExist
|
||||
org.bluez.input.Failed
|
||||
Possible errors:org.bluez.Error.DoesNotExist
|
||||
org.bluez.Error.Failed
|
||||
|
||||
Signals void DeviceCreated(string path)
|
||||
|
||||
@ -90,14 +89,14 @@ Methods string GetAdapter()
|
||||
|
||||
Connect to the input device.
|
||||
|
||||
Possible errors: org.bluez.input.AlreadyConnected
|
||||
org.bluez.input.ConnectionAttemptFailed
|
||||
Possible errors: org.bluez.Error.AlreadyConnected
|
||||
org.bluez.Error.ConnectionAttemptFailed
|
||||
|
||||
void Disconnect()
|
||||
|
||||
Disconnect from the input device.
|
||||
|
||||
Possible errors: org.bluez.input.Failed
|
||||
Possible errors: org.bluez.Error.Failed
|
||||
|
||||
Signals void Connected()
|
||||
|
||||
|
@ -19,24 +19,24 @@ Methods array{string} ListServers()
|
||||
|
||||
Returns server path.
|
||||
|
||||
Possible errors: org.bluez.network.Error.DoesNotExist
|
||||
org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.DoesNotExist
|
||||
org.bluez.Error.Failed
|
||||
|
||||
string CreateConnection(string address, string uuid)
|
||||
|
||||
Creates a network connection object(NAP or GN).
|
||||
|
||||
Possible errors: org.bluez.network.Error.AlreadyExists
|
||||
org.bluez.network.Error.NotSupported
|
||||
org.bluez.network.Error.ConnectionAttemptFailed
|
||||
org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.AlreadyExists
|
||||
org.bluez.Error.NotSupported
|
||||
org.bluez.Error.ConnectionAttemptFailed
|
||||
org.bluez.Error.Failed
|
||||
|
||||
void RemoveConnection(string path)
|
||||
|
||||
Removes a network connection object for a given path.
|
||||
|
||||
Possible errors: org.bluez.network.Error.DoesNotExist
|
||||
org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.DoesNotExist
|
||||
org.bluez.Error.Failed
|
||||
|
||||
array{string} ListConnections()
|
||||
|
||||
@ -46,27 +46,27 @@ Methods array{string} ListServers()
|
||||
|
||||
Returns connection path.
|
||||
|
||||
Possible errors: org.bluez.network.Error.DoesNotExist
|
||||
org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.DoesNotExist
|
||||
org.bluez.Error.Failed
|
||||
|
||||
string LastConnection()
|
||||
|
||||
Returns last connected connection path, if none is connected
|
||||
fallback to last created connection.
|
||||
|
||||
Possible errors: org.bluez.network.Error.DoesNotExist
|
||||
Possible errors: org.bluez.Error.DoesNotExist
|
||||
|
||||
string DefaultConnection()
|
||||
|
||||
Returns default connection path.
|
||||
|
||||
Possible errors: org.bluez.network.Error.DoesNotExist
|
||||
Possible errors: org.bluez.Error.DoesNotExist
|
||||
|
||||
string ChangeDefaultConnection(string pattern)
|
||||
|
||||
Changes default connection path.
|
||||
|
||||
Possible errors: org.bluez.network.Error.DoesNotExist
|
||||
Possible errors: org.bluez.Error.DoesNotExist
|
||||
|
||||
Signals void ConnectionCreated(string path)
|
||||
|
||||
@ -90,14 +90,14 @@ Methods string GetUUID()
|
||||
|
||||
Enable server and updates service record.
|
||||
|
||||
Possible errors: org.bluez.network.Error.AlreadyExists
|
||||
org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.AlreadyExists
|
||||
org.bluez.Error.Failed
|
||||
|
||||
void Disable()
|
||||
|
||||
Disable server and remove service record.
|
||||
|
||||
Possible errors: org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.Failed
|
||||
|
||||
bool IsEnabled()
|
||||
|
||||
@ -151,40 +151,40 @@ Methods string GetAdapter()
|
||||
|
||||
Returns the string representation of connected host.
|
||||
|
||||
Possible errors: org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.Failed
|
||||
|
||||
string GetDescription()
|
||||
|
||||
Returns the string description of connected host.
|
||||
|
||||
Possible errors: org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.Failed
|
||||
|
||||
string GetInterface()
|
||||
|
||||
Returns the string network interface.
|
||||
|
||||
Possible errors: org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.Failed
|
||||
|
||||
string Connect()
|
||||
|
||||
Connects to host and return the network interface
|
||||
created.
|
||||
|
||||
Possible errors: org.bluez.network.Error.ConnectionAttemptFailed
|
||||
org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.ConnectionAttemptFailed
|
||||
org.bluez.Error.Failed
|
||||
|
||||
void CancelConnect()
|
||||
|
||||
Abort connection attempt in case of errors or
|
||||
timeouts in the client.
|
||||
|
||||
Possible errors: org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.Failed
|
||||
|
||||
void Disconnect()
|
||||
|
||||
Disconnects to host.
|
||||
|
||||
Possible errors: org.bluez.network.Error.Failed
|
||||
Possible errors: org.bluez.Error.Failed
|
||||
|
||||
bool IsConnected()
|
||||
|
||||
|
@ -20,32 +20,32 @@ Methods string CreateProxy(string uuid, string address)
|
||||
replacing the null byte by 'x00'. eg: "/dev/ttyS0",
|
||||
"/tmp/gps-data", "x00/org/bluez/echo".
|
||||
|
||||
Possible errors:org.bluez.serial.Error.InvalidArguments
|
||||
org.bluez.serial.NotAvailable
|
||||
org.bluez.serial.Failed
|
||||
Possible errors:org.bluez.Error.InvalidArguments
|
||||
org.bluez.Error.NotAvailable
|
||||
org.bluez.Error.Failed
|
||||
|
||||
void RemoveProxy(string path) [experimental]
|
||||
|
||||
Removes the serial port proxy object for given path.
|
||||
|
||||
Possible errors:org.bluez.serial.Error.DoesNotExist
|
||||
Possible errors:org.bluez.Error.DoesNotExist
|
||||
|
||||
string CreatePort(string address, string pattern) [experimental]
|
||||
|
||||
Creates a serial port object.
|
||||
|
||||
Possible errors:org.bluez.serial.Error.InvalidArguments
|
||||
org.bluez.serial.Error.ConnectionCanceled
|
||||
org.bluez.serial.Error.ConnectionInProgress
|
||||
org.bluez.serial.Error.ConnectionAttemptFailed
|
||||
org.bluez.serial.Error.NotSupported
|
||||
org.bluez.serial.Error.Failed
|
||||
Possible errors:org.bluez.Error.InvalidArguments
|
||||
org.bluez.Error.Canceled
|
||||
org.bluez.Error.InProgress
|
||||
org.bluez.Error.ConnectionAttemptFailed
|
||||
org.bluez.Error.NotSupported
|
||||
org.bluez.Error.Failed
|
||||
|
||||
void RemovePort(string path) [experimental]
|
||||
|
||||
Removes the serial port object for given path.
|
||||
|
||||
Possible errors:org.bluez.serial.Error.DoesNotExist
|
||||
Possible errors:org.bluez.Error.DoesNotExist
|
||||
|
||||
array{string} ListPorts() [experimental]
|
||||
|
||||
@ -61,27 +61,26 @@ Methods string CreateProxy(string uuid, string address)
|
||||
remote device and then creates a RFCOMM TTY
|
||||
device for it. The RFCOMM TTY device is returned.
|
||||
|
||||
Possible errors:org.bluez.serial.Error.InvalidArguments
|
||||
org.bluez.serial.Error.ConnectionCanceled
|
||||
org.bluez.serial.Error.ConnectionInProgress
|
||||
org.bluez.serial.Error.ConnectionAttemptFailed
|
||||
org.bluez.serial.Error.NotSupported
|
||||
org.bluez.serial.Error.Failed
|
||||
Possible errors:org.bluez.Error.InvalidArguments
|
||||
org.bluez.Error.Canceled
|
||||
org.bluez.Error.InProgress
|
||||
org.bluez.Error.ConnectionAttemptFailed
|
||||
org.bluez.Error.NotSupported
|
||||
org.bluez.Error.Failed
|
||||
|
||||
void CancelConnectService(string address, string pattern)
|
||||
|
||||
Cancel a previous ConnectService method call.
|
||||
|
||||
Possible errors:org.bluez.serial.Error.InvalidArguments
|
||||
org.bluez.serial.Error.ConnectionNotInProgress
|
||||
Possible errors:org.bluez.serial.InvalidArguments
|
||||
|
||||
void DisconnectService(string device)
|
||||
|
||||
Disconnect a RFCOMM TTY device that has been
|
||||
created via the ConnectService method.
|
||||
|
||||
Possible errors:org.bluez.serial.Error.InvalidArguments
|
||||
org.bluez.serial.Error.DoesNotExist
|
||||
Possible errors:org.bluez.Error.InvalidArguments
|
||||
org.bluez.Error.DoesNotExist
|
||||
|
||||
Signals void PortCreated(string path) [experimental]
|
||||
|
||||
@ -137,13 +136,13 @@ Methods: void Enable() [experimental]
|
||||
Register the serial proxy service record and start
|
||||
listenning on the specified adapter/channel.
|
||||
|
||||
Possible errors:org.bluez.serial.Error.Failed
|
||||
Possible errors:org.bluez.Error.Failed
|
||||
|
||||
void Disable() [experimental]
|
||||
|
||||
Unregister the service record and stop listenning.
|
||||
|
||||
Possible errors:org.bluez.serial.Error.Failed
|
||||
Possible errors:org.bluez.Error.Failed
|
||||
|
||||
dict GetInfo() [experimental]
|
||||
Returns the proxy properties
|
||||
@ -157,5 +156,5 @@ Methods: void Enable() [experimental]
|
||||
6, 7 and 8. Available stop bits: 1 and 2. Available
|
||||
parity: "even", "odd", "mark", "space" and "none".
|
||||
|
||||
Possible errors:org.bluez.serial.Error.InvalidArguments
|
||||
org.bluez.serial.Error.Failed
|
||||
Possible errors:org.bluez.Error.InvalidArguments
|
||||
org.bluez.Error.Failed
|
||||
|
Loading…
Reference in New Issue
Block a user