obex_agent

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

OBEX D-Bus Agent API description [obex-agent-api.txt]

Index

Constants

This section is empty.

Variables

View Source
var Agent1Interface = "org.bluez.obex.Agent1"
View Source
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

func (a *Agent1) Cancel() error

Cancel

This method gets called to indicate that the agent
request failed before a reply was returned. It cancels
the previous request.

func (*Agent1) Client

func (a *Agent1) Client() *bluez.Client

Client return Agent1 dbus client

func (*Agent1) Close

func (a *Agent1) Close()

Close the connection

func (*Agent1) GetObjectManagerSignal

func (a *Agent1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)

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

func (a *Agent1) GetPropertiesSignal() (chan *dbus.Signal, error)

GetPropertiesSignal return a channel for receiving udpdates on property changes

func (*Agent1) GetProperty

func (a *Agent1) GetProperty(name string) (dbus.Variant, error)

GetProperty get a property

func (*Agent1) GetWatchPropertiesChannel

func (a *Agent1) GetWatchPropertiesChannel() chan *dbus.Signal

GetWatchPropertiesChannel return the dbus channel to receive properties interface

func (*Agent1) Interface

func (a *Agent1) Interface() string

Interface return Agent1 interface

func (*Agent1) Path

func (a *Agent1) Path() dbus.ObjectPath

Path return Agent1 object path

func (*Agent1) Release

func (a *Agent1) Release() error

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

func (a *Agent1) SetProperty(name string, value interface{}) error

SetProperty set a property

func (*Agent1) SetWatchPropertiesChannel

func (a *Agent1) SetWatchPropertiesChannel(c chan *dbus.Signal)

SetWatchPropertiesChannel set the dbus channel to receive properties interface

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) Lock

func (p *Agent1Properties) Lock()

Lock access to properties

func (*Agent1Properties) ToMap

func (a *Agent1Properties) ToMap() (map[string]interface{}, error)

ToMap convert a Agent1Properties to map

func (*Agent1Properties) Unlock

func (p *Agent1Properties) Unlock()

Unlock access to properties

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) Close

func (a *AgentManager1) Close()

Close the connection

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) GetWatchPropertiesChannel

func (a *AgentManager1) GetWatchPropertiesChannel() chan *dbus.Signal

GetWatchPropertiesChannel return the dbus channel to receive properties interface

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) SetWatchPropertiesChannel

func (a *AgentManager1) SetWatchPropertiesChannel(c chan *dbus.Signal)

SetWatchPropertiesChannel set the dbus channel to receive properties interface

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL