| Top |
GMimeTnefPropertyReaderGMimeTnefPropertyReader — Read MAPI properties and their values within a TNEF attribute |
Obtain this reader from a GMimeTnefReader. Reading a property positions its first value; advance values explicitly only for subsequent values. Recipient tables require advancing rows first. Fixed-width scalar values may be reread. Variable-length values are claimed once, whether decoded, materialized, streamed or opened as embedded TNEF. Advancing the enclosing property or attribute invalidates its child streams and embedded readers.
Property snapshots use GValue, UTF-8 strings, GBytes and GDateTime. Currency uses exact signed 64-bit units of 1/10000. FILETIME's 100 ns precision is reduced to microseconds. C strings end at their first NUL; read raw bytes when embedded NULs must be preserved.
int
g_mime_tnef_property_reader_get_row_count
(GMimeTnefPropertyReader *reader);
Gets the recipient table's row count.
int
g_mime_tnef_property_reader_get_property_count
(GMimeTnefPropertyReader *reader);
Gets the property count of the list or current recipient row.
GMimeTnefPropertyTag
g_mime_tnef_property_reader_get_tag (GMimeTnefPropertyReader *reader);
Gets the current property's tag.
GMimeTnefPropertyType
g_mime_tnef_property_reader_get_property_type
(GMimeTnefPropertyReader *reader);
Gets the property's value type without its multi-valued flag.
gboolean
g_mime_tnef_property_reader_is_multi_valued
(GMimeTnefPropertyReader *reader);
Checks the current property's multi-valued flag.
GMimeTnefNameId *
g_mime_tnef_property_reader_get_name (GMimeTnefPropertyReader *reader);
Gets the current property's name, or NULL for an ordinary property.
int
g_mime_tnef_property_reader_get_value_count
(GMimeTnefPropertyReader *reader);
Gets the current property's declared and bounded value count.
gboolean
g_mime_tnef_property_reader_is_value_consumed
(GMimeTnefPropertyReader *reader);
Checks whether the variable-length value has been claimed.
gboolean
g_mime_tnef_property_reader_is_embedded_message
(GMimeTnefPropertyReader *properties);
Checks the object IID, falling back to AttachMethod for binary values and objects without a usable IID.
gboolean g_mime_tnef_property_reader_read_next_row (GMimeTnefPropertyReader *properties,GError **error);
Advances to the next recipient row, skipping unread properties.
gboolean g_mime_tnef_property_reader_read_next_property (GMimeTnefPropertyReader *properties,GError **error);
Advances to the next property, skipping unread values and positioning the first value automatically. Recipient tables require a current row.
gboolean g_mime_tnef_property_reader_read_next_value (GMimeTnefPropertyReader *properties,GError **error);
Skips the current value and positions the next one. A successful property advance already positions the first value, so call this after processing it.
gboolean g_mime_tnef_property_reader_read_value_as_boolean (GMimeTnefPropertyReader *properties,gboolean *value,GError **error);
Reads any integer-based value as a boolean.
properties |
a property reader |
|
value |
the converted value. |
[out] |
error |
return location for an error |
gboolean g_mime_tnef_property_reader_read_value_as_int16 (GMimeTnefPropertyReader *properties,gint16 *value,GError **error);
Reads a numeric value as an integer, truncating fractions and narrowing integer values. Non-finite or out-of-range floating-point values fail.
properties |
a property reader |
|
value |
the converted value. |
[out] |
error |
return location for an error |
gboolean g_mime_tnef_property_reader_read_value_as_int32 (GMimeTnefPropertyReader *properties,gint32 *value,GError **error);
Reads a numeric value as an integer, truncating fractions and narrowing integer values. Non-finite or out-of-range floating-point values fail.
properties |
a property reader |
|
value |
the converted value. |
[out] |
error |
return location for an error |
gboolean g_mime_tnef_property_reader_read_value_as_int64 (GMimeTnefPropertyReader *properties,gint64 *value,GError **error);
Reads a numeric value as an integer, truncating fractions and narrowing integer values. Non-finite or out-of-range floating-point values fail.
properties |
a property reader |
|
value |
the converted value. |
[out] |
error |
return location for an error |
gboolean g_mime_tnef_property_reader_read_value_as_float (GMimeTnefPropertyReader *properties,float *value,GError **error);
Reads any numeric value as a float, scaling currency by 1/10000.
properties |
a property reader |
|
value |
the numeric value. |
[out] |
error |
return location for an error |
gboolean g_mime_tnef_property_reader_read_value_as_double (GMimeTnefPropertyReader *properties,double *value,GError **error);
Reads any numeric value as a double. Currency is scaled by 1/10000. The fixed-width value may be reread.
properties |
a property reader |
|
value |
the numeric value. |
[out] |
error |
return location for an error |
GDateTime * g_mime_tnef_property_reader_read_value_as_date_time (GMimeTnefPropertyReader *properties,GError **error);
Reads a SysTime (FILETIME) or AppTime (OLE Automation date) value. Dates are represented in UTC. Invalid dates are reported and returned as 0001-01-01. GLib preserves microseconds rather than FILETIME's 100 ns.
char * g_mime_tnef_property_reader_read_value_as_guid (GMimeTnefPropertyReader *properties,GError **error);
Reads a ClassId value as a canonical GUID string.
char * g_mime_tnef_property_reader_read_value_as_string (GMimeTnefPropertyReader *properties,GError **error);
Claims and decodes a String8, Unicode or Binary value as UTF-8. Unicode uses UTF-16LE; other types use the current codepage. Trailing nul terminators are removed.
GBytes * g_mime_tnef_property_reader_read_value_as_bytes (GMimeTnefPropertyReader *properties,GError **error);
Reads a string, binary, object or GUID as raw bytes. Variable-length values are claimed once and subject to materialization limits. Exceeding a limit reports a diagnostic and returns empty bytes.
gboolean g_mime_tnef_property_reader_read_value (GMimeTnefPropertyReader *properties,GValue *value,GError **error);
Reads a value using its native GLib representation: integer, boolean, float, double, string, GDateTime or GBytes. GUIDs are strings; Null is a null pointer. Currency is a signed 64-bit integer in units of 1/10000, preserving its exact precision without requiring a decimal type.
properties |
a property reader |
|
value |
an initially unset value. |
[out caller-allocates] |
error |
return location for an error |
GMimeStream * g_mime_tnef_property_reader_open_value_stream (GMimeTnefPropertyReader *properties,GError **error);
Claims a variable-length value and opens a bounded, forward-only read stream. It is invalidated by advancing either reader. Closing it does not close the input. Materialization limits do not apply.
GMimeTnefReader * g_mime_tnef_property_reader_open_embedded_message (GMimeTnefPropertyReader *properties,GError **error);
Claims an embedded message and creates its reader. Options, codepage, materialization and diagnostic budgets are inherited. Offsets remain relative to the outermost stream. Exceeding the nesting limit reports a diagnostic and returns an empty reader.
GMimeTnefProperty * g_mime_tnef_property_reader_read_property (GMimeTnefPropertyReader *properties,GError **error);
Materializes the current property's values into an immutable snapshot. Call before consuming variable-length values or advancing past the first value. If any value exceeds a materialization limit, the snapshot contains no values. Multi-value arrays grow only as actual values are read.
GMimeTnefPropertySet * g_mime_tnef_property_reader_read_property_set (GMimeTnefPropertyReader *properties,GError **error);
Materializes the remaining properties after the current property, or the whole list if not yet positioned. For tables, reads only the current row. Wire order and duplicate properties are preserved.
GPtrArray * g_mime_tnef_property_reader_read_rows_as_property_sets (GMimeTnefPropertyReader *properties,GError **error);
Materializes the remaining recipient rows, skipping any unread portion of the current row. Non-table attributes return an empty array.
typedef struct _GMimeTnefPropertyReader GMimeTnefPropertyReader;
A forward-only MAPI property reader, invalidated when its attribute reader advances. Reading a property automatically positions its first value. Fixed-width scalar values may be reread; variable-length values are claimed by the first scalar, byte-array, stream or embedded-reader operation.