Camel.Session.ref_service

### Method

# Camel Sessionref_service

since: 3.6

#### Declaration [src]

    CamelService*
    camel_session_ref_service (
      CamelSession* session,
      const gchar* uid
    )

#### Description [src]

Looks up a `CamelService` by its unique identifier string. The service must have been previously added using camel_session_add_service().

The returned `CamelService` is referenced for thread-safety and must be unreferenced with `g_object_unref()` when finished with it.

Available since: 3.6

#### Parameters

`uid`

  Type: `const gchar*`

  A unique identifier string.

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

#### Return value

Type: `CamelService`

A `CamelService` instance, or `NULL`.

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