## QmiMessageContext

QmiMessageContext — the QMI message context

## Functions

QmiMessageContext * | qmi_message_context_new ()
QmiMessageContext * | qmi_message_context_ref ()
void | qmi_message_context_unref ()
void | qmi_message_context_set_vendor_id ()
guint16 | qmi_message_context_get_vendor_id ()

## Types and Values

#define | QMI_MESSAGE_VENDOR_GENERIC
| QmiMessageContext

## Object Hierarchy

        GBoxed
        ╰── QmiMessageContext

## Description

The QmiMessageContext defines non-standard features of the QMI message associated with it, which may be required for a correct processing.

When a context is given when sending a request with `qmi_device_command_full()`, the same context will then be applied for the associated response.

## Functions

### qmi_message_context_new ()

    QmiMessageContext *
    qmi_message_context_new (void);

Create a new empty QmiMessageContext.

#### Returns

a newly created QmiMessageContext. The returned value should be freed with `qmi_message_context_unref()`.

[transfer full]

Since: 1.18

### qmi_message_context_ref ()

    QmiMessageContext *
    qmi_message_context_ref (QmiMessageContext *self);

Atomically increments the reference count of `self` by one.

#### Parameters

self | a QmiMessageContext. |

#### Returns

(transfer full) the new reference to `self` .

Since: 1.18

### qmi_message_context_unref ()

    void
    qmi_message_context_unref (QmiMessageContext *self);

Atomically decrements the reference count of `self` by one. If the reference count drops to 0, `self` is completely disposed.

#### Parameters

self | a QmiMessageContext. |

Since: 1.18

### qmi_message_context_set_vendor_id ()

    void
    qmi_message_context_set_vendor_id (QmiMessageContext *self,
                                       guint16 vendor_id);

Sets the vendor ID associated to the message.

#### Parameters

self | a QmiMessageContext. |
vendor_id | the vendor ID. |

Since: 1.18

### qmi_message_context_get_vendor_id ()

    guint16
    qmi_message_context_get_vendor_id (QmiMessageContext *self);

Gets the vendor ID associated to the message.

#### Parameters

self | a QmiMessageContext. |

#### Returns

the vendor ID.

Since: 1.18

## Types and Values

### QMI_MESSAGE_VENDOR_GENERIC

    #define             QMI_MESSAGE_VENDOR_GENERIC

Generic vendor id (0x0000).

Since: 1.18

### QmiMessageContext

    typedef struct _QmiMessageContext QmiMessageContext;

An opaque type representing a QMI message context.

Since: 1.18