GUPnP.DeviceInfo.get_service

### Method

# GUPnP DeviceInfoget_service

#### Declaration [src]

    GUPnPServiceInfo*
    gupnp_device_info_get_service (
      GUPnPDeviceInfo* info,
      const char* type
    )

#### Description [src]

Get the service with type `type` directly contained in `info` as a new object implementing `GUPnPServiceInfo`, or `NULL` if no such device was found.

Note that services are not cached internally, so that every time you call this function a new object is created. The application must cache any used services if it wishes to keep them around and re-use them.

#### Parameters

`type`

  Type: `const char*`

  The type of the service to be retrieved.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `GUPnPServiceInfo`

A `GUPnPServiceInfo`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.