Documentation
¶
Overview ¶
OBEX D-Bus Agent API description [obex-agent-api.txt]
Index ¶
- Variables
- type Agent1
- func (a *Agent1) AuthorizePush(transfer dbus.ObjectPath) (string, error)
- func (a *Agent1) Cancel() error
- func (a *Agent1) Client() *bluez.Client
- func (a *Agent1) Close()
- func (a *Agent1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
- func (a *Agent1) GetProperties() (*Agent1Properties, error)
- func (a *Agent1) GetPropertiesSignal() (chan *dbus.Signal, error)
- func (a *Agent1) GetProperty(name string) (dbus.Variant, error)
- func (a *Agent1) Interface() string
- func (a *Agent1) Path() dbus.ObjectPath
- func (a *Agent1) Release() error
- func (a *Agent1) SetProperty(name string, value interface{}) error
- func (a *Agent1) ToProps() bluez.Properties
- func (a *Agent1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
- func (a *Agent1) WatchProperties() (chan *bluez.PropertyChanged, error)
- type Agent1Properties
- func (a *Agent1Properties) FromDBusMap(props map[string]dbus.Variant) (*Agent1Properties, error)
- func (a *Agent1Properties) FromMap(props map[string]interface{}) (*Agent1Properties, error)
- func (p *Agent1Properties) Lock()
- func (a *Agent1Properties) ToMap() (map[string]interface{}, error)
- func (p *Agent1Properties) Unlock()
- type AgentManager1
- func (a *AgentManager1) Client() *bluez.Client
- func (a *AgentManager1) Close()
- func (a *AgentManager1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
- func (a *AgentManager1) GetProperties() (*AgentManager1Properties, error)
- func (a *AgentManager1) GetPropertiesSignal() (chan *dbus.Signal, error)
- func (a *AgentManager1) GetProperty(name string) (dbus.Variant, error)
- func (a *AgentManager1) Interface() string
- func (a *AgentManager1) Path() dbus.ObjectPath
- func (a *AgentManager1) RegisterAgent(agent dbus.ObjectPath) error
- func (a *AgentManager1) SetProperty(name string, value interface{}) error
- func (a *AgentManager1) ToProps() bluez.Properties
- func (a *AgentManager1) UnregisterAgent(agent dbus.ObjectPath) error
- func (a *AgentManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
- func (a *AgentManager1) WatchProperties() (chan *bluez.PropertyChanged, error)
- type AgentManager1Properties
- func (a *AgentManager1Properties) FromDBusMap(props map[string]dbus.Variant) (*AgentManager1Properties, error)
- func (a *AgentManager1Properties) FromMap(props map[string]interface{}) (*AgentManager1Properties, error)
- func (p *AgentManager1Properties) Lock()
- func (a *AgentManager1Properties) ToMap() (map[string]interface{}, error)
- func (p *AgentManager1Properties) Unlock()
Constants ¶
This section is empty.
Variables ¶
var Agent1Interface = "org.bluez.obex.Agent1"
var AgentManager1Interface = "org.bluez.obex.AgentManager1"
Functions ¶
This section is empty.
Types ¶
type Agent1 ¶
type Agent1 struct { Properties *Agent1Properties // contains filtered or unexported fields }
Agent1 Agent hierarchy
func NewAgent1 ¶
func NewAgent1(servicePath string, objectPath dbus.ObjectPath) (*Agent1, error)
NewAgent1 create a new instance of Agent1
Args: - servicePath: unique name - objectPath: freely definable
func (*Agent1) AuthorizePush ¶
func (a *Agent1) AuthorizePush(transfer dbus.ObjectPath) (string, error)
AuthorizePush
This method gets called when the service daemon needs to accept/reject a Bluetooth object push request. Returns the full path (including the filename) where the object shall be stored. The tranfer object will contain a Filename property that contains the default location and name that can be returned. Possible errors: org.bluez.obex.Error.Rejected org.bluez.obex.Error.Canceled
func (*Agent1) Cancel ¶
Cancel
This method gets called to indicate that the agent request failed before a reply was returned. It cancels the previous request.
func (*Agent1) GetObjectManagerSignal ¶
GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
func (*Agent1) GetProperties ¶
func (a *Agent1) GetProperties() (*Agent1Properties, error)
GetProperties load all available properties
func (*Agent1) GetPropertiesSignal ¶
GetPropertiesSignal return a channel for receiving udpdates on property changes
func (*Agent1) GetProperty ¶
GetProperty get a property
func (*Agent1) Release ¶
Release
This method gets called when the service daemon unregisters the agent. An agent can use it to do cleanup tasks. There is no need to unregister the agent, because when this method gets called it has already been unregistered.
func (*Agent1) SetProperty ¶
SetProperty set a property
func (*Agent1) ToProps ¶
func (a *Agent1) ToProps() bluez.Properties
ToProps return the properties interface
func (*Agent1) UnwatchProperties ¶
func (a *Agent1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
func (*Agent1) WatchProperties ¶
func (a *Agent1) WatchProperties() (chan *bluez.PropertyChanged, error)
WatchProperties updates on property changes
type Agent1Properties ¶
type Agent1Properties struct {
// contains filtered or unexported fields
}
Agent1Properties contains the exposed properties of an interface
func (*Agent1Properties) FromDBusMap ¶
func (a *Agent1Properties) FromDBusMap(props map[string]dbus.Variant) (*Agent1Properties, error)
FromDBusMap convert a map to an Agent1Properties
func (*Agent1Properties) FromMap ¶
func (a *Agent1Properties) FromMap(props map[string]interface{}) (*Agent1Properties, error)
FromMap convert a map to an Agent1Properties
func (*Agent1Properties) ToMap ¶
func (a *Agent1Properties) ToMap() (map[string]interface{}, error)
ToMap convert a Agent1Properties to map
type AgentManager1 ¶
type AgentManager1 struct { Properties *AgentManager1Properties // contains filtered or unexported fields }
AgentManager1 Agent Manager hierarchy
func NewAgentManager1 ¶
func NewAgentManager1() (*AgentManager1, error)
func (*AgentManager1) Client ¶
func (a *AgentManager1) Client() *bluez.Client
Client return AgentManager1 dbus client
func (*AgentManager1) GetObjectManagerSignal ¶
func (a *AgentManager1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
func (*AgentManager1) GetProperties ¶
func (a *AgentManager1) GetProperties() (*AgentManager1Properties, error)
GetProperties load all available properties
func (*AgentManager1) GetPropertiesSignal ¶
func (a *AgentManager1) GetPropertiesSignal() (chan *dbus.Signal, error)
GetPropertiesSignal return a channel for receiving udpdates on property changes
func (*AgentManager1) GetProperty ¶
func (a *AgentManager1) GetProperty(name string) (dbus.Variant, error)
GetProperty get a property
func (*AgentManager1) Interface ¶
func (a *AgentManager1) Interface() string
Interface return AgentManager1 interface
func (*AgentManager1) Path ¶
func (a *AgentManager1) Path() dbus.ObjectPath
Path return AgentManager1 object path
func (*AgentManager1) RegisterAgent ¶
func (a *AgentManager1) RegisterAgent(agent dbus.ObjectPath) error
RegisterAgent
Register an agent to request authorization of the user to accept/reject objects. Object push service needs to authorize each received object. Possible errors: org.bluez.obex.Error.AlreadyExists
func (*AgentManager1) SetProperty ¶
func (a *AgentManager1) SetProperty(name string, value interface{}) error
SetProperty set a property
func (*AgentManager1) ToProps ¶
func (a *AgentManager1) ToProps() bluez.Properties
ToProps return the properties interface
func (*AgentManager1) UnregisterAgent ¶
func (a *AgentManager1) UnregisterAgent(agent dbus.ObjectPath) error
UnregisterAgent
This unregisters the agent that has been previously registered. The object path parameter must match the same value that has been used on registration. Possible errors: org.bluez.obex.Error.DoesNotExist
func (*AgentManager1) UnwatchProperties ¶
func (a *AgentManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
func (*AgentManager1) WatchProperties ¶
func (a *AgentManager1) WatchProperties() (chan *bluez.PropertyChanged, error)
WatchProperties updates on property changes
type AgentManager1Properties ¶
type AgentManager1Properties struct {
// contains filtered or unexported fields
}
AgentManager1Properties contains the exposed properties of an interface
func (*AgentManager1Properties) FromDBusMap ¶
func (a *AgentManager1Properties) FromDBusMap(props map[string]dbus.Variant) (*AgentManager1Properties, error)
FromDBusMap convert a map to an AgentManager1Properties
func (*AgentManager1Properties) FromMap ¶
func (a *AgentManager1Properties) FromMap(props map[string]interface{}) (*AgentManager1Properties, error)
FromMap convert a map to an AgentManager1Properties
func (*AgentManager1Properties) Lock ¶
func (p *AgentManager1Properties) Lock()
Lock access to properties
func (*AgentManager1Properties) ToMap ¶
func (a *AgentManager1Properties) ToMap() (map[string]interface{}, error)
ToMap convert a AgentManager1Properties to map
func (*AgentManager1Properties) Unlock ¶
func (p *AgentManager1Properties) Unlock()
Unlock access to properties