media

package
v0.0.0-...-fc103a5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

BlueZ D-Bus Media API description [media-api.txt]

Index

Constants

This section is empty.

Variables

View Source
var Media1Interface = "org.bluez.Media1"
View Source
var MediaControl1Interface = "org.bluez.MediaControl1"
View Source
var MediaEndpoint1Interface = "org.bluez.MediaEndpoint1"
View Source
var MediaFolder1Interface = "org.bluez.MediaFolder1"
View Source
var MediaItem1Interface = "org.bluez.MediaItem1"
View Source
var MediaPlayer1Interface = "org.bluez.MediaPlayer1"
View Source
var MediaTransport1Interface = "org.bluez.MediaTransport1"

Functions

This section is empty.

Types

type Media1

type Media1 struct {
	Properties *Media1Properties
	// contains filtered or unexported fields
}

Media1 Media hierarchy

func NewMedia1

func NewMedia1(objectPath dbus.ObjectPath) (*Media1, error)

NewMedia1 create a new instance of Media1

Args: - objectPath: [variable prefix]/{hci0,hci1,...}

func (*Media1) Client

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

Client return Media1 dbus client

func (*Media1) Close

func (a *Media1) Close()

Close the connection

func (*Media1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*Media1) GetProperties

func (a *Media1) GetProperties() (*Media1Properties, error)

GetProperties load all available properties

func (*Media1) GetPropertiesSignal

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

GetPropertiesSignal return a channel for receiving udpdates on property changes

func (*Media1) GetProperty

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

GetProperty get a property

func (*Media1) Interface

func (a *Media1) Interface() string

Interface return Media1 interface

func (*Media1) Path

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

Path return Media1 object path

func (*Media1) RegisterEndpoint

func (a *Media1) RegisterEndpoint(endpoint dbus.ObjectPath, properties map[string]interface{}) error

RegisterEndpoint

Register a local end point to sender, the sender can
register as many end points as it likes.

Note: If the sender disconnects the end points are
automatically unregistered.

possible properties:

	string UUID:

		UUID of the profile which the endpoint
		is for.

	byte Codec:

		Assigned number of codec that the
		endpoint implements. The values should
		match the profile specification which
		is indicated by the UUID.

	array{byte} Capabilities:

		Capabilities blob, it is used as it is
		so the size and byte order must match.

Possible Errors: org.bluez.Error.InvalidArguments
		 org.bluez.Error.NotSupported - emitted
		 when interface for the end-point is
		 disabled.

func (*Media1) RegisterPlayer

func (a *Media1) RegisterPlayer(player dbus.ObjectPath, properties map[string]interface{}) error

RegisterPlayer

Register a media player object to sender, the sender
can register as many objects as it likes.

Object must implement at least
org.mpris.MediaPlayer2.Player as defined in MPRIS 2.2
spec:

http://specifications.freedesktop.org/mpris-spec/latest/

Note: If the sender disconnects its objects are
automatically unregistered.

Possible Errors: org.bluez.Error.InvalidArguments
		 org.bluez.Error.NotSupported

func (*Media1) SetProperty

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

SetProperty set a property

func (*Media1) ToProps

func (a *Media1) ToProps() bluez.Properties

ToProps return the properties interface

func (*Media1) UnregisterEndpoint

func (a *Media1) UnregisterEndpoint(endpoint dbus.ObjectPath) error

UnregisterEndpoint

Unregister sender end point.

func (*Media1) UnregisterPlayer

func (a *Media1) UnregisterPlayer(player dbus.ObjectPath) error

UnregisterPlayer

Unregister sender media player.

func (*Media1) UnwatchProperties

func (a *Media1) UnwatchProperties(ch chan *bluez.PropertyChanged) error

func (*Media1) WatchProperties

func (a *Media1) WatchProperties() (chan *bluez.PropertyChanged, error)

WatchProperties updates on property changes

type Media1Properties

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

Media1Properties contains the exposed properties of an interface

func (*Media1Properties) FromDBusMap

func (a *Media1Properties) FromDBusMap(props map[string]dbus.Variant) (*Media1Properties, error)

FromDBusMap convert a map to an Media1Properties

func (*Media1Properties) FromMap

func (a *Media1Properties) FromMap(props map[string]interface{}) (*Media1Properties, error)

FromMap convert a map to an Media1Properties

func (*Media1Properties) Lock

func (p *Media1Properties) Lock()

Lock access to properties

func (*Media1Properties) ToMap

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

ToMap convert a Media1Properties to map

func (*Media1Properties) Unlock

func (p *Media1Properties) Unlock()

Unlock access to properties

type MediaControl1

type MediaControl1 struct {
	Properties *MediaControl1Properties
	// contains filtered or unexported fields
}

MediaControl1 Media Control hierarchy

func NewMediaControl1

func NewMediaControl1(objectPath dbus.ObjectPath) (*MediaControl1, error)

NewMediaControl1 create a new instance of MediaControl1

Args: - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX

func NewMediaControl1FromAdapterID

func NewMediaControl1FromAdapterID(adapterID string) (*MediaControl1, error)

NewMediaControl1FromAdapterID create a new instance of MediaControl1 adapterID: ID of an adapter eg. hci0

func (*MediaControl1) Client

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

Client return MediaControl1 dbus client

func (*MediaControl1) Close

func (a *MediaControl1) Close()

Close the connection

func (*MediaControl1) FastForward

func (a *MediaControl1) FastForward() error

FastForward

Fast forward playback, this action is only stopped
when another method in this interface is called.

func (*MediaControl1) GetConnected

func (a *MediaControl1) GetConnected() (bool, error)

GetConnected get Connected value

func (*MediaControl1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*MediaControl1) GetPlayer

func (a *MediaControl1) GetPlayer() (dbus.ObjectPath, error)

GetPlayer get Player value

func (*MediaControl1) GetProperties

func (a *MediaControl1) GetProperties() (*MediaControl1Properties, error)

GetProperties load all available properties

func (*MediaControl1) GetPropertiesSignal

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

GetPropertiesSignal return a channel for receiving udpdates on property changes

func (*MediaControl1) GetProperty

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

GetProperty get a property

func (*MediaControl1) Interface

func (a *MediaControl1) Interface() string

Interface return MediaControl1 interface

func (*MediaControl1) Next

func (a *MediaControl1) Next() error

Next

Next item.

func (*MediaControl1) Path

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

Path return MediaControl1 object path

func (*MediaControl1) Pause

func (a *MediaControl1) Pause() error

Pause

Pause playback.

func (*MediaControl1) Play

func (a *MediaControl1) Play() error

Play

Resume playback.

func (*MediaControl1) Previous

func (a *MediaControl1) Previous() error

Previous

Previous item.

func (*MediaControl1) Rewind

func (a *MediaControl1) Rewind() error

Rewind

Rewind playback, this action is only stopped
when another method in this interface is called.

Properties

boolean Connected [readonly]

object Player [readonly, optional]

	Addressed Player object path.

func (*MediaControl1) SetProperty

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

SetProperty set a property

func (*MediaControl1) Stop

func (a *MediaControl1) Stop() error

Stop

Stop playback.

func (*MediaControl1) ToProps

func (a *MediaControl1) ToProps() bluez.Properties

ToProps return the properties interface

func (*MediaControl1) UnwatchProperties

func (a *MediaControl1) UnwatchProperties(ch chan *bluez.PropertyChanged) error

func (*MediaControl1) VolumeDown

func (a *MediaControl1) VolumeDown() error

VolumeDown

Adjust remote volume one step down

func (*MediaControl1) VolumeUp

func (a *MediaControl1) VolumeUp() error

VolumeUp

Adjust remote volume one step up

func (*MediaControl1) WatchProperties

func (a *MediaControl1) WatchProperties() (chan *bluez.PropertyChanged, error)

WatchProperties updates on property changes

type MediaControl1Properties

type MediaControl1Properties struct {

	/*
		Connected
	*/
	Connected bool

	/*
		Player Addressed Player object path.
	*/
	Player dbus.ObjectPath
	// contains filtered or unexported fields
}

MediaControl1Properties contains the exposed properties of an interface

func (*MediaControl1Properties) FromDBusMap

FromDBusMap convert a map to an MediaControl1Properties

func (*MediaControl1Properties) FromMap

func (a *MediaControl1Properties) FromMap(props map[string]interface{}) (*MediaControl1Properties, error)

FromMap convert a map to an MediaControl1Properties

func (*MediaControl1Properties) Lock

func (p *MediaControl1Properties) Lock()

Lock access to properties

func (*MediaControl1Properties) ToMap

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

ToMap convert a MediaControl1Properties to map

func (*MediaControl1Properties) Unlock

func (p *MediaControl1Properties) Unlock()

Unlock access to properties

type MediaEndpoint1

type MediaEndpoint1 struct {
	Properties *MediaEndpoint1Properties
	// contains filtered or unexported fields
}

MediaEndpoint1 MediaEndpoint1 hierarchy

func NewMediaEndpoint1

func NewMediaEndpoint1(servicePath string, objectPath dbus.ObjectPath) (*MediaEndpoint1, error)

NewMediaEndpoint1 create a new instance of MediaEndpoint1

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

func (*MediaEndpoint1) ClearConfiguration

func (a *MediaEndpoint1) ClearConfiguration(transport dbus.ObjectPath) error

ClearConfiguration

Clear transport configuration.

func (*MediaEndpoint1) Client

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

Client return MediaEndpoint1 dbus client

func (*MediaEndpoint1) Close

func (a *MediaEndpoint1) Close()

Close the connection

func (*MediaEndpoint1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*MediaEndpoint1) GetProperties

func (a *MediaEndpoint1) GetProperties() (*MediaEndpoint1Properties, error)

GetProperties load all available properties

func (*MediaEndpoint1) GetPropertiesSignal

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

GetPropertiesSignal return a channel for receiving udpdates on property changes

func (*MediaEndpoint1) GetProperty

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

GetProperty get a property

func (*MediaEndpoint1) Interface

func (a *MediaEndpoint1) Interface() string

Interface return MediaEndpoint1 interface

func (*MediaEndpoint1) Path

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

Path return MediaEndpoint1 object path

func (*MediaEndpoint1) Release

func (a *MediaEndpoint1) Release() error

Release

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

func (*MediaEndpoint1) SelectConfiguration

func (a *MediaEndpoint1) SelectConfiguration(capabilities []byte) ([]byte, error)

SelectConfiguration

Select preferable configuration from the supported
capabilities.

Returns a configuration which can be used to setup
a transport.

Note: There is no need to cache the selected
configuration since on success the configuration is
send back as parameter of SetConfiguration.

func (*MediaEndpoint1) SetConfiguration

func (a *MediaEndpoint1) SetConfiguration(transport dbus.ObjectPath, properties map[string]interface{}) error

SetConfiguration

Set configuration for the transport.

func (*MediaEndpoint1) SetProperty

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

SetProperty set a property

func (*MediaEndpoint1) ToProps

func (a *MediaEndpoint1) ToProps() bluez.Properties

ToProps return the properties interface

func (*MediaEndpoint1) UnwatchProperties

func (a *MediaEndpoint1) UnwatchProperties(ch chan *bluez.PropertyChanged) error

func (*MediaEndpoint1) WatchProperties

func (a *MediaEndpoint1) WatchProperties() (chan *bluez.PropertyChanged, error)

WatchProperties updates on property changes

type MediaEndpoint1Properties

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

MediaEndpoint1Properties contains the exposed properties of an interface

func (*MediaEndpoint1Properties) FromDBusMap

FromDBusMap convert a map to an MediaEndpoint1Properties

func (*MediaEndpoint1Properties) FromMap

func (a *MediaEndpoint1Properties) FromMap(props map[string]interface{}) (*MediaEndpoint1Properties, error)

FromMap convert a map to an MediaEndpoint1Properties

func (*MediaEndpoint1Properties) Lock

func (p *MediaEndpoint1Properties) Lock()

Lock access to properties

func (*MediaEndpoint1Properties) ToMap

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

ToMap convert a MediaEndpoint1Properties to map

func (*MediaEndpoint1Properties) Unlock

func (p *MediaEndpoint1Properties) Unlock()

Unlock access to properties

type MediaFolder1

type MediaFolder1 struct {
	Properties *MediaFolder1Properties
	// contains filtered or unexported fields
}

MediaFolder1 MediaFolder1 hierarchy

func NewMediaFolder1

func NewMediaFolder1(servicePath string, objectPath dbus.ObjectPath) (*MediaFolder1, error)

NewMediaFolder1 create a new instance of MediaFolder1

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

func NewMediaFolder1Controller

func NewMediaFolder1Controller(objectPath dbus.ObjectPath) (*MediaFolder1, error)

NewMediaFolder1Controller create a new instance of MediaFolder1

Args: - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX

func (*MediaFolder1) ChangeFolder

func (a *MediaFolder1) ChangeFolder(folder dbus.ObjectPath) error

ChangeFolder

Change current folder.

Note: By changing folder the items of previous folder
might be destroyed and have to be listed again, the
exception is NowPlaying folder which should be always
present while the player is active.

Possible Errors: org.bluez.Error.InvalidArguments
		 org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaFolder1) Client

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

Client return MediaFolder1 dbus client

func (*MediaFolder1) Close

func (a *MediaFolder1) Close()

Close the connection

func (*MediaFolder1) GetAttributes

func (a *MediaFolder1) GetAttributes() ([]string, error)

GetAttributes get Attributes value

func (*MediaFolder1) GetEnd

func (a *MediaFolder1) GetEnd() (uint32, error)

GetEnd get End value

func (*MediaFolder1) GetName

func (a *MediaFolder1) GetName() (string, error)

GetName get Name value

func (*MediaFolder1) GetNumberOfItems

func (a *MediaFolder1) GetNumberOfItems() (uint32, error)

GetNumberOfItems get NumberOfItems value

func (*MediaFolder1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*MediaFolder1) GetProperties

func (a *MediaFolder1) GetProperties() (*MediaFolder1Properties, error)

GetProperties load all available properties

func (*MediaFolder1) GetPropertiesSignal

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

GetPropertiesSignal return a channel for receiving udpdates on property changes

func (*MediaFolder1) GetProperty

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

GetProperty get a property

func (*MediaFolder1) GetStart

func (a *MediaFolder1) GetStart() (uint32, error)

GetStart get Start value

func (*MediaFolder1) Interface

func (a *MediaFolder1) Interface() string

Interface return MediaFolder1 interface

func (*MediaFolder1) ListItems

func (a *MediaFolder1) ListItems(filter map[string]interface{}) ([]dbus.ObjectPath, string, error)

ListItems

Return a list of items found

Possible Errors: org.bluez.Error.InvalidArguments
		 org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaFolder1) Path

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

Path return MediaFolder1 object path

func (*MediaFolder1) Search

func (a *MediaFolder1) Search(value string, filter map[string]interface{}) (dbus.ObjectPath, error)

Search

Return a folder object containing the search result.

To list the items found use the folder object returned
and pass to ChangeFolder.

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaFolder1) SetAttributes

func (a *MediaFolder1) SetAttributes(v []string) error

SetAttributes set Attributes value

func (*MediaFolder1) SetEnd

func (a *MediaFolder1) SetEnd(v uint32) error

SetEnd set End value

func (*MediaFolder1) SetProperty

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

SetProperty set a property

func (*MediaFolder1) SetStart

func (a *MediaFolder1) SetStart(v uint32) error

SetStart set Start value

func (*MediaFolder1) ToProps

func (a *MediaFolder1) ToProps() bluez.Properties

ToProps return the properties interface

func (*MediaFolder1) UnwatchProperties

func (a *MediaFolder1) UnwatchProperties(ch chan *bluez.PropertyChanged) error

func (*MediaFolder1) WatchProperties

func (a *MediaFolder1) WatchProperties() (chan *bluez.PropertyChanged, error)

WatchProperties updates on property changes

type MediaFolder1Properties

type MediaFolder1Properties struct {

	/*
		Start Offset of the first item.

				Default value: 0
	*/
	Start uint32

	/*
		End Offset of the last item.

				Default value: NumbeOfItems
	*/
	End uint32

	/*
		Attributes Item properties that should be included in the list.

				Possible Values:

					"title", "artist", "album", "genre",
					"number-of-tracks", "number", "duration"

				Default Value: All
	*/
	Attributes []string

	/*
		NumberOfItems Number of items in the folder
	*/
	NumberOfItems uint32

	/*
		Name Folder name:

				Possible values:
					"/Filesystem/...": Filesystem scope
					"/NowPlaying/...": NowPlaying scope

				Note: /NowPlaying folder might not be listed if player
				is stopped, folders created by Search are virtual so
				once another Search is perform or the folder is
				changed using ChangeFolder it will no longer be listed.

	Filters
	*/
	Name string
	// contains filtered or unexported fields
}

MediaFolder1Properties contains the exposed properties of an interface

func (*MediaFolder1Properties) FromDBusMap

func (a *MediaFolder1Properties) FromDBusMap(props map[string]dbus.Variant) (*MediaFolder1Properties, error)

FromDBusMap convert a map to an MediaFolder1Properties

func (*MediaFolder1Properties) FromMap

func (a *MediaFolder1Properties) FromMap(props map[string]interface{}) (*MediaFolder1Properties, error)

FromMap convert a map to an MediaFolder1Properties

func (*MediaFolder1Properties) Lock

func (p *MediaFolder1Properties) Lock()

Lock access to properties

func (*MediaFolder1Properties) ToMap

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

ToMap convert a MediaFolder1Properties to map

func (*MediaFolder1Properties) Unlock

func (p *MediaFolder1Properties) Unlock()

Unlock access to properties

type MediaItem1

type MediaItem1 struct {
	Properties *MediaItem1Properties
	// contains filtered or unexported fields
}

MediaItem1 MediaItem1 hierarchy

func NewMediaItem1

func NewMediaItem1(servicePath string, objectPath dbus.ObjectPath) (*MediaItem1, error)

NewMediaItem1 create a new instance of MediaItem1

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

func NewMediaItem1Controller

func NewMediaItem1Controller(objectPath dbus.ObjectPath) (*MediaItem1, error)

NewMediaItem1Controller create a new instance of MediaItem1

Args: - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX/itemX

func (*MediaItem1) AddtoNowPlaying

func (a *MediaItem1) AddtoNowPlaying() error

AddtoNowPlaying

Add item to now playing list

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaItem1) Client

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

Client return MediaItem1 dbus client

func (*MediaItem1) Close

func (a *MediaItem1) Close()

Close the connection

func (*MediaItem1) GetAlbum

func (a *MediaItem1) GetAlbum() (string, error)

GetAlbum get Album value

func (*MediaItem1) GetArtist

func (a *MediaItem1) GetArtist() (string, error)

GetArtist get Artist value

func (*MediaItem1) GetDuration

func (a *MediaItem1) GetDuration() (uint32, error)

GetDuration get Duration value

func (*MediaItem1) GetFolderType

func (a *MediaItem1) GetFolderType() (string, error)

GetFolderType get FolderType value

func (*MediaItem1) GetGenre

func (a *MediaItem1) GetGenre() (string, error)

GetGenre get Genre value

func (*MediaItem1) GetMetadata

func (a *MediaItem1) GetMetadata() (map[string]interface{}, error)

GetMetadata get Metadata value

func (*MediaItem1) GetName

func (a *MediaItem1) GetName() (string, error)

GetName get Name value

func (*MediaItem1) GetNumber

func (a *MediaItem1) GetNumber() (uint32, error)

GetNumber get Number value

func (*MediaItem1) GetNumberOfTracks

func (a *MediaItem1) GetNumberOfTracks() (uint32, error)

GetNumberOfTracks get NumberOfTracks value

func (*MediaItem1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*MediaItem1) GetPlayable

func (a *MediaItem1) GetPlayable() (bool, error)

GetPlayable get Playable value

func (*MediaItem1) GetPlayer

func (a *MediaItem1) GetPlayer() (dbus.ObjectPath, error)

GetPlayer get Player value

func (*MediaItem1) GetProperties

func (a *MediaItem1) GetProperties() (*MediaItem1Properties, error)

GetProperties load all available properties

func (*MediaItem1) GetPropertiesSignal

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

GetPropertiesSignal return a channel for receiving udpdates on property changes

func (*MediaItem1) GetProperty

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

GetProperty get a property

func (*MediaItem1) GetTitle

func (a *MediaItem1) GetTitle() (string, error)

GetTitle get Title value

func (*MediaItem1) GetType

func (a *MediaItem1) GetType() (string, error)

GetType get Type value

func (*MediaItem1) Interface

func (a *MediaItem1) Interface() string

Interface return MediaItem1 interface

func (*MediaItem1) Path

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

Path return MediaItem1 object path

func (*MediaItem1) Play

func (a *MediaItem1) Play() error

Play

Play item

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaItem1) SetAlbum

func (a *MediaItem1) SetAlbum(v string) error

SetAlbum set Album value

func (*MediaItem1) SetArtist

func (a *MediaItem1) SetArtist(v string) error

SetArtist set Artist value

func (*MediaItem1) SetDuration

func (a *MediaItem1) SetDuration(v uint32) error

SetDuration set Duration value

func (*MediaItem1) SetGenre

func (a *MediaItem1) SetGenre(v string) error

SetGenre set Genre value

func (*MediaItem1) SetNumber

func (a *MediaItem1) SetNumber(v uint32) error

SetNumber set Number value

func (*MediaItem1) SetNumberOfTracks

func (a *MediaItem1) SetNumberOfTracks(v uint32) error

SetNumberOfTracks set NumberOfTracks value

func (*MediaItem1) SetProperty

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

SetProperty set a property

func (*MediaItem1) SetTitle

func (a *MediaItem1) SetTitle(v string) error

SetTitle set Title value

func (*MediaItem1) ToProps

func (a *MediaItem1) ToProps() bluez.Properties

ToProps return the properties interface

func (*MediaItem1) UnwatchProperties

func (a *MediaItem1) UnwatchProperties(ch chan *bluez.PropertyChanged) error

func (*MediaItem1) WatchProperties

func (a *MediaItem1) WatchProperties() (chan *bluez.PropertyChanged, error)

WatchProperties updates on property changes

type MediaItem1Properties

type MediaItem1Properties struct {

	/*
		Playable Indicates if the item can be played

				Available if property Type is "folder"
	*/
	Playable bool

	/*
		Metadata Item metadata.

				Possible values:
	*/
	Metadata map[string]interface{}

	/*
		Title Item title name

						Available if property Type is "audio"
						or "video"
	*/
	Title string

	/*
		Album Item album name

						Available if property Type is "audio"
						or "video"
	*/
	Album string

	/*
		Duration Item duration in milliseconds

						Available if property Type is "audio"
						or "video"
	*/
	Duration uint32

	/*
		FolderType Folder type.

				Possible values: "mixed", "titles", "albums", "artists"

				Available if property Type is "Folder"
	*/
	FolderType string

	/*
		Name Item displayable name
	*/
	Name string

	/*
		Type Item type

				Possible values: "video", "audio", "folder"
	*/
	Type string

	/*
		Artist Item artist name

						Available if property Type is "audio"
						or "video"
	*/
	Artist string

	/*
		Genre Item genre name

						Available if property Type is "audio"
						or "video"
	*/
	Genre string

	/*
		NumberOfTracks Item album number of tracks in total

						Available if property Type is "audio"
						or "video"
	*/
	NumberOfTracks uint32

	/*
		Number Item album number

						Available if property Type is "audio"
						or "video"
	*/
	Number uint32

	/*
		Player Player object path the item belongs to
	*/
	Player dbus.ObjectPath
	// contains filtered or unexported fields
}

MediaItem1Properties contains the exposed properties of an interface

func (*MediaItem1Properties) FromDBusMap

func (a *MediaItem1Properties) FromDBusMap(props map[string]dbus.Variant) (*MediaItem1Properties, error)

FromDBusMap convert a map to an MediaItem1Properties

func (*MediaItem1Properties) FromMap

func (a *MediaItem1Properties) FromMap(props map[string]interface{}) (*MediaItem1Properties, error)

FromMap convert a map to an MediaItem1Properties

func (*MediaItem1Properties) Lock

func (p *MediaItem1Properties) Lock()

Lock access to properties

func (*MediaItem1Properties) ToMap

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

ToMap convert a MediaItem1Properties to map

func (*MediaItem1Properties) Unlock

func (p *MediaItem1Properties) Unlock()

Unlock access to properties

type MediaPlayer1

type MediaPlayer1 struct {
	Properties *MediaPlayer1Properties
	// contains filtered or unexported fields
}

MediaPlayer1 MediaPlayer1 hierarchy

func NewMediaPlayer1

func NewMediaPlayer1(objectPath dbus.ObjectPath) (*MediaPlayer1, error)

NewMediaPlayer1 create a new instance of MediaPlayer1

Args: - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX

func (*MediaPlayer1) Client

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

Client return MediaPlayer1 dbus client

func (*MediaPlayer1) Close

func (a *MediaPlayer1) Close()

Close the connection

func (*MediaPlayer1) FastForward

func (a *MediaPlayer1) FastForward() error

FastForward

Fast forward playback, this action is only stopped
when another method in this interface is called.

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaPlayer1) GetAlbum

func (a *MediaPlayer1) GetAlbum() (string, error)

GetAlbum get Album value

func (*MediaPlayer1) GetArtist

func (a *MediaPlayer1) GetArtist() (string, error)

GetArtist get Artist value

func (*MediaPlayer1) GetBrowsable

func (a *MediaPlayer1) GetBrowsable() (bool, error)

GetBrowsable get Browsable value

func (*MediaPlayer1) GetDevice

func (a *MediaPlayer1) GetDevice() (dbus.ObjectPath, error)

GetDevice get Device value

func (*MediaPlayer1) GetDuration

func (a *MediaPlayer1) GetDuration() (uint32, error)

GetDuration get Duration value

func (*MediaPlayer1) GetEqualizer

func (a *MediaPlayer1) GetEqualizer() (string, error)

GetEqualizer get Equalizer value

func (*MediaPlayer1) GetGenre

func (a *MediaPlayer1) GetGenre() (string, error)

GetGenre get Genre value

func (*MediaPlayer1) GetName

func (a *MediaPlayer1) GetName() (string, error)

GetName get Name value

func (*MediaPlayer1) GetNumberOfTracks

func (a *MediaPlayer1) GetNumberOfTracks() (uint32, error)

GetNumberOfTracks get NumberOfTracks value

func (*MediaPlayer1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*MediaPlayer1) GetPlaylist

func (a *MediaPlayer1) GetPlaylist() (dbus.ObjectPath, error)

GetPlaylist get Playlist value

func (*MediaPlayer1) GetPosition

func (a *MediaPlayer1) GetPosition() (uint32, error)

GetPosition get Position value

func (*MediaPlayer1) GetProperties

func (a *MediaPlayer1) GetProperties() (*MediaPlayer1Properties, error)

GetProperties load all available properties

func (*MediaPlayer1) GetPropertiesSignal

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

GetPropertiesSignal return a channel for receiving udpdates on property changes

func (*MediaPlayer1) GetProperty

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

GetProperty get a property

func (*MediaPlayer1) GetRepeat

func (a *MediaPlayer1) GetRepeat() (string, error)

GetRepeat get Repeat value

func (*MediaPlayer1) GetScan

func (a *MediaPlayer1) GetScan() (string, error)

GetScan get Scan value

func (*MediaPlayer1) GetSearchable

func (a *MediaPlayer1) GetSearchable() (bool, error)

GetSearchable get Searchable value

func (*MediaPlayer1) GetShuffle

func (a *MediaPlayer1) GetShuffle() (string, error)

GetShuffle get Shuffle value

func (*MediaPlayer1) GetStatus

func (a *MediaPlayer1) GetStatus() (string, error)

GetStatus get Status value

func (*MediaPlayer1) GetSubtype

func (a *MediaPlayer1) GetSubtype() (string, error)

GetSubtype get Subtype value

func (*MediaPlayer1) GetTitle

func (a *MediaPlayer1) GetTitle() (string, error)

GetTitle get Title value

func (*MediaPlayer1) GetTrack

func (a *MediaPlayer1) GetTrack() (map[string]interface{}, error)

GetTrack get Track value

func (*MediaPlayer1) GetTrackNumber

func (a *MediaPlayer1) GetTrackNumber() (uint32, error)

GetTrackNumber get TrackNumber value

func (*MediaPlayer1) GetType

func (a *MediaPlayer1) GetType() (string, error)

GetType get Type value

func (*MediaPlayer1) Interface

func (a *MediaPlayer1) Interface() string

Interface return MediaPlayer1 interface

func (*MediaPlayer1) Next

func (a *MediaPlayer1) Next() error

Next

Next item.

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaPlayer1) Path

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

Path return MediaPlayer1 object path

func (*MediaPlayer1) Pause

func (a *MediaPlayer1) Pause() error

Pause

Pause playback.

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaPlayer1) Play

func (a *MediaPlayer1) Play() error

Play

Resume playback.

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaPlayer1) Previous

func (a *MediaPlayer1) Previous() error

Previous

Previous item.

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaPlayer1) Rewind

func (a *MediaPlayer1) Rewind() error

Rewind

Rewind playback, this action is only stopped
when another method in this interface is called.

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaPlayer1) SetAlbum

func (a *MediaPlayer1) SetAlbum(v string) error

SetAlbum set Album value

func (*MediaPlayer1) SetArtist

func (a *MediaPlayer1) SetArtist(v string) error

SetArtist set Artist value

func (*MediaPlayer1) SetDuration

func (a *MediaPlayer1) SetDuration(v uint32) error

SetDuration set Duration value

func (*MediaPlayer1) SetEqualizer

func (a *MediaPlayer1) SetEqualizer(v string) error

SetEqualizer set Equalizer value

func (*MediaPlayer1) SetGenre

func (a *MediaPlayer1) SetGenre(v string) error

SetGenre set Genre value

func (*MediaPlayer1) SetNumberOfTracks

func (a *MediaPlayer1) SetNumberOfTracks(v uint32) error

SetNumberOfTracks set NumberOfTracks value

func (*MediaPlayer1) SetPlaylist

func (a *MediaPlayer1) SetPlaylist(v dbus.ObjectPath) error

SetPlaylist set Playlist value

func (*MediaPlayer1) SetProperty

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

SetProperty set a property

func (*MediaPlayer1) SetRepeat

func (a *MediaPlayer1) SetRepeat(v string) error

SetRepeat set Repeat value

func (*MediaPlayer1) SetScan

func (a *MediaPlayer1) SetScan(v string) error

SetScan set Scan value

func (*MediaPlayer1) SetShuffle

func (a *MediaPlayer1) SetShuffle(v string) error

SetShuffle set Shuffle value

func (*MediaPlayer1) SetTitle

func (a *MediaPlayer1) SetTitle(v string) error

SetTitle set Title value

func (*MediaPlayer1) SetTrackNumber

func (a *MediaPlayer1) SetTrackNumber(v uint32) error

SetTrackNumber set TrackNumber value

func (*MediaPlayer1) Stop

func (a *MediaPlayer1) Stop() error

Stop

Stop playback.

Possible Errors: org.bluez.Error.NotSupported
		 org.bluez.Error.Failed

func (*MediaPlayer1) ToProps

func (a *MediaPlayer1) ToProps() bluez.Properties

ToProps return the properties interface

func (*MediaPlayer1) UnwatchProperties

func (a *MediaPlayer1) UnwatchProperties(ch chan *bluez.PropertyChanged) error

func (*MediaPlayer1) WatchProperties

func (a *MediaPlayer1) WatchProperties() (chan *bluez.PropertyChanged, error)

WatchProperties updates on property changes

type MediaPlayer1Properties

type MediaPlayer1Properties struct {

	/*
		Position Playback position in milliseconds. Changing the
				position may generate additional events that will be
				sent to the remote device. When position is 0 it means
				the track is starting and when it's greater than or
				equal to track's duration the track has ended. Note
				that even if duration is not available in metadata it's
				possible to signal its end by setting position to the
				maximum uint32 value.
	*/
	Position uint32

	/*
		Type Player type

				Possible values:

					"Audio"
					"Video"
					"Audio Broadcasting"
					"Video Broadcasting"
	*/
	Type string

	/*
		Repeat Possible values: "off", "singletrack", "alltracks" or
						"group"
	*/
	Repeat string

	/*
		TrackNumber Track number
	*/
	TrackNumber uint32

	/*
		Device Device object path.
	*/
	Device dbus.ObjectPath

	/*
		Subtype Player subtype

				Possible values:

					"Audio Book"
					"Podcast"
	*/
	Subtype string

	/*
		Status Possible status: "playing", "stopped", "paused",
						"forward-seek", "reverse-seek"
						or "error"
	*/
	Status string

	/*
		Track Track metadata.

				Possible values:
	*/
	Track map[string]interface{}

	/*
		Title Track title name
	*/
	Title string

	/*
		Genre Track genre name
	*/
	Genre string

	/*
		Playlist Playlist object path.
	*/
	Playlist dbus.ObjectPath

	/*
		Scan Possible values: "off", "alltracks" or "group"
	*/
	Scan string

	/*
		Shuffle Possible values: "off", "alltracks" or "group"
	*/
	Shuffle string

	/*
		Artist Track artist name
	*/
	Artist string

	/*
		Album Track album name
	*/
	Album string

	/*
		NumberOfTracks Number of tracks in total
	*/
	NumberOfTracks uint32

	/*
		Duration Track duration in milliseconds
	*/
	Duration uint32

	/*
		Name Player name
	*/
	Name string

	/*
		Browsable If present indicates the player can be browsed using
				MediaFolder interface.

				Possible values:

					True: Supported and active
					False: Supported but inactive

				Note: If supported but inactive clients can enable it
				by using MediaFolder interface but it might interfere
				in the playback of other players.
	*/
	Browsable bool

	/*
		Equalizer Possible values: "off" or "on"
	*/
	Equalizer string

	/*
		Searchable If present indicates the player can be searched using
				MediaFolder interface.

				Possible values:

					True: Supported and active
					False: Supported but inactive

				Note: If supported but inactive clients can enable it
				by using MediaFolder interface but it might interfere
				in the playback of other players.
	*/
	Searchable bool
	// contains filtered or unexported fields
}

MediaPlayer1Properties contains the exposed properties of an interface

func (*MediaPlayer1Properties) FromDBusMap

func (a *MediaPlayer1Properties) FromDBusMap(props map[string]dbus.Variant) (*MediaPlayer1Properties, error)

FromDBusMap convert a map to an MediaPlayer1Properties

func (*MediaPlayer1Properties) FromMap

func (a *MediaPlayer1Properties) FromMap(props map[string]interface{}) (*MediaPlayer1Properties, error)

FromMap convert a map to an MediaPlayer1Properties

func (*MediaPlayer1Properties) Lock

func (p *MediaPlayer1Properties) Lock()

Lock access to properties

func (*MediaPlayer1Properties) ToMap

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

ToMap convert a MediaPlayer1Properties to map

func (*MediaPlayer1Properties) Unlock

func (p *MediaPlayer1Properties) Unlock()

Unlock access to properties

type MediaTransport1

type MediaTransport1 struct {
	Properties *MediaTransport1Properties
	// contains filtered or unexported fields
}

MediaTransport1 MediaTransport1 hierarchy

func NewMediaTransport1

func NewMediaTransport1(objectPath dbus.ObjectPath) (*MediaTransport1, error)

NewMediaTransport1 create a new instance of MediaTransport1

Args: - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/fdX

func (*MediaTransport1) Acquire

func (a *MediaTransport1) Acquire() (dbus.UnixFD, uint16, uint16, error)

Acquire

Acquire transport file descriptor and the MTU for read
and write respectively.

Possible Errors: org.bluez.Error.NotAuthorized
		 org.bluez.Error.Failed

func (*MediaTransport1) Client

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

Client return MediaTransport1 dbus client

func (*MediaTransport1) Close

func (a *MediaTransport1) Close()

Close the connection

func (*MediaTransport1) GetCodec

func (a *MediaTransport1) GetCodec() (byte, error)

GetCodec get Codec value

func (*MediaTransport1) GetConfiguration

func (a *MediaTransport1) GetConfiguration() ([]byte, error)

GetConfiguration get Configuration value

func (*MediaTransport1) GetDelay

func (a *MediaTransport1) GetDelay() (uint16, error)

GetDelay get Delay value

func (*MediaTransport1) GetDevice

func (a *MediaTransport1) GetDevice() (dbus.ObjectPath, error)

GetDevice get Device value

func (*MediaTransport1) GetObjectManagerSignal

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

GetObjectManagerSignal return a channel for receiving updates from the ObjectManager

func (*MediaTransport1) GetProperties

func (a *MediaTransport1) GetProperties() (*MediaTransport1Properties, error)

GetProperties load all available properties

func (*MediaTransport1) GetPropertiesSignal

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

GetPropertiesSignal return a channel for receiving udpdates on property changes

func (*MediaTransport1) GetProperty

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

GetProperty get a property

func (*MediaTransport1) GetState

func (a *MediaTransport1) GetState() (string, error)

GetState get State value

func (*MediaTransport1) GetUUID

func (a *MediaTransport1) GetUUID() (string, error)

GetUUID get UUID value

func (*MediaTransport1) GetVolume

func (a *MediaTransport1) GetVolume() (uint16, error)

GetVolume get Volume value

func (*MediaTransport1) Interface

func (a *MediaTransport1) Interface() string

Interface return MediaTransport1 interface

func (*MediaTransport1) Path

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

Path return MediaTransport1 object path

func (*MediaTransport1) Release

func (a *MediaTransport1) Release() error

Release

Releases file descriptor.

func (*MediaTransport1) SetDelay

func (a *MediaTransport1) SetDelay(v uint16) error

SetDelay set Delay value

func (*MediaTransport1) SetProperty

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

SetProperty set a property

func (*MediaTransport1) SetVolume

func (a *MediaTransport1) SetVolume(v uint16) error

SetVolume set Volume value

func (*MediaTransport1) ToProps

func (a *MediaTransport1) ToProps() bluez.Properties

ToProps return the properties interface

func (*MediaTransport1) TryAcquire

func (a *MediaTransport1) TryAcquire() (dbus.UnixFD, uint16, uint16, error)

TryAcquire

Acquire transport file descriptor only if the transport
is in "pending" state at the time the message is
received by BlueZ. Otherwise no request will be sent
to the remote device and the function will just fail
with org.bluez.Error.NotAvailable.

Possible Errors: org.bluez.Error.NotAuthorized
		 org.bluez.Error.Failed
		 org.bluez.Error.NotAvailable

func (*MediaTransport1) UnwatchProperties

func (a *MediaTransport1) UnwatchProperties(ch chan *bluez.PropertyChanged) error

func (*MediaTransport1) WatchProperties

func (a *MediaTransport1) WatchProperties() (chan *bluez.PropertyChanged, error)

WatchProperties updates on property changes

type MediaTransport1Properties

type MediaTransport1Properties struct {

	/*
		UUID UUID of the profile which the transport is for.
	*/
	UUID string

	/*
		Codec Assigned number of codec that the transport support.
				The values should match the profile specification which
				is indicated by the UUID.
	*/
	Codec byte

	/*
		Configuration Configuration blob, it is used as it is so the size and
				byte order must match.
	*/
	Configuration []byte

	/*
		State Indicates the state of the transport. Possible
				values are:
					"idle": not streaming
					"pending": streaming but not acquired
					"active": streaming and acquired
	*/
	State string

	/*
		Delay Optional. Transport delay in 1/10 of millisecond, this
				property is only writeable when the transport was
				acquired by the sender.
	*/
	Delay uint16

	/*
		Volume Optional. Indicates volume level of the transport,
				this property is only writeable when the transport was
				acquired by the sender.

				Possible Values: 0-127
	*/
	Volume uint16

	/*
		Device Device object which the transport is connected to.
	*/
	Device dbus.ObjectPath
	// contains filtered or unexported fields
}

MediaTransport1Properties contains the exposed properties of an interface

func (*MediaTransport1Properties) FromDBusMap

FromDBusMap convert a map to an MediaTransport1Properties

func (*MediaTransport1Properties) FromMap

func (a *MediaTransport1Properties) FromMap(props map[string]interface{}) (*MediaTransport1Properties, error)

FromMap convert a map to an MediaTransport1Properties

func (*MediaTransport1Properties) Lock

func (p *MediaTransport1Properties) Lock()

Lock access to properties

func (*MediaTransport1Properties) ToMap

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

ToMap convert a MediaTransport1Properties to map

func (*MediaTransport1Properties) Unlock

func (p *MediaTransport1Properties) Unlock()

Unlock access to properties

Jump to

Keyboard shortcuts

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