### Method

# FwupdPlugin DeviceEvent set_data

#### Declaration [src]

    void
    fu_device_event_set_data (
      FuDeviceEvent* self,
      const gchar* key,
      const guint8* buf,
      gsize bufsz
    )

#### Description [src]

Sets a memory buffer on the event. Note: memory buffers are stored internally as BASE-64 strings.

Available since: | 2.0.0

#### Parameters

`key` | `const gchar*`
| A unique key, e.g. `Name`
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`buf` | `const guint8*`
| A buffer.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`bufsz` | `gsize`
| Size of `buf`.