## GSSDPClient

GSSDPClient — SSDP "bus" wrapper.

## Synopsis

                        GSSDPClient;
    GSSDPClient *       gssdp_client_new                    (GMainContext *main_context,
                                                             const char *interface,
                                                             GError **error);
    GMainContext *      gssdp_client_get_main_context       (GSSDPClient *client);
    void                gssdp_client_set_server_id          (GSSDPClient *client,
                                                             const char *server_id);
    const char *        gssdp_client_get_server_id          (GSSDPClient *client);
    const char *        gssdp_client_get_interface          (GSSDPClient *client);
    const char *        gssdp_client_get_host_ip            (GSSDPClient *client);
    gboolean            gssdp_client_get_active             (GSSDPClient *client);

## Object Hierarchy

      GObject
       +----GSSDPClient

## Properties

      "active"                   gboolean              : Read / Write
      "error"                    gpointer              : Write / Construct Only
      "host-ip"                  gchar*                : Read
      "interface"                gchar*                : Read / Write / Construct Only
      "main-context"             gpointer              : Read / Write / Construct Only
      "server-id"                gchar*                : Read / Write

## Signals

      "message-received"                               : Run Last

## Description

GSSDPClient wraps the SSDP "bus" as used by both GSSDPResourceBrowser and GSSDPResourceGroup.

## Details

### GSSDPClient

    typedef struct _GSSDPClient GSSDPClient;

### gssdp_client_new ()

    GSSDPClient *       gssdp_client_new                    (GMainContext *main_context,
                                                             const char *interface,
                                                             GError **error);

`main_context` : | The GMainContext to associate with, or NULL
`interface` : | The name of the network interface, or `NULL` for auto-detection.
`error` : | Location to store error, or NULL
Returns : | A new GSSDPClient object.

### gssdp_client_get_main_context ()

    GMainContext *      gssdp_client_get_main_context       (GSSDPClient *client);

`client` : | A GSSDPClient
Returns : | The GMainContext `client` is associated with, or NULL.

### gssdp_client_set_server_id ()

    void                gssdp_client_set_server_id          (GSSDPClient *client,
                                                             const char *server_id);

Sets the server ID of `client` to `server_id`.

`client` : | A GSSDPClient
`server_id` : | The server ID

### gssdp_client_get_server_id ()

    const char *        gssdp_client_get_server_id          (GSSDPClient *client);

`client` : | A GSSDPClient
Returns : | The server ID.

### gssdp_client_get_interface ()

    const char *        gssdp_client_get_interface          (GSSDPClient *client);

Get the name of the network interface associated to `client`.

`client` : | A GSSDPClient
Returns : | The network interface name. This string should not be freed.

### gssdp_client_get_host_ip ()

    const char *        gssdp_client_get_host_ip            (GSSDPClient *client);

Get the IP address we advertise ourselves as using.

`client` : | A GSSDPClient
Returns : | The IP address. This string should not be freed.

### gssdp_client_get_active ()

    gboolean            gssdp_client_get_active             (GSSDPClient *client);

`client` : | A GSSDPClient
Returns : | `TRUE` if `client` is active, `FALSE` otherwise.

## Property Details

### The `"active"` property

      "active"                   gboolean              : Read / Write

Whether this client is active or not (passive). When active (default), the client sends messages on the network, otherwise not. In most cases, you don't want to touch this property.

Default value: TRUE

### The `"error"` property

      "error"                    gpointer              : Write / Construct Only

Internal property.

Stability Level Private

### The `"host-ip"` property

      "host-ip"                  gchar*                : Read

The IP address of the assoicated network interface.

Default value: NULL

### The `"interface"` property

      "interface"                gchar*                : Read / Write / Construct Only

The name of the network interface this client is associated with. Set to NULL to autodetect.

Default value: NULL

### The `"main-context"` property

      "main-context"             gpointer              : Read / Write / Construct Only

The GMainContext to use. Set to NULL to use the default.

### The `"server-id"` property

      "server-id"                gchar*                : Read / Write

The SSDP server's identifier.

Default value: NULL

## Signal Details

### The `"message-received"` signal

    void                user_function                      (GSSDPClient *arg0,
                                                            gchar       *arg1,
                                                            guint        arg2,
                                                            gint         arg3,
                                                            gpointer     arg4,
                                                            gpointer     user_data)      : Run Last

Internal signal.

`user_data` : | user data set when the signal handler was connected.

Stability Level: Private