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_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.
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_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.
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 ()
Create a new MIMEDirAttribute object with the supplied attribute name.
mimedir_attribute_new_from_channel ()
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.
mimedir_attribute_read_from_channel ()
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.
mimedir_attribute_write_to_channel ()
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.
mimedir_attribute_get_name ()
Returns the name of the attribute.
mimedir_attribute_set_group ()
Sets the name of the attribute to group. If group is NULL the
attribute will not belong to any group.
mimedir_attribute_get_group ()
Returns the group of the attribute. A NULL value means that the attribute
does not belong to a group.
mimedir_attribute_set_attribute_type ()
Sets the attribute's type.
mimedir_attribute_get_attribute_type ()
Gets the attribute's type.
mimedir_attribute_append_parameter ()
Appends a parameter to an attribute. If a parameter with the same
name does already exist, the values are appended to it.
mimedir_attribute_append_parameter_simple ()
Appends a parameter to an attribute. If a parameter with the same
name does already exist, the value is appended to it.
mimedir_attribute_has_parameter ()
Returns TRUE if the attribute possesses the given parameter. Otherwise
FALSE is returned.
mimedir_attribute_get_parameter_values ()
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().
mimedir_attribute_get_parameter_value ()
Returns the value for the given parameter. If the attribute does not
possess the parameter, NULL is returned.
mimedir_attribute_set_value_raw ()
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.
mimedir_attribute_get_value_raw ()
Retrieves the attribute value literally from the attribute object.
This is guaranteed to be an UTF-8 string, though.
mimedir_attribute_set_value_decoded ()
Sets the attribute's value. This value will be encoded using the
supplied encoding when writing it to a file.
mimedir_attribute_get_value_decoded ()
Returns the attribute's value after decoding it. You should free the
returned string using g_string_free().
mimedir_attribute_set_value_uri ()
Sets the attribute's value to the supplied URI argument. uri must be a valid URI as
described in [RFC 1738].
mimedir_attribute_get_value_uri ()
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.
mimedir_attribute_set_value_text ()
Sets the value of the attribute to a single text value.
mimedir_attribute_get_value_text ()
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.
mimedir_attribute_set_value_text_list ()
Sets the attribute to a list of comma-separated text values.
mimedir_attribute_get_value_text_list ()
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.
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().
mimedir_attribute_set_value_date_list ()
Sets the attribute's value to a comma-separated list of dates.
mimedir_attribute_get_value_date_list ()
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.
mimedir_attribute_set_value_time_list ()
Sets the attribute's value to a comma-separated list of times.
mimedir_attribute_get_value_time_list ()
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.
mimedir_attribute_set_value_datetime_list ()
Sets the attribute's value to a comma-separated list of times and dates.
mimedir_attribute_get_value_datetime_list ()
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.
mimedir_attribute_set_value_bool ()
Sets the attribute's value to a boolean value.
mimedir_attribute_get_value_bool ()
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.
mimedir_attribute_set_value_int_list ()
Sets the attribute's value to a comma-separated list of integer values.
mimedir_attribute_get_value_int_list ()
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.
mimedir_attribute_set_value_float_list ()
Sets the attribute's value to a comma-separated list of floating point
values.
mimedir_attribute_get_value_float_list ()
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.
mimedir_attribute_set_value_structured_text ()
Sets the attribute's value to a structured text list, i.e. a
semicolon-separated list of comma-separated text strings.
mimedir_attribute_get_value_structured_text ()
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.