DMAPMdnsBrowser: libdmapsharing-3.0 Reference Manual

## DMAPMdnsBrowser DMAPMdnsBrowser |

## Functions

GQuark | dmap_mdns_browser_error_quark ()
DMAPMdnsBrowser * | dmap_mdns_browser_new ()
gboolean | dmap_mdns_browser_start ()
gboolean | dmap_mdns_browser_stop ()
const GSList * | dmap_mdns_browser_get_services ()
DMAPMdnsBrowserServiceType | dmap_mdns_browser_get_service_type ()

## Signals

void | service-added | Run Last
void | service-removed | Run Last

## Types and Values

enum | DMAPMdnsBrowserServiceType
enum | DMAPMdnsBrowserTransportProtocol
enum | DMAPMdnsBrowserError
struct | DMAPMdnsBrowserService
struct | DMAPMdnsBrowser
#define | DMAP_MDNS_BROWSER_ERROR

## Object Hierarchy

        GEnum
        ├── DMAPMdnsBrowserError
        ├── DMAPMdnsBrowserServiceType
        ╰── DMAPMdnsBrowserTransportProtocol
        GObject
        ╰── DMAPMdnsBrowser

## Description

## Functions

### dmap_mdns_browser_error_quark ()

    GQuark
    dmap_mdns_browser_error_quark (void);

### dmap_mdns_browser_new ()

    DMAPMdnsBrowser *
    dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type);

Creates a new mDNS browser.

#### Parameters

type | The type of service to browse. |

#### Returns

a pointer to a DMAPMdnsBrowser.

### dmap_mdns_browser_start ()

    gboolean
    dmap_mdns_browser_start (DMAPMdnsBrowser *browser,
                             GError **error);

Starts a DMAPMdnsBrowser.

#### Parameters

browser | A DMAPMdnsBrowser. |
error | A GError. |

#### Returns

TRUE on success, else FALSE.

### dmap_mdns_browser_stop ()

    gboolean
    dmap_mdns_browser_stop (DMAPMdnsBrowser *browser,
                            GError **error);

Stops a DMAPMdnsBrowser.

#### Parameters

browser | A DMAPMdnsBrowser. |
error | A GError. |

#### Returns

TRUE on success, else FALSE.

### dmap_mdns_browser_get_services ()

    const GSList *
    dmap_mdns_browser_get_services (DMAPMdnsBrowser *browser);

### dmap_mdns_browser_get_service_type ()

    DMAPMdnsBrowserServiceType
    dmap_mdns_browser_get_service_type (DMAPMdnsBrowser *browser);

## Types and Values

### enum DMAPMdnsBrowserServiceType

#### Members

DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID |  |
DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP |  |
DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP |  |
DMAP_MDNS_BROWSER_SERVICE_TYPE_DACP |  |
DMAP_MDNS_BROWSER_SERVICE_TYPE_RAOP |  |
DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST |  |

### enum DMAPMdnsBrowserTransportProtocol

#### Members

DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP |  |
DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_UDP |  |
DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_LAST |  |

### enum DMAPMdnsBrowserError

#### Members

DMAP_MDNS_BROWSER_ERROR_NOT_RUNNING |  |
DMAP_MDNS_BROWSER_ERROR_FAILED |  |

### struct DMAPMdnsBrowserService

    struct DMAPMdnsBrowserService {
    	gchar *service_name;
    	gchar *name;
    	gchar *host;
    	guint port;
    	gboolean password_protected;
    	gchar *pair;                                         // FIXME: subclass
    	DMAPMdnsBrowserTransportProtocol transport_protocol; // FIXME: subclass
    };

### struct DMAPMdnsBrowser

    struct DMAPMdnsBrowser;

### DMAP_MDNS_BROWSER_ERROR

    #define DMAP_MDNS_BROWSER_ERROR dmap_mdns_browser_error_quark ()

## Signal Details

### The `“service-added”` signal

    void
    user_function (DMAPMdnsBrowser *browser,
                   gpointer         service,
                   gpointer         user_data)

Emitted each time a service becomes available to `browser`

#### Parameters

browser | the DMAPMdnsBrowser which received the signal. |
service | DMAPMdnsBrowserService |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“service-removed”` signal

    void
    user_function (DMAPMdnsBrowser *dmapmdnsbrowser,
                   gchar           *arg1,
                   gpointer         user_data)

Flags: Run Last