Class method

GomEntityClassproperty_set_byte_transform

Declaration

void
gom_entity_class_property_set_byte_transform (
  GomEntityClass* klass,
  const char* property_name,
  GomToBytesFunc to_bytes_func,
  GomFromBytesFunc from_bytes_func,
  gpointer user_data,
  GDestroyNotify notify
)

Description

Sets a transform to be used to convert a field to and from a byte buffer suitable for storage.

Parameters

property_name

Type: const char*

The name of the property.

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

Type: GomToBytesFunc

The transform from value to bytes.

from_bytes_func

Type: GomFromBytesFunc

The transform from bytes to value.

user_data

Type: gpointer

Closure data for to_bytes_func and from_bytes_func.

The argument can be NULL.
The data is owned by the caller of the method.
notify

Type: GDestroyNotify

Closure notify for user_data.

The argument can be NULL.