DmapMdnsBrowser: libdmapsharing Reference Manual

## DmapMdnsBrowser DmapMdnsBrowser — An mDNS browser. |

## 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 ()
DmapMdnsServiceType | dmap_mdns_browser_get_service_type ()

## Signals

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

## Types and Values

enum | DmapMdnsBrowserError
| DmapMdnsBrowser
#define | DMAP_MDNS_BROWSER_ERROR

## Object Hierarchy

        GEnum
        ╰── DmapMdnsBrowserError
        GObject
        ╰── DmapMdnsBrowser

## Description

DmapMdnsBrowser objects watch for DMAP shares.

## Functions

### dmap_mdns_browser_error_quark ()

    GQuark
    dmap_mdns_browser_error_quark (void);

### dmap_mdns_browser_new ()

    DmapMdnsBrowser *
    dmap_mdns_browser_new (DmapMdnsServiceType 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);

#### Parameters

browser | A DmapMdnsBrowser. |

#### Returns

services available to `browser` .

[element-type DmapMdnsService][transfer none]

### dmap_mdns_browser_get_service_type ()

    DmapMdnsServiceType
    dmap_mdns_browser_get_service_type (DmapMdnsBrowser *browser);

## Types and Values

### enum DmapMdnsBrowserError

#### Members

DMAP_MDNS_BROWSER_ERROR_NOT_RUNNING |  |
DMAP_MDNS_BROWSER_ERROR_FAILED |  |

### DmapMdnsBrowser

    typedef struct _DmapMdnsBrowser 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,
                   DmapMdnsService *service,
                   gpointer         user_data)

Emitted each time a service becomes available to `browser`

#### Parameters

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

Flags: Run Last

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

    void
    user_function (DmapMdnsBrowser *dmapmdnsbrowser,
                   char            *arg1,
                   gpointer         user_data)

Flags: Run Last