SnapdAssertion: snapd-glib Reference Manual

## SnapdAssertion SnapdAssertion — Assertions |

## Functions

SnapdAssertion * | snapd_assertion_new ()
gchar * | snapd_assertion_get_header ()
GStrv | snapd_assertion_get_headers ()
gchar * | snapd_assertion_get_body ()
gchar * | snapd_assertion_get_signature ()

## Properties

char * | content | Read / Write / Construct Only

## Types and Values

| SnapdAssertion

## Object Hierarchy

        GObject
        ╰── SnapdAssertion

## Includes

    #include <snapd-glib/snapd-glib.h>

## Description

A SnapdAssertion represents an digitally signed documents that express a fact or policy by a particular authority about a particular object in the snap universe. Assertions can be queried using `snapd_client_get_assertions_sync()`. New assertions can be provided using `snapd_client_add_assertions_sync()`.

## Functions

### snapd_assertion_new ()

    SnapdAssertion *
    snapd_assertion_new (const gchar *content);

Create a new assertion.

#### Parameters

content | the text content of the assertion. |

#### Returns

a new SnapdAssertion

Since: 1.0

### snapd_assertion_get_header ()

    gchar *
    snapd_assertion_get_header (SnapdAssertion *assertion,
                                const gchar *name);

Get a header from an assertion.

#### Parameters

assertion | a SnapdAssertion. |
name | name of the header. |

#### Returns

header value or `NULL` if undefined.

[transfer full][allow-none]

Since: 1.0

### snapd_assertion_get_headers ()

    GStrv
    snapd_assertion_get_headers (SnapdAssertion *assertion);

Get the headers provided by this assertion.

#### Parameters

assertion | a SnapdAssertion. |

#### Returns

array of header names.

[transfer full][array zero-terminated=1]

Since: 1.0

### snapd_assertion_get_body ()

    gchar *
    snapd_assertion_get_body (SnapdAssertion *assertion);

Get the body of the assertion.

#### Parameters

assertion | a SnapdAssertion. |

#### Returns

assertion body or `NULL`.

[transfer full][allow-none]

Since: 1.0

### snapd_assertion_get_signature ()

    gchar *
    snapd_assertion_get_signature (SnapdAssertion *assertion);

Get the signature of the assertion.

#### Parameters

assertion | a SnapdAssertion. |

#### Returns

assertion signature.

Since: 1.0

## Types and Values

### SnapdAssertion

    typedef struct _SnapdAssertion SnapdAssertion;

SnapdAssertion contains information about a Snap assertion.

Assertions are digitally signed documents that allow Snaps to have secure trust and control features.

Since: 1.0

## Property Details

### The `“content”` property

      “content”                  char *

Assertion content.

Owner: SnapdAssertion

Flags: Read / Write / Construct Only

Default value: NULL