Interface
FwupdCodec
Description [src]
interface Fwupd.Codec : GObject.Object
A codec that can serialize and deserialize objects to formats such as text, JSON or GVariant
.
Prerequisite
In order to implement Codec, your type must inherit fromGObject
.
Functions
fwupd_codec_array_from_variant
Converts an array of objects, each deserialized from a GVariant
value.
since: 2.0.0
Instance methods
fwupd_codec_add_string
Converts an object that implements FwupdCodec
to a debug string, appending it to str
.
since: 2.0.0
fwupd_codec_from_json
Converts an object that implements FwupdCodec
from a JSON object.
since: 2.0.0
fwupd_codec_from_json_string
Converts an object that implements FwupdCodec
from a JSON string.
since: 2.0.0
fwupd_codec_from_variant
Converts an object that implements FwupdCodec
from a GVariant
value.
since: 2.0.0
fwupd_codec_to_json
Converts an object that implements FwupdCodec
to a JSON builder object.
since: 2.0.0
fwupd_codec_to_json_string
Converts an object that implements FwupdCodec
to a JSON string.
since: 2.0.0
Interface structure
struct FwupdCodecInterface {
GTypeInterface g_iface;
void (* add_string) (
FwupdCodec* self,
guint idt,
GString* str
);
gchar* (* to_string) (
FwupdCodec* self
);
void (* add_json) (
FwupdCodec* self,
JsonBuilder* builder,
FwupdCodecFlags flags
);
gboolean (* from_json) (
FwupdCodec* self,
JsonNode* json_node,
GError** error
);
void (* add_variant) (
FwupdCodec* self,
GVariantBuilder* builder,
FwupdCodecFlags flags
);
GVariant* (* to_variant) (
FwupdCodec* self,
FwupdCodecFlags flags
);
gboolean (* from_variant) (
FwupdCodec* self,
GVariant* value,
GError** error
);
void (* from_variant_iter) (
FwupdCodec* self,
GVariantIter* iter
);
void (* _fwupd_reserved1) (
void
);
void (* _fwupd_reserved2) (
void
);
void (* _fwupd_reserved3) (
void
);
void (* _fwupd_reserved4) (
void
);
void (* _fwupd_reserved5) (
void
);
void (* _fwupd_reserved6) (
void
);
void (* _fwupd_reserved7) (
void
);
}
No description available.
Interface members
g_iface |
|
No description available. |
|
add_string |
|
No description available. |
|
to_string |
|
No description available. |
|
add_json |
|
No description available. |
|
from_json |
|
No description available. |
|
add_variant |
|
No description available. |
|
to_variant |
|
No description available. |
|
from_variant |
|
No description available. |
|
from_variant_iter |
|
No description available. |
|
_fwupd_reserved1 |
|
No description available. |
|
_fwupd_reserved2 |
|
No description available. |
|
_fwupd_reserved3 |
|
No description available. |
|
_fwupd_reserved4 |
|
No description available. |
|
_fwupd_reserved5 |
|
No description available. |
|
_fwupd_reserved6 |
|
No description available. |
|
_fwupd_reserved7 |
|
No description available. |
Virtual methods
Fwupd.Codec.add_string
Converts an object that implements FwupdCodec
to a debug string, appending it to str
.
since: 2.0.0
Fwupd.Codec.from_json
Converts an object that implements FwupdCodec
from a JSON object.
since: 2.0.0
Fwupd.Codec.from_variant
Converts an object that implements FwupdCodec
from a GVariant
value.
since: 2.0.0