MIMEDirAttribute

Name

MIMEDirAttribute -- MIME Directory Attribute object

Synopsis


#include <mimedir/mimedir-attribute.h>


#define             MIMEDIR_ATTRIBUTE_ERROR
enum                MIMEDirAttributeError;
#define             MIMEDIR_ATTRIBUTE_ERROR_SYNTAX_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_ILLEGAL_CHAR_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_UNKNOWN_ENCODING_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_INVALID_VALUE_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_PARAMETER_NOT_UNIQUE_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_INVALID_BASE64_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_INVALID_QP_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_SHORT_STR
#define             MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_LONG_STR
enum                MIMEDirAttributeType;
enum                MIMEDirAttributeEncoding;
#define             MIMEDIR_ATTRIBUTE_ENCODING_NONE

                    MIMEDirAttribute;

MIMEDirAttribute*   mimedir_attribute_new               (void);
gboolean            mimedir_attribute_write_to_channel  (MIMEDirAttribute *attribute,
                                                         GIOChannel *channel,
                                                         GError **error);
const gchar*        mimedir_attribute_get_name          (MIMEDirAttribute *attribute);
void                mimedir_attribute_set_group         (MIMEDirAttribute *attribute,
                                                         const gchar *group);
const gchar*        mimedir_attribute_get_group         (MIMEDirAttribute *attribute);
void                mimedir_attribute_set_attribute_type
                                                        (MIMEDirAttribute *attribute,
                                                         MIMEDirAttributeType type);
MIMEDirAttributeType mimedir_attribute_get_attribute_type
                                                        (MIMEDirAttribute *attribute);
void                mimedir_attribute_append_parameter  (MIMEDirAttribute *attribute,
                                                         const gchar *name,
                                                         GSList *values);
void                mimedir_attribute_append_parameter_simple
                                                        (MIMEDirAttribute *attribute,
                                                         const gchar *name,
                                                         const gchar *value);
gboolean            mimedir_attribute_has_parameter     (MIMEDirAttribute *attribute,
                                                         const gchar *parameter);
GSList*             mimedir_attribute_get_parameter_values
                                                        (MIMEDirAttribute *attribute,
                                                         const gchar *parameter);
const gchar*        mimedir_attribute_get_parameter_value
                                                        (MIMEDirAttribute *attribute,
                                                         const gchar *parameter);
void                mimedir_attribute_free_parameter_values
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);
void                mimedir_attribute_set_value_uri     (MIMEDirAttribute *attribute,
                                                         const gchar *uri);
gchar*              mimedir_attribute_get_value_uri     (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_set_value_text    (MIMEDirAttribute *attribute,
                                                         const gchar *text);
gchar*              mimedir_attribute_get_value_text    (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_set_value_text_list
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);
GSList*             mimedir_attribute_get_value_text_list
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);
#define             mimedir_attribute_free_text_list    (list)
void                mimedir_attribute_set_value_datetime
                                                        (MIMEDirAttribute *attribute,
                                                         MIMEDirDateTime *datetime);
MIMEDirDateTime*    mimedir_attribute_get_value_datetime
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_set_value_datetime_list
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);
GSList*             mimedir_attribute_get_value_datetime_list
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_free_datetime_list
                                                        (GSList *list);
void                mimedir_attribute_set_value_bool    (MIMEDirAttribute *attribute,
                                                         gboolean b);
gboolean            mimedir_attribute_get_value_bool    (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_set_value_int     (MIMEDirAttribute *attribute,
                                                         gint i);
gint                mimedir_attribute_get_value_int     (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_set_value_int_list
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);
GSList*             mimedir_attribute_get_value_int_list
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_free_int_list     (GSList *list);
void                mimedir_attribute_set_value_float_list
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);
GSList*             mimedir_attribute_get_value_float_list
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_free_float_list   (GSList *list);
void                mimedir_attribute_set_value_structured_text
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);
GSList*             mimedir_attribute_get_value_structured_text
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);
void                mimedir_attribute_free_structured_text_list
                                                        (GSList *list);


Description

Details

MIMEDIR_ATTRIBUTE_ERROR

#define MIMEDIR_ATTRIBUTE_ERROR mimedir_attribute_error_quark ()

Error domain for MIMEDirAttribute operations. Errors in this domain will be from the MIMEDirAttributeError enumeration. See GError for information on error domains.


enum MIMEDirAttributeError

typedef enum {
	MIMEDIR_ATTRIBUTE_ERROR_SYNTAX,
	MIMEDIR_ATTRIBUTE_ERROR_ILLEGAL_CHAR,
	MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT,
	MIMEDIR_ATTRIBUTE_ERROR_UNKNOWN_ENCODING,
	MIMEDIR_ATTRIBUTE_ERROR_INVALID_VALUE,
	MIMEDIR_ATTRIBUTE_ERROR_PARAMETER_NOT_UNIQUE,
	MIMEDIR_ATTRIBUTE_ERROR_INVALID_BASE64,
	MIMEDIR_ATTRIBUTE_ERROR_INVALID_QP,
	MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_SHORT,
	MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_LONG
} MIMEDirAttributeError;

Error codes returned by MIMEDirAttribute operations.

MIMEDIR_ATTRIBUTE_ERROR_SYNTAX

There was a syntax error.

MIMEDIR_ATTRIBUTE_ERROR_ILLEGAL_CHAR

An illegal character was found in the input stream.

MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT

The format of an attribute value does not match the requested value type.

MIMEDIR_ATTRIBUTE_ERROR_UNKNOWN_ENCODING

The attribute value can not be decoded, since its encoding is unknown.

MIMEDIR_ATTRIBUTE_ERROR_INVALID_VALUE

The attribute value is out of range.

MIMEDIR_ATTRIBUTE_ERROR_PARAMETER_NOT_UNIQUE

A parameter that is required to be unique is not.

MIMEDIR_ATTRIBUTE_ERROR_INVALID_BASE64

Invalid Base64-encoded string.

MIMEDIR_ATTRIBUTE_ERROR_INVALID_QP

Invalid quoted-printable-encoded string.

MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_SHORT

The parameter list is too short.

MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_LONG

The parameter list is too long.


MIMEDIR_ATTRIBUTE_ERROR_SYNTAX_STR

#define MIMEDIR_ATTRIBUTE_ERROR_SYNTAX_STR			_("syntax error (%s)")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_SYNTAX error code.


MIMEDIR_ATTRIBUTE_ERROR_ILLEGAL_CHAR_STR

#define MIMEDIR_ATTRIBUTE_ERROR_ILLEGAL_CHAR_STR		_("illegal character 0x%02x for type \"%s\"")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_ILLEGAL_CHAR error code.


MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR

#define MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR		_("invalid format for type \"%s\" in attribute %s")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT error code.


MIMEDIR_ATTRIBUTE_ERROR_UNKNOWN_ENCODING_STR

#define MIMEDIR_ATTRIBUTE_ERROR_UNKNOWN_ENCODING_STR		_("attribute %s could not be decoded, since its encoding is unknown")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_UNKNOWN_ENCODING error code.


MIMEDIR_ATTRIBUTE_ERROR_INVALID_VALUE_STR

#define MIMEDIR_ATTRIBUTE_ERROR_INVALID_VALUE_STR		_("invalid value in attribute %s")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_INVALID_VALUE error code.


MIMEDIR_ATTRIBUTE_ERROR_PARAMETER_NOT_UNIQUE_STR

#define MIMEDIR_ATTRIBUTE_ERROR_PARAMETER_NOT_UNIQUE_STR	_("parameter \"%s\" must not be used more than once in attribute %s")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_PARAMETER_NOT_UNIQUE error code.


MIMEDIR_ATTRIBUTE_ERROR_INVALID_BASE64_STR

#define MIMEDIR_ATTRIBUTE_ERROR_INVALID_BASE64_STR		_("invalid Base64 sequence")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_INVALID_BASE64 error code.


MIMEDIR_ATTRIBUTE_ERROR_INVALID_QP_STR

#define MIMEDIR_ATTRIBUTE_ERROR_INVALID_QP_STR			_("invalid quoted-printable sequence")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_INVALID_QP error code.


MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_SHORT_STR

#define MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_SHORT_STR		_("attribute list of %s is too short")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_SHORT error code.


MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_LONG_STR

#define MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_LONG_STR		_("attribute list of %s is too long")

Default string representation of the MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_LONG error code.


enum MIMEDirAttributeType

typedef enum {
	MIMEDIR_ATTRIBUTE_TYPE_UNKNOWN,
	MIMEDIR_ATTRIBUTE_TYPE_URI,
	MIMEDIR_ATTRIBUTE_TYPE_TEXT,
	MIMEDIR_ATTRIBUTE_TYPE_DATE,
	MIMEDIR_ATTRIBUTE_TYPE_TIME,
	MIMEDIR_ATTRIBUTE_TYPE_DATETIME,
	MIMEDIR_ATTRIBUTE_TYPE_INTEGER,
	MIMEDIR_ATTRIBUTE_TYPE_FLOAT,
	MIMEDIR_ATTRIBUTE_TYPE_BOOLEAN,

	/* VCard */

	MIMEDIR_ATTRIBUTE_TYPE_STRUCTURED_TEXT,
	MIMEDIR_ATTRIBUTE_TYPE_PARAMETERS,
} MIMEDirAttributeType;

The attribute's type.

MIMEDIR_ATTRIBUTE_TYPE_UNKNOWN

Attribute type is unknown.

MIMEDIR_ATTRIBUTE_TYPE_URI

Attribute represents an URI as defined in [RFC 1738].

MIMEDIR_ATTRIBUTE_TYPE_TEXT

Attribute consists of a list of text string.

MIMEDIR_ATTRIBUTE_TYPE_DATE

Attribute consists of a list of dates.

MIMEDIR_ATTRIBUTE_TYPE_TIME

Attribute consists of a list of times.

MIMEDIR_ATTRIBUTE_TYPE_DATETIME

Attribute consists of list of dates and times.

MIMEDIR_ATTRIBUTE_TYPE_INTEGER

Attribute consists of a list of integer values.

MIMEDIR_ATTRIBUTE_TYPE_FLOAT

Attribute consists of a list of floating point values.

MIMEDIR_ATTRIBUTE_TYPE_BOOLEAN

Attribute is a boolean value.

MIMEDIR_ATTRIBUTE_TYPE_STRUCTURED_TEXT

Attribute is a structured text value.

MIMEDIR_ATTRIBUTE_TYPE_PARAMETERS


enum MIMEDirAttributeEncoding

typedef enum {
	MIMEDIR_ATTRIBUTE_ENCODING_UNKNOWN,
	MIMEDIR_ATTRIBUTE_ENCODING_BASE64,
	MIMEDIR_ATTRIBUTE_ENCODING_QP, /* read-only */
} MIMEDirAttributeEncoding;

The encoding of the attribute's value.

MIMEDIR_ATTRIBUTE_ENCODING_UNKNOWN

The encoding is unknown.

MIMEDIR_ATTRIBUTE_ENCODING_BASE64

The value is Base64-encoded.

MIMEDIR_ATTRIBUTE_ENCODING_QP

The value is encoded as a quoted-printable string. This encoding is read-only and must not be set.


MIMEDIR_ATTRIBUTE_ENCODING_NONE

#define MIMEDIR_ATTRIBUTE_ENCODING_NONE MIMEDIR_ATTRIBUTE_ENCODING_UNKNOWN

Alias for MIMEDIR_ATTRIBUTE_ENCODING_UNKNOWN.


MIMEDirAttribute

typedef struct {
	GObject parent;

	MIMEDirAttributePriv *priv;
} MIMEDirAttribute;

The MIMEDirAttribute struct contains private data only, and should be accessed using the functions below.


mimedir_attribute_new ()

MIMEDirAttribute*   mimedir_attribute_new               (void);

Create a new MIMEDirAttribute object.

Returns :

the new MIMEDirAttribute object


mimedir_attribute_write_to_channel ()

gboolean            mimedir_attribute_write_to_channel  (MIMEDirAttribute *attribute,
                                                         GIOChannel *channel,
                                                         GError **error);

Writes the attribute to the supplied channel. If an error occurs during the write, error will be set and FALSE will be returned. Otherwise TRUE is returned.

attribute :

a MIMEDirAttribute

channel :

an I/O channel

error :

error storage location or NULL

Returns :

success indicator


mimedir_attribute_get_name ()

const gchar*        mimedir_attribute_get_name          (MIMEDirAttribute *attribute);

Returns the name of the attribute.

attribute :

a MIMEDirAttribute

Returns :

the attribute name


mimedir_attribute_set_group ()

void                mimedir_attribute_set_group         (MIMEDirAttribute *attribute,
                                                         const gchar *group);

Sets the name of the attribute to group. If group is NULL the attribute will not belong to any group.

attribute :

a MIMEDirAttribute

group :

new group name or NULL


mimedir_attribute_get_group ()

const gchar*        mimedir_attribute_get_group         (MIMEDirAttribute *attribute);

Returns the group of the attribute. A NULL value means that the attribute does not belong to a group.

attribute :

a MIMEDirAttribute

Returns :

the attribute group or NULL


mimedir_attribute_set_attribute_type ()

void                mimedir_attribute_set_attribute_type
                                                        (MIMEDirAttribute *attribute,
                                                         MIMEDirAttributeType type);

Sets the attribute's type.

attribute :

a MIMEDirAttribute

type :

the new type


mimedir_attribute_get_attribute_type ()

MIMEDirAttributeType mimedir_attribute_get_attribute_type
                                                        (MIMEDirAttribute *attribute);

Gets the attribute's type.

attribute :

a MIMEDirAttribute

Returns :

the attribute type


mimedir_attribute_append_parameter ()

void                mimedir_attribute_append_parameter  (MIMEDirAttribute *attribute,
                                                         const gchar *name,
                                                         GSList *values);

Appends a parameter to an attribute. If a parameter with the same name does already exist, the values are appended to it.

attribute :

a MIMEDirAttribute

name :

parameter name

values :

list of parameter values


mimedir_attribute_append_parameter_simple ()

void                mimedir_attribute_append_parameter_simple
                                                        (MIMEDirAttribute *attribute,
                                                         const gchar *name,
                                                         const gchar *value);

Appends a parameter to an attribute. If a parameter with the same name does already exist, the value is appended to it.

attribute :

a MIMEDirAttribute

name :

parameter name

value :

parameter value


mimedir_attribute_has_parameter ()

gboolean            mimedir_attribute_has_parameter     (MIMEDirAttribute *attribute,
                                                         const gchar *parameter);

Returns TRUE if the attribute possesses the given parameter. Otherwise FALSE is returned.

attribute :

a MIMEDirAttribute

parameter :

parameter name

Returns :

possession indicator


mimedir_attribute_get_parameter_values ()

GSList*             mimedir_attribute_get_parameter_values
                                                        (MIMEDirAttribute *attribute,
                                                         const gchar *parameter);

Returns the list of string values for the given parameter. If the attribute does not possess the parameter, NULL is returned. Otherwise the list has at least one element. This list must be freed with mimedir_attribute_free_parameter_values().

attribute :

a MIMEDirAttribute

parameter :

parameter name

Returns :

the value list or NULL


mimedir_attribute_get_parameter_value ()

const gchar*        mimedir_attribute_get_parameter_value
                                                        (MIMEDirAttribute *attribute,
                                                         const gchar *parameter);

Returns the value for the given parameter. If the attribute does not possess the parameter, NULL is returned.

attribute :

a MIMEDirAttribute

parameter :

parameter name

Returns :

the value or NULL


mimedir_attribute_free_parameter_values ()

void                mimedir_attribute_free_parameter_values
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);

Frees an parameter list as obtained through mimedir_attribute_get_parameter_values().

attribute :

a MIMEDirAttribute

list :

the value list


mimedir_attribute_set_value_uri ()

void                mimedir_attribute_set_value_uri     (MIMEDirAttribute *attribute,
                                                         const gchar *uri);

Sets the attribute's value to the supplied URI argument. uri must be a valid URI as described in [URI].

attribute :

a MIMEDirAttribute

uri :

the new URI


mimedir_attribute_get_value_uri ()

gchar*              mimedir_attribute_get_value_uri     (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of attribute as an URI as described in [URI] and returns it. The returned string should be freed with g_free(). If the attribute value can't be interpreted as an URI, error will be set and NULL will be returned.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

the URI or NULL


mimedir_attribute_set_value_text ()

void                mimedir_attribute_set_value_text    (MIMEDirAttribute *attribute,
                                                         const gchar *text);

Sets the value of the attribute to a single text value.

attribute :

a MIMEDirAttribute

text :

the text to set


mimedir_attribute_get_value_text ()

gchar*              mimedir_attribute_get_value_text    (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of an attribute as a single text value and returns it. The returned string should be freed with g_free(). If the attribute value can't be interpreted as text, error will be set and NULL will be returned.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

the text value or NULL


mimedir_attribute_set_value_text_list ()

void                mimedir_attribute_set_value_text_list
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);

Sets the attribute to a list of comma-separated text values.

attribute :

a MIMEDirAttribute

list :

list of string pointers


mimedir_attribute_get_value_text_list ()

GSList*             mimedir_attribute_get_value_text_list
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of an attribute as a comma-separated list of text values and returns the list. The returned list should be freed with mimedir_attribute_free_text_list(). If the attribute value can't be interpreted as text list, error will be set and NULL will be returned.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

the text list or NULL


mimedir_attribute_free_text_list()

#define		 mimedir_attribute_free_text_list(list)		mimedir_attribute_free_list(list)

Frees a list of string pointers as returned by mimedir_attribute_get_value_text_list().

list :


mimedir_attribute_set_value_datetime ()

void                mimedir_attribute_set_value_datetime
                                                        (MIMEDirAttribute *attribute,
                                                         MIMEDirDateTime *datetime);

Sets the attribute's value to the supplied date and time.

attribute :

a MIMEDirAttribute

datetime :

a MIMEDirDateTime


mimedir_attribute_get_value_datetime ()

MIMEDirDateTime*    mimedir_attribute_get_value_datetime
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to interpret the attribute's value as a single date/time value. It honors the VALUE parameter if it is set. A newly allocated MIMEDirDateTime object will be returned. It is set to the date and time read. If an error occurs, error will be set and NULL will be returned. Otherwise the returned object must be freed with g_object_unref().

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

a newly allocated MIMEDirDateTime object


mimedir_attribute_set_value_datetime_list ()

void                mimedir_attribute_set_value_datetime_list
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);

Sets the attribute's value to a comma-separated list of times and dates.

attribute :

an MIMEDirAttribute

list :

a list of MIMEDirDateTime pointers


mimedir_attribute_get_value_datetime_list ()

GSList*             mimedir_attribute_get_value_datetime_list
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of an attribute as a comma-separated list of date and time values and returns the list. The returned list should be freed with mimedir_attribute_free_datetime_list(). If the attribute value can't be interpreted as date/time list, error will be set and NULL will be returned.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

a list of MIMEDirDateTime pointers


mimedir_attribute_free_datetime_list ()

void                mimedir_attribute_free_datetime_list
                                                        (GSList *list);

Frees a list of MIMEDirAttributeDateTime pointers as returned by mimedir_attribute_get_value_datetime_list().

list :

a GSList


mimedir_attribute_set_value_bool ()

void                mimedir_attribute_set_value_bool    (MIMEDirAttribute *attribute,
                                                         gboolean b);

Sets the attribute's value to a boolean value.

attribute :

a MIMEDirAttribute

b :

boolean value


mimedir_attribute_get_value_bool ()

gboolean            mimedir_attribute_get_value_bool    (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of an attribute as a boolean value and returns. it. If the attribute value can't be interpreted as boolean value, error will be set and NULL will be returned.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

a boolean value


mimedir_attribute_set_value_int ()

void                mimedir_attribute_set_value_int     (MIMEDirAttribute *attribute,
                                                         gint i);

Sets the attribute's value to this integer value.

attribute :

an MIMEDirAttribute

i :

a gint value


mimedir_attribute_get_value_int ()

gint                mimedir_attribute_get_value_int     (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of an attribute as a single integer value and returns it. If the attribute value can't be interpreted as an integer value, error will be set.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

a gint value


mimedir_attribute_set_value_int_list ()

void                mimedir_attribute_set_value_int_list
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);

Sets the attribute's value to a comma-separated list of integer values.

attribute :

an MIMEDirAttribute

list :

a list of gint values


mimedir_attribute_get_value_int_list ()

GSList*             mimedir_attribute_get_value_int_list
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of an attribute as a comma-separated list of integer values and returns the list. The returned list should be freed with mimedir_attribute_free_int_list(). If the attribute value can't be interpreted as int list, error will be set and NULL will be returned.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

a list of gint values


mimedir_attribute_free_int_list ()

void                mimedir_attribute_free_int_list     (GSList *list);

Frees a list of integer values as returned by mimedir_attribute_get_value_int_list().

list :

a GSList


mimedir_attribute_set_value_float_list ()

void                mimedir_attribute_set_value_float_list
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);

Sets the attribute's value to a comma-separated list of floating point values.

attribute :

an MIMEDirAttribute

list :

a list of gdouble pointers


mimedir_attribute_get_value_float_list ()

GSList*             mimedir_attribute_get_value_float_list
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of an attribute as a comma-separated list of floating point values and returns the list. The returned list should be freed with mimedir_attribute_free_float_list(). If the attribute value can't be interpreted as a list of floating point values, error will be set and NULL will be returned.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

a list of gdouble pointers


mimedir_attribute_free_float_list ()

void                mimedir_attribute_free_float_list   (GSList *list);

Frees a list of gdouble pointers as returned by mimedir_attribute_get_value_float_list().

list :

a GSList


mimedir_attribute_set_value_structured_text ()

void                mimedir_attribute_set_value_structured_text
                                                        (MIMEDirAttribute *attribute,
                                                         GSList *list);

Sets the attribute's value to a structured text list, i.e. a semicolon-separated list of comma-separated text strings.

attribute :

an MIMEDirAttribute

list :

a list of GSLists, containing string pointers


mimedir_attribute_get_value_structured_text ()

GSList*             mimedir_attribute_get_value_structured_text
                                                        (MIMEDirAttribute *attribute,
                                                         GError **error);

Tries to parse the value of an attribute as a structured text type, i.e. where a comma-separated list of strings is in turn separated by semi-colons. The returned list should be freed with mimedir_attribute_free_structured_text_list(). If the attribute value can't be interpreted as a structured text type, error will be set and NULL will be returned.

attribute :

a MIMEDirAttribute

error :

error storage location or NULL

Returns :

a list of GSLists, containing string pointers


mimedir_attribute_free_structured_text_list ()

void                mimedir_attribute_free_structured_text_list
                                                        (GSList *list);

Frees a list as returned by mimedir_attribute_get_value_structured_text().

list :

a GSList