profile

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: 3 Imported by: 0

Documentation

Overview

BlueZ D-Bus Profile API description [profile-api.txt]

Index

Constants

This section is empty.

Variables

View Source
var Profile1Interface = "org.bluez.Profile1"
View Source
var ProfileManager1Interface = "org.bluez.ProfileManager1"

Functions

This section is empty.

Types

type Profile1

type Profile1 struct {
	Properties *Profile1Properties
	// contains filtered or unexported fields
}

Profile1 Profile hierarchy

func NewProfile1

func NewProfile1(servicePath string, objectPath dbus.ObjectPath) (*Profile1, error)

NewProfile1 create a new instance of Profile1

Args: - servicePath: unique name - objectPath: freely definable

func (*Profile1) Client

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

Client return Profile1 dbus client

func (*Profile1) Close

func (a *Profile1) Close()

Close the connection

func (*Profile1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*Profile1) Interface

func (a *Profile1) Interface() string

Interface return Profile1 interface

func (*Profile1) NewConnection

func (a *Profile1) NewConnection(device dbus.ObjectPath, fd int32, fd_properties map[string]interface{}) error

NewConnection

This method gets called when a new service level
connection has been made and authorized.

Common fd_properties:

uint16 Version		Profile version (optional)
uint16 Features		Profile features (optional)

Possible errors: org.bluez.Error.Rejected
                 org.bluez.Error.Canceled

func (*Profile1) Path

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

Path return Profile1 object path

func (*Profile1) Release

func (a *Profile1) Release() error

Release

This method gets called when the service daemon
unregisters the profile. A profile can use it to do
cleanup tasks. There is no need to unregister the
profile, because when this method gets called it has
already been unregistered.

func (*Profile1) RequestDisconnection

func (a *Profile1) RequestDisconnection(device dbus.ObjectPath) error

RequestDisconnection

This method gets called when a profile gets
disconnected.

The file descriptor is no longer owned by the service
daemon and the profile implementation needs to take
care of cleaning up all connections.

If multiple file descriptors are indicated via
NewConnection, it is expected that all of them
are disconnected before returning from this
method call.

Possible errors: org.bluez.Error.Rejected
                 org.bluez.Error.Canceled

type Profile1Properties

type Profile1Properties struct {
	// contains filtered or unexported fields
}

Profile1Properties contains the exposed properties of an interface

func (*Profile1Properties) Lock

func (p *Profile1Properties) Lock()

Lock access to properties

func (*Profile1Properties) Unlock

func (p *Profile1Properties) Unlock()

Unlock access to properties

type ProfileManager1

type ProfileManager1 struct {
	Properties *ProfileManager1Properties
	// contains filtered or unexported fields
}

ProfileManager1 Profile Manager hierarchy

func NewProfileManager1

func NewProfileManager1() (*ProfileManager1, error)

func (*ProfileManager1) Client

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

Client return ProfileManager1 dbus client

func (*ProfileManager1) Close

func (a *ProfileManager1) Close()

Close the connection

func (*ProfileManager1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*ProfileManager1) Interface

func (a *ProfileManager1) Interface() string

Interface return ProfileManager1 interface

func (*ProfileManager1) Path

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

Path return ProfileManager1 object path

func (*ProfileManager1) RegisterProfile

func (a *ProfileManager1) RegisterProfile(profile dbus.ObjectPath, uuid string, options map[string]interface{}) error

RegisterProfile

This registers a profile implementation.

If an application disconnects from the bus all
its registered profiles will be removed.

HFP HS UUID: 0000111e-0000-1000-8000-00805f9b34fb

	Default RFCOMM channel is 6. And this requires
	authentication.

Available options:

	string Name

		Human readable name for the profile

	string Service

func (*ProfileManager1) UnregisterProfile

func (a *ProfileManager1) UnregisterProfile(profile dbus.ObjectPath) error

UnregisterProfile

This unregisters the profile that has been previously
registered. The object path parameter must match the
same value that has been used on registration.

Possible errors: org.bluez.Error.DoesNotExist

type ProfileManager1Properties

type ProfileManager1Properties struct {
	// contains filtered or unexported fields
}

ProfileManager1Properties contains the exposed properties of an interface

func (*ProfileManager1Properties) Lock

func (p *ProfileManager1Properties) Lock()

Lock access to properties

func (*ProfileManager1Properties) Unlock

func (p *ProfileManager1Properties) Unlock()

Unlock access to properties

Jump to

Keyboard shortcuts

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