Top | ![]() |
![]() |
![]() |
![]() |
MateConfSchemaMateConfSchema — A MateConfSchema describes a MateConfEntry |
MateConfSchema * | mateconf_schema_new () |
void | mateconf_schema_free () |
MateConfSchema * | mateconf_schema_copy () |
MateConfValueType | mateconf_schema_get_type () |
const char * | mateconf_schema_get_locale () |
const char * | mateconf_schema_get_short_desc () |
const char * | mateconf_schema_get_long_desc () |
const char * | mateconf_schema_get_owner () |
MateConfValue * | mateconf_schema_get_default_value () |
MateConfValueType | mateconf_schema_get_car_type () |
MateConfValueType | mateconf_schema_get_cdr_type () |
MateConfValueType | mateconf_schema_get_list_type () |
void | mateconf_schema_set_type () |
void | mateconf_schema_set_locale () |
void | mateconf_schema_set_short_desc () |
void | mateconf_schema_set_long_desc () |
void | mateconf_schema_set_owner () |
void | mateconf_schema_set_default_value () |
void | mateconf_schema_set_default_value_nocopy () |
void | mateconf_schema_set_car_type () |
void | mateconf_schema_set_cdr_type () |
void | mateconf_schema_set_list_type () |
A "schema" describes a key-value pair in a MateConf database. It may include information such as default value and value type, as well as documentation describing the pair, the name of the application that created the pair, etc.
A MateConfSchema duplicates some of the information about the value it describes, such as type information. In these cases, the type information provided describes what the type of the value should be, not what the type actually is.
void
mateconf_schema_free (MateConfSchema *sc
);
Deallocates a MateConfSchema. Also frees any allocated memory inside the MateConfSchema.
MateConfSchema *
mateconf_schema_copy (const MateConfSchema *sc
);
Copies a MateConfSchema. The copy is a deep copy, that is, any allocated memory inside the MateConfSchema will also be copied.
MateConfValueType
mateconf_schema_get_type (const MateConfSchema *schema
);
Returns the type of the entry described by a MateConfSchema
const char *
mateconf_schema_get_locale (const MateConfSchema *schema
);
Returns the locale for a MateConfSchema. The returned string is not a copy, so don't try to free it. It is "owned" by the MateConfSchema and will be destroyed when the MateConfSchema is destroyed.
const char *
mateconf_schema_get_short_desc (const MateConfSchema *schema
);
Returns the short description for a MateConfSchema. The returned string is not a copy, don't try to free it. It is "owned" by the MateConfSchema and will be destroyed when the MateConfSchema is destroyed.
const char *
mateconf_schema_get_long_desc (const MateConfSchema *schema
);
Returns the long description for a MateConfSchema. The returned string is not a copy, don't try to free it. It is "owned" by the MateConfSchema and will be destroyed when the MateConfSchema is destroyed.
const char *
mateconf_schema_get_owner (const MateConfSchema *schema
);
Returns the owner of a MateConfSchema. The returned string is not a copy, don't try to free it. It is "owned" by the MateConfSchema and will be destroyed when the MateConfSchema is destroyed.
MateConfValue *
mateconf_schema_get_default_value (const MateConfSchema *schema
);
Returns the default value of the entry that is described by a MateConfSchema.
MateConfValueType
mateconf_schema_get_car_type (const MateConfSchema *schema
);
Returns the default type of the first member of the pair in the entry
(which should be of type MATECONF_VALUE_PAIR
) described by schema
.
MateConfValueType
mateconf_schema_get_cdr_type (const MateConfSchema *schema
);
Returns the default type of the second member of the pair in the entry
(which should be of type MATECONF_VALUE_PAIR
) described by schema
.
MateConfValueType
mateconf_schema_get_list_type (const MateConfSchema *schema
);
Returns the default type of the list elements of the entry (which should be
of default type MATECONF_VALUE_LIST
) described by schema
.
+schema
: a MateConfSchema.
+Returns
: the type of the list elements of the entry.
void mateconf_schema_set_type (MateConfSchema *sc
,MateConfValueType type
);
Sets the MateConfValueType of the MateConfSchema to type
.
void mateconf_schema_set_locale (MateConfSchema *sc
,const gchar *locale
);
Sets the locale for a MateConfSchema to locale
. locale
is copied.
void mateconf_schema_set_short_desc (MateConfSchema *sc
,const gchar *desc
);
Sets the short description of a MateConfSchema to desc
. desc
is copied.
void mateconf_schema_set_long_desc (MateConfSchema *sc
,const gchar *desc
);
Sets the long description of a MateConfSchema to desc
. desc
is copied.
void mateconf_schema_set_owner (MateConfSchema *sc
,const gchar *owner
);
Sets the "owner" of the MateConfSchema, where the owner is the name of the application that created the entry.
void mateconf_schema_set_default_value (MateConfSchema *sc
,const MateConfValue *val
);
Sets the default value for the entry described by the MateConfSchema.
The MateConfValue is copied. Alternatively, use
mateconf_schema_set_default_value_nocopy()
.
void mateconf_schema_set_default_value_nocopy (MateConfSchema *sc
,MateConfValue *val
);
Sets the default value for the entry described by the MateConfSchema.
The MateConfValue is not copied; the MateConfSchema takes ownership of it.
Alternatively, use mateconf_schema_set_default_value()
.
void mateconf_schema_set_car_type (MateConfSchema *sc
,MateConfValueType type
);
Sets the MateConfValueType of the first member (car) of the entry (which
should be of type MATECONF_VALUE_PAIR
) described by MateConfSchema to type
.
void mateconf_schema_set_cdr_type (MateConfSchema *sc
,MateConfValueType type
);
Sets the MateConfValueType of the second member (cdr) of the entry (which
should be of type MATECONF_VALUE_PAIR
) described by MateConfSchema to type
.
void mateconf_schema_set_list_type (MateConfSchema *sc
,MateConfValueType type
);
Sets the MateConfValueType of the list elements of the entry (which
should be of type MATECONF_VALUE_LIST
) described by MateConfSchema to type
.