dacp-share

## dacp-share dacp-share |

## Synopsis

    void                (*add_guid)                         (DACPShare *share,
                                                             gchar *guid);
    DACPShare *         dacp_share_new                      (const gchar *library_name,
                                                             DACPPlayer *player,
                                                             DMAPDb *db,
                                                             DMAPContainerDb *container_db);
    void                dacp_share_pair                     (DACPShare *share,
                                                             gchar *service_name,
                                                             gchar passcode[4]);
    void                dacp_share_player_updated           (DACPShare *share);
    void                dacp_share_start_lookup             (DACPShare *share);
    void                dacp_share_stop_lookup              (DACPShare *share);
    gboolean            (*lookup_guid)                      (DACPShare *share,
                                                             gchar *guid);
    void                (*remote_found)                     (DACPShare *share,
                                                             gchar *service_name,
                                                             gchar *remote_name);
    void                (*remote_lost)                      (DACPShare *share,
                                                             gchar *service_name);
    void                (*remote_paired)                    (DACPShare *share,
                                                             gchar *service_name,
                                                             gboolean connected);

## Description

## Details

### add_guid ()

    void                (*add_guid)                         (DACPShare *share,
                                                             gchar *guid);

### dacp_share_new ()

    DACPShare *         dacp_share_new                      (const gchar *library_name,
                                                             DACPPlayer *player,
                                                             DMAPDb *db,
                                                             DMAPContainerDb *container_db);

Creates a new DACP share and publishes it using mDNS.

`library_name` : | The library name that will be shown in the remote.
`player` : | A DACPPlayer instance, used to retrieve information from a player implementation.
`db` : | a media database represented by a DMAPDb instance.
`container_db` : | a container (album) database represented by a DMAPContainerDb instance.
Returns : | a pointer to a DACPShare.

### dacp_share_pair ()

    void                dacp_share_pair                     (DACPShare *share,
                                                             gchar *service_name,
                                                             gchar passcode[4]);

Pairs a DACP client (Remote) with this server. If the passcode is correct (the same as shown on the remote), the remote will start connecting to this server.

`share` : | a DACPShare
`service_name` : | DACP client (remote) service identifier.
`passcode` : | 4-Digit PIN code entered by the user.

### dacp_share_player_updated ()

    void                dacp_share_player_updated           (DACPShare *share);

### dacp_share_start_lookup ()

    void                dacp_share_start_lookup             (DACPShare *share);

Start looking up for DACP remotes. Connect to "remote-found" signal to detect new remotes. Be aware that when a DACPShare is created, only after calling this function is that it starts looking up for Remotes on the network.

`share` : | A DACPShare.

### dacp_share_stop_lookup ()

    void                dacp_share_stop_lookup              (DACPShare *share);

Stop looking up for DACP remotes.

`share` : | A DACPShare.

### lookup_guid ()

    gboolean            (*lookup_guid)                      (DACPShare *share,
                                                             gchar *guid);

### remote_found ()

    void                (*remote_found)                     (DACPShare *share,
                                                             gchar *service_name,
                                                             gchar *remote_name);

### remote_lost ()

    void                (*remote_lost)                      (DACPShare *share,
                                                             gchar *service_name);

### remote_paired ()

    void                (*remote_paired)                    (DACPShare *share,
                                                             gchar *service_name,
                                                             gboolean connected);