Dmap.Connection

g Dmap.Connection Dmap.Connection GObject.Object GObject.Object GObject.Object->Dmap.Connection

Subclasses:

Dmap.AvConnection, Dmap.ControlConnection, Dmap.ImageConnection

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

authenticate_message (session, message, auth, password)

get_headers (uri)

get_playlists ()

is_connected ()

start (callback, *user_data)

stop (callback, *user_data)

Virtual Methods

Inherited:

GObject.Object (7)

do_authenticate (name)

do_connected ()

do_connecting (state, progress)

do_disconnected ()

do_get_protocol_version_cc ()

do_get_query_metadata ()

do_operation_done ()

Properties

Name

Type

Flags

Short Description

base-uri

GLib.Uri

r/w

base URI

database-id

int

r/w

database ID

db

Dmap.Db

r/w/co

Dmap.Db object

dmap-version

float

r/w

DMAP version

factory

Dmap.RecordFactory

r/w/co

record factory

host

str

r/w/co

host

name

str

r/w/co

connection name

password

str

w

connection password

port

int

r/w/co

port

revision-number

int

r/w

revision number

session-id

int

r/w

session ID

username

str

r/w/co

connection username

Signals

Inherited:

GObject.Object (1)

Name

Short Description

authenticate

connected

connecting

disconnected

error

operation-done

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Dmap.Connection(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Dmap.ConnectionClass

authenticate_message(session, message, auth, password)
Parameters:

Attach an authentication credential to a request. This method should be called by a function that is connected to the Dmap.Connection ::authenticate signal. The signal will provide the connection, session, message and auth to that function. That function should obtain a password and provide it to this method.

get_headers(uri)
Parameters:

uri (str) –

Return type:

Soup.MessageHeaders

get_playlists()
Returns:

pointer to a list of playlists.

Return type:

[Dmap.Playlist]

Get the playlists associated with a Dmap.Connection instance.

is_connected()
Return type:

bool

Returns True if the connection is presently connected.

start(callback, *user_data)
Parameters:
  • callback (Dmap.ConnectionFunc) – The function to call once the connection is complete.

  • user_data (object or None) – The data to pass to the callback.

Connect to the remote DMAP share.

stop(callback, *user_data)
Parameters:
  • callback (Dmap.ConnectionFunc) – The function to call once the connection is complete.

  • user_data (object or None) – The data to pass to the callback.

Disconnect from the remote DMAP share.

do_authenticate(name) virtual
Parameters:

name (str) –

Return type:

str

do_connected() virtual
do_connecting(state, progress) virtual
Parameters:
do_disconnected() virtual
do_get_protocol_version_cc() virtual
Return type:

Dmap.ContentCode

do_get_query_metadata() virtual
Return type:

str

do_operation_done() virtual

Signal Details

Dmap.Connection.signals.authenticate(connection, object, p0, p1, p2, p3)
Signal Name:

authenticate

Flags:

RUN_LAST

Parameters:
Dmap.Connection.signals.connected(connection)
Signal Name:

connected

Flags:

RUN_LAST

Parameters:

connection (Dmap.Connection) – The object which received the signal

Dmap.Connection.signals.connecting(connection, object, p0)
Signal Name:

connecting

Flags:

RUN_LAST

Parameters:
Dmap.Connection.signals.disconnected(connection)
Signal Name:

disconnected

Flags:

RUN_LAST

Parameters:

connection (Dmap.Connection) – The object which received the signal

Dmap.Connection.signals.error(connection, object)
Signal Name:

error

Flags:

RUN_FIRST

Parameters:
Dmap.Connection.signals.operation_done(connection)
Signal Name:

operation-done

Flags:

RUN_FIRST

Parameters:

connection (Dmap.Connection) – The object which received the signal

Property Details

Dmap.Connection.props.base_uri
Name:

base-uri

Type:

GLib.Uri

Default Value:

None

Flags:

READABLE, WRITABLE

base URI

Dmap.Connection.props.database_id
Name:

database-id

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

database ID

Dmap.Connection.props.db
Name:

db

Type:

Dmap.Db

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Dmap.Db object

Dmap.Connection.props.dmap_version
Name:

dmap-version

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

DMAP version

Dmap.Connection.props.factory
Name:

factory

Type:

Dmap.RecordFactory

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

record factory

Dmap.Connection.props.host
Name:

host

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

host

Dmap.Connection.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

connection name

Dmap.Connection.props.password
Name:

password

Type:

str

Default Value:

None

Flags:

WRITABLE

connection password

Dmap.Connection.props.port
Name:

port

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

port

Dmap.Connection.props.revision_number
Name:

revision-number

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

revision number

Dmap.Connection.props.session_id
Name:

session-id

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

session ID

Dmap.Connection.props.username
Name:

username

Type:

str

Default Value:

'libdmapsharing'

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

connection username