GUPnPServiceInfo: GUPnP Reference Manual

## GUPnPServiceInfo GUPnPServiceInfo — Base abstract class for querying service information. |

## Functions

void | (*GUPnPServiceIntrospectionCallback) ()
GUPnPContext * | gupnp_service_info_get_context ()
const char * | gupnp_service_info_get_location ()
const SoupURI * | gupnp_service_info_get_url_base ()
const char * | gupnp_service_info_get_udn ()
const char * | gupnp_service_info_get_service_type ()
char * | gupnp_service_info_get_id ()
char * | gupnp_service_info_get_scpd_url ()
char * | gupnp_service_info_get_control_url ()
char * | gupnp_service_info_get_event_subscription_url ()
GUPnPServiceIntrospection * | gupnp_service_info_get_introspection ()
void | gupnp_service_info_get_introspection_async ()
void | gupnp_service_info_get_introspection_async_full ()

## Properties

GUPnPContext * | context | Read / Write / Construct Only
GUPnPXMLDoc * | document | Write / Construct Only
gpointer | element | Write / Construct Only
gchar * | location | Read / Write / Construct Only
gchar * | service-type | Read / Write / Construct Only
gchar * | udn | Read / Write / Construct Only
SoupURI * | url-base | Read / Write / Construct Only

## Types and Values

struct | GUPnPServiceInfo

## Object Hierarchy

        GObject
        ╰── GUPnPServiceInfo
            ├── GUPnPService
            ╰── GUPnPServiceProxy

## Description

The GUPnPDeviceInfo base abstract class provides methods for querying service information.

## Functions

### GUPnPServiceIntrospectionCallback ()

    void
    (*GUPnPServiceIntrospectionCallback) (GUPnPServiceInfo *info,
                                          GUPnPServiceIntrospection *introspection,
                                          const GError *error,
                                          gpointer user_data);

Callback notifying that `introspection` for `info` has been obtained.

#### Parameters

info | The GUPnPServiceInfo introspection was requested for |
introspection | The new GUPnPServiceIntrospection object, or NULL |
error | The GError that occurred, or NULL |
user_data | User data |

### gupnp_service_info_get_context ()

    GUPnPContext *
    gupnp_service_info_get_context (GUPnPServiceInfo *info);

Get the GUPnPContext associated with `info` .

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A GUPnPContext.

[transfer none]

### gupnp_service_info_get_location ()

    const char *
    gupnp_service_info_get_location (GUPnPServiceInfo *info);

Get the location of the device description file.

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A constant string.

### gupnp_service_info_get_url_base ()

    const SoupURI *
    gupnp_service_info_get_url_base (GUPnPServiceInfo *info);

Get the URL base of this service.

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A constant SoupURI.

### gupnp_service_info_get_udn ()

    const char *
    gupnp_service_info_get_udn (GUPnPServiceInfo *info);

Get the Unique Device Name of the containing device.

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A constant string.

### gupnp_service_info_get_service_type ()

    const char *
    gupnp_service_info_get_service_type (GUPnPServiceInfo *info);

Get the UPnP service type, or `NULL`.

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A constant string.

### gupnp_service_info_get_id ()

    char *
    gupnp_service_info_get_id (GUPnPServiceInfo *info);

Get the ID of this service, or `NULL` if there is no ID.

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A string. This string should be freed with `g_free()` after use.

### gupnp_service_info_get_scpd_url ()

    char *
    gupnp_service_info_get_scpd_url (GUPnPServiceInfo *info);

Get the SCPD URL for this service, or `NULL` if there is no SCPD.

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A string. This string should be freed with `g_free()` after use.

### gupnp_service_info_get_control_url ()

    char *
    gupnp_service_info_get_control_url (GUPnPServiceInfo *info);

Get the control URL for this service, or `NULL`..

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A string. This string should be freed with `g_free()` after use.

### gupnp_service_info_get_event_subscription_url ()

    char *
    gupnp_service_info_get_event_subscription_url
                                   (GUPnPServiceInfo *info);

Get the event subscription URL for this service, or `NULL`.

#### Parameters

info | A GUPnPServiceInfo |

#### Returns

A string. This string should be freed with `g_free()` after use.

### gupnp_service_info_get_introspection ()

    GUPnPServiceIntrospection *
    gupnp_service_info_get_introspection (GUPnPServiceInfo *info,
                                          GError **error);

`gupnp_service_info_get_introspection` has been deprecated since version 0.20.15. and should not be used in newly-written code.

Use `gupnp_service_info_get_introspection_async()` or `gupnp_service_info_get_introspection_async_full()` instead.

Note that introspection object is created from the information in service description document (SCPD) provided by the service so it can not be created if the service does not provide an SCPD.

Warning: You should use `gupnp_service_info_get_introspection_async()` instead, this function re-enter the GMainloop before returning or might even block.

#### Parameters

info | A GUPnPServiceInfo |
error | return location for a GError, or `NULL` |

#### Returns

A new GUPnPServiceIntrospection for this service or `NULL`. Unref after use.

[transfer full]

### gupnp_service_info_get_introspection_async ()

    void
    gupnp_service_info_get_introspection_async
                                   (GUPnPServiceInfo *info,
                                    GUPnPServiceIntrospectionCallback callback,
                                    gpointer user_data);

Note that introspection object is created from the information in service description document (SCPD) provided by the service so it can not be created if the service does not provide an SCPD.

#### Parameters

info | A GUPnPServiceInfo |
callback | (scope async) : callback to be called when introspection object is ready. |
user_data | user_data to be passed to the callback. |

### gupnp_service_info_get_introspection_async_full ()

    void
    gupnp_service_info_get_introspection_async_full
                                   (GUPnPServiceInfo *info,
                                    GUPnPServiceIntrospectionCallback callback,
                                    GCancellable *cancellable,
                                    gpointer user_data);

Note that introspection object is created from the information in service description document (SCPD) provided by the service so it can not be created if the service does not provide an SCPD.

If `cancellable` is used to cancel the call, `callback` will be called with error code `G_IO_ERROR_CANCELLED`.

#### Parameters

info | A GUPnPServiceInfo |
callback | (scope async) : callback to be called when introspection object is ready. |
cancellable | GCancellable that can be used to cancel the call, or `NULL`. |
user_data | user_data to be passed to the callback. |

Since: 0.20.9.

## Types and Values

### struct GUPnPServiceInfo

    struct GUPnPServiceInfo;

This struct contains private data only, and should be accessed using the functions below.

## Property Details

### The `“context”` property

      “context”                  GUPnPContext *

The GUPnPContext to use.

Flags: Read / Write / Construct Only

### The `“document”` property

      “document”                 GUPnPXMLDoc *

Private property.

Flags: Write / Construct Only

Stability Level: Private

### The `“element”` property

      “element”                  gpointer

Private property.

Flags: Write / Construct Only

Stability Level: Private

### The `“location”` property

      “location”                 gchar *

The location of the device description file.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“service-type”` property

      “service-type”             gchar *

The service type.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“udn”` property

      “udn”                      gchar *

The UDN of the containing device.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“url-base”` property

      “url-base”                 SoupURI *

The URL base (SoupURI).

Flags: Read / Write / Construct Only