camel-named-flags

camel-named-flags

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── CamelNamedFlags

Description

Functions

camel_named_flags_new ()

CamelNamedFlags *
camel_named_flags_new (void);

Creates a new CamelNamedFlags.

Returns

A newly allocated CamelNamedFlags. Free it with camel_named_flags_free() when done with it.

[transfer full]

Since: 3.24


camel_named_flags_new_sized ()

CamelNamedFlags *
camel_named_flags_new_sized (guint reserve_size);

Created a new CamelNamedFlags, which has reserved reserve_size elements. This value doesn't influence the camel_named_flags_get_length(), which returns zero on the array returned from this function.

Parameters

reserve_size

an array size to reserve

 

Returns

A newly allocated CamelNameValueArray. Free it with camel_named_flags_free() when done with it.

See: camel_name_value_array_new, camel_name_value_array_copy.

[transfer full]

Since: 3.24


camel_named_flags_copy ()

CamelNamedFlags *
camel_named_flags_copy (const CamelNamedFlags *named_flags);

Creates a copy of the named_flags and returns it.

Parameters

named_flags

a CamelNamedFlags.

[nullable]

Returns

A newly allocated CamelNamedFlags. Free it with camel_named_flags_free() when done with it.

[transfer full]

Since: 3.24


camel_named_flags_free ()

void
camel_named_flags_free (CamelNamedFlags *named_flags);

Frees memory associated iwth the named_flags . Does nothing, if named_flags is NULL.

Parameters

named_flags

a CamelNamedFlags, or NULL.

[nullable]

Since: 3.24


camel_named_flags_insert ()

gboolean
camel_named_flags_insert (CamelNamedFlags *named_flags,
                          const gchar *name);

Inserts a flag named name into the named_flags , if it is not included already (comparing case sensitively), or does nothing otherwise.

Parameters

named_flags

a CamelNamedFlags

 

name

name of the flag

 

Returns

TRUE the flag named name was inserted; FALSE otherwise.

Since: 3.24


camel_named_flags_remove ()

gboolean
camel_named_flags_remove (CamelNamedFlags *named_flags,
                          const gchar *name);

Removes a flag named name from the named_flags .

Parameters

named_flags

a CamelNamedFlags

 

name

name of the flag

 

Returns

TRUE when the named_flags contained a flag named name , comparing case sensitively, and it was removed; FALSE otherwise.

Since: 3.24


camel_named_flags_contains ()

gboolean
camel_named_flags_contains (const CamelNamedFlags *named_flags,
                            const gchar *name);

Parameters

named_flags

a CamelNamedFlags

 

name

name of the flag

 

Returns

Whether the named_flags contains a flag named name , comparing case sensitively.

Since: 3.24


camel_named_flags_clear ()

void
camel_named_flags_clear (CamelNamedFlags *named_flags);

Removes all the elements of the array.

Parameters

named_flags

a CamelNamedFlags

 

Since: 3.24


camel_named_flags_get_length ()

guint
camel_named_flags_get_length (const CamelNamedFlags *named_flags);

Parameters

named_flags

a CamelNamedFlags.

[nullable]

Returns

Length of the array, aka how many named flags are stored there.

Since: 3.24


camel_named_flags_get ()

const gchar *
camel_named_flags_get (const CamelNamedFlags *named_flags,
                       guint index);

Parameters

named_flags

a CamelNamedFlags

 

index

an index of an element

 

Returns

Name of the flag in at the given index , or NULL on error.

[transfer none][nullable]

Since: 3.24


camel_named_flags_equal ()

gboolean
camel_named_flags_equal (const CamelNamedFlags *named_flags_a,
                         const CamelNamedFlags *named_flags_b);

Compares content of the two CamelNamedFlags and returns whether they equal. Note this is an expensive operation for large sets.

Parameters

named_flags_a

the first CamelNamedFlags.

[nullable]

named_flags_b

the second CamelNamedFlags.

[nullable]

Returns

Whether the two CamelNamedFlags have the same content.

Since: 3.24

Types and Values

CamelNamedFlags

typedef struct _CamelNamedFlags CamelNamedFlags;

Since: 3.24