dmap-connection

dmap-connection

Functions

Types and Values

Object Hierarchy

    GEnum
    ╰── DmapConnectionState

Description

Functions

get_protocol_version_cc ()

DmapContentCode
(*get_protocol_version_cc) (DmapConnection *connection);

get_query_metadata ()

gchar *
(*get_query_metadata) (DmapConnection *connection);

handle_mlcl ()

DmapRecord *
(*handle_mlcl) (DmapConnection *connection,
                DmapRecordFactory *factory,
                GNode *mlcl,
                gint *item_id);

connected ()

void
(*connected) (DmapConnection *connection);

disconnected ()

void
(*disconnected) (DmapConnection *connection);

authenticate ()

char *
(*authenticate) (DmapConnection *connection,
                 const char *name);

connecting ()

void
(*connecting) (DmapConnection *connection,
               DmapConnectionState state,
               float progress);

operation_done ()

void
(*operation_done) (DmapConnection *connection);

DmapConnectionFunc ()

gboolean
(*DmapConnectionFunc) (DmapConnection *connection,
                       gboolean result,
                       const char *reason,
                       gpointer user_data);

DmapResponseHandler ()

void
(*DmapResponseHandler) (DmapConnection *connection,
                        guint status,
                        GNode *structure,
                        gpointer user_data);

dmap_connection_is_connected ()

gboolean
dmap_connection_is_connected (DmapConnection *connection);

dmap_connection_setup ()

void
dmap_connection_setup (DmapConnection *connection);

dmap_connection_start ()

void
dmap_connection_start (DmapConnection *connection,
                       DmapConnectionFunc callback,
                       gpointer user_data);

Connect to the remote DMAP share.

Parameters

connection

The connection.

 

callback

The function to call once the connection is complete.

[scope async]

user_data

The data to pass to the callback.

 

dmap_connection_disconnect ()

void
dmap_connection_disconnect (DmapConnection *connection,
                            DmapConnectionFunc callback,
                            gpointer user_data);

Disconnect from the remote DMAP share.

Parameters

connection

The connection.

 

callback

The function to call once the connection is complete.

[scope async]

user_data

The data to pass to the callback.

 

dmap_connection_get_headers ()

SoupMessageHeaders *
dmap_connection_get_headers (DmapConnection *connection,
                             const char *uri);

dmap_connection_get_playlists ()

GSList *
dmap_connection_get_playlists (DmapConnection *connection);

Get the playlists associated with a DmapConnection instance.

Parameters

connection

A DmapConnection

 

Returns

pointer to a list of playlists.

[element-type DmapPlaylist][transfer none]


dmap_connection_authenticate_message ()

void
dmap_connection_authenticate_message (DmapConnection *connection,
                                      SoupSession *session,
                                      SoupMessage *message,
                                      SoupAuth *auth,
                                      const char *password);

Attach an authentication credential to a request. This method should be called by a function that is connected to the “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.

Parameters

connection

A DmapConnection

 

session

A SoupSession

 

message

A SoupMessage

 

auth

A SoupAuth

 

password

A password

 

Types and Values

enum DmapConnectionState

Members

DMAP_GET_INFO

   

DMAP_LOGIN

   

DMAP_GET_REVISION_NUMBER

   

DMAP_GET_DB_INFO

   

DMAP_GET_SONGS

   

DMAP_GET_PLAYLISTS

   

DMAP_GET_PLAYLIST_ENTRIES

   

DMAP_LOGOUT

   

DMAP_DONE