MIMEDirAttribute

Name

MIMEDirAttribute -- 

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

struct      MIMEDirAttributeDateTime;
#define     MIMEDIR_ATTRIBUTE_NOTZ
#define     MIMEDIR_ATTRIBUTE_UTC

struct      MIMEDirAttribute;

MIMEDirAttribute* mimedir_attribute_new     (const gchar *name);
MIMEDirAttribute* mimedir_attribute_new_from_channel
                                            (GIOChannel *channel,
                                             GError **error);
gboolean    mimedir_attribute_read_from_channel
                                            (MIMEDirAttribute *attribute,
                                             GIOChannel *channel,
                                             GError **error);
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_raw (MIMEDirAttribute *attribute,
                                             const gchar *value);
const gchar* mimedir_attribute_get_value_raw
                                            (MIMEDirAttribute *attribute);
void        mimedir_attribute_set_value_decoded
                                            (MIMEDirAttribute *attribute,
                                             const GString *value,
                                             MIMEDirAttributeEncoding encoding);
GString*    mimedir_attribute_get_value_decoded
                                            (MIMEDirAttribute *attribute,
                                             GError **error);
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_date_list
                                            (MIMEDirAttribute *attribute,
                                             GSList *list);
GSList*     mimedir_attribute_get_value_date_list
                                            (MIMEDirAttribute *attribute,
                                             GError **error);
#define     mimedir_attribute_free_date_list(list)
void        mimedir_attribute_set_value_time_list
                                            (MIMEDirAttribute *attribute,
                                             GSList *list);
GSList*     mimedir_attribute_get_value_time_list
                                            (MIMEDirAttribute *attribute,
                                             GError **error);
#define     mimedir_attribute_free_time_list(list)
void        mimedir_attribute_set_value_datetime_list
                                            (MIMEDirAttribute *attribute,
                                             GSList *list);
GSList*     mimedir_attribute_get_value_datetime_list
                                            (MIMEDirAttribute *attribute,
                                             GError **error);
#define     mimedir_attribute_free_datetime_list(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_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_SYNTAXThere was a syntax error.
MIMEDIR_ATTRIBUTE_ERROR_ILLEGAL_CHARAn illegal character was found in the input stream.
MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMATThe format of an attribute value does not match the requested value type.
MIMEDIR_ATTRIBUTE_ERROR_UNKNOWN_ENCODINGThe attribute value can not be decoded, since its encoding is unknown.
MIMEDIR_ATTRIBUTE_ERROR_INVALID_VALUEThe attribute value is out of range.
MIMEDIR_ATTRIBUTE_ERROR_PARAMETER_NOT_UNIQUEA parameter that is required to be unique is not.
MIMEDIR_ATTRIBUTE_ERROR_INVALID_BASE64Invalid Base64-encoded string.
MIMEDIR_ATTRIBUTE_ERROR_INVALID_QPInvalid quoted-printable-encoded string.
MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_SHORTThe parameter list is too short.
MIMEDIR_ATTRIBUTE_ERROR_LIST_TOO_LONGThe 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 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
} MIMEDirAttributeType;

The attribute's type.

MIMEDIR_ATTRIBUTE_TYPE_UNKNOWNAttribute type is unknown.
MIMEDIR_ATTRIBUTE_TYPE_URIAttribute represents an URI as defined in [RFC 1738].
MIMEDIR_ATTRIBUTE_TYPE_TEXTAttribute consists of a list of text string.
MIMEDIR_ATTRIBUTE_TYPE_DATEAttribute consists of a list of dates.
MIMEDIR_ATTRIBUTE_TYPE_TIMEAttribute consists of a list of times.
MIMEDIR_ATTRIBUTE_TYPE_DATETIMEAttribute consists of list of dates and times.
MIMEDIR_ATTRIBUTE_TYPE_INTEGERAttribute consists of a list of integer values.
MIMEDIR_ATTRIBUTE_TYPE_FLOATAttribute consists of a list of floating point values.
MIMEDIR_ATTRIBUTE_TYPE_BOOLEANAttribute is a boolean value.
MIMEDIR_ATTRIBUTE_TYPE_STRUCTURED_TEXTAttribute is a structured text value.


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_UNKNOWNThe encoding is unknown.
MIMEDIR_ATTRIBUTE_ENCODING_BASE64The value is Base64-encoded.
MIMEDIR_ATTRIBUTE_ENCODING_QPThe 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.


struct MIMEDirAttributeDateTime

struct MIMEDirAttributeDateTime {
	guint16 year;
	guint8  month;
	guint8  day;
	guint8  hour;
	guint8  minute;
	guint8  second;
	gint16  timezone;
};

Stores date/time information, including the timezone.

guint16 yearyear
guint8 monthmonth (1-12)
guint8 dayday (1-31)
guint8 hourhour (0-23)
guint8 minuteminute (0-59)
guint8 secondsecond (0-59)
gint16 timezonetime zone in minutes from median time


MIMEDIR_ATTRIBUTE_NOTZ

#define MIMEDIR_ATTRIBUTE_NOTZ (30000)

Signifies that the time is not associated with a specific time zone.


MIMEDIR_ATTRIBUTE_UTC

#define MIMEDIR_ATTRIBUTE_UTC  (30001)

Signifies the time zone UTC.


struct MIMEDirAttribute

struct MIMEDirAttribute
{
	GObject parent;

	MIMEDirAttributePriv *priv;
};

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


mimedir_attribute_new ()

MIMEDirAttribute* mimedir_attribute_new     (const gchar *name);

Create a new MIMEDirAttribute object with the supplied attribute name.

name : attribute name
Returns : the new MIMEDirAttribute object


mimedir_attribute_new_from_channel ()

MIMEDirAttribute* mimedir_attribute_new_from_channel
                                            (GIOChannel *channel,
                                             GError **error);

Create a new MIMEDirAttribute object and initializes it with data read from the supplied I/O channel. If an error occures during the read, error is set and NULL is returned.

channel : the I/O channel to read from
error : error storage location or NULL
Returns : the new MIMEDirAttribute object or NULL


mimedir_attribute_read_from_channel ()

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

Clears the attribute object an re-initializes it with data read from the channel. If an error occurs during the read, 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_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_raw ()

void        mimedir_attribute_set_value_raw (MIMEDirAttribute *attribute,
                                             const gchar *value);

Sets the attribute value literally to the given value; no interpretation or manipulation of the value is done. Use this only if you're absolutely sure what you do. You may generate invalid files with this function.

attribute : a MIMEDirAttribute
value : the value to set


mimedir_attribute_get_value_raw ()

const gchar* mimedir_attribute_get_value_raw
                                            (MIMEDirAttribute *attribute);

Retrieves the attribute value literally from the attribute object. This is guaranteed to be an UTF-8 string, though.

attribute : a MIMEDirAttribute
Returns : the attribute value


mimedir_attribute_set_value_decoded ()

void        mimedir_attribute_set_value_decoded
                                            (MIMEDirAttribute *attribute,
                                             const GString *value,
                                             MIMEDirAttributeEncoding encoding);

Sets the attribute's value. This value will be encoded using the supplied encoding when writing it to a file.

attribute : a MIMEDirAttribute
value : the value
encoding : the value's encoding


mimedir_attribute_get_value_decoded ()

GString*    mimedir_attribute_get_value_decoded
                                            (MIMEDirAttribute *attribute,
                                             GError **error);

Returns the attribute's value after decoding it. You should free the returned string using g_string_free().

attribute : a MIMEDirAttribute
error : error storage location or NULL
Returns : the decoded value


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 [RFC 1738].

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 [RFC 1738] 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


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_date_list ()

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

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

attribute : a MIMEDirAttribute
list : a list of MIMEDirAttributeDateTime pointers


mimedir_attribute_get_value_date_list ()

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

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

attribute : a MIMEDirAttribute
error : error storage location or NULL
Returns : a list of MIMEDirAttributeDateTime pointers


mimedir_attribute_free_date_list()

#define		 mimedir_attribute_free_date_list(list)		mimedir_attribute_free_list(list)

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

list : 


mimedir_attribute_set_value_time_list ()

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

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

attribute : a MIMEDirAttribute
list : a list of MIMEDirAttributeDateTime pointers


mimedir_attribute_get_value_time_list ()

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

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

attribute : a MIMEDirAttribute
error : error storage location or NULL
Returns : a list of MIMEDirAttributeDateTime pointers


mimedir_attribute_free_time_list()

#define		 mimedir_attribute_free_time_list(list)		mimedir_attribute_free_list(list)

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

list : 


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 MIMEDirAttributeDateTime 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 MIMEDirAttributeDateTime pointers


mimedir_attribute_free_datetime_list()

#define		 mimedir_attribute_free_datetime_list(list)	mimedir_attribute_free_list(list)

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

list : 


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_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