| Top |
GMimeTnefPropertyWriterGMimeTnefPropertyWriter — Write MAPI properties, recipient rows and embedded messages |
Obtain this writer from a GMimeTnefWriter. After writing the properties,
call g_mime_tnef_property_writer_close() before writing another attribute.
g_mime_tnef_property_writer_open_rtf_compressed_stream() accepts ordinary RTF bytes and writes either LZFu or an uncompressed wrapper. Its explicit close patches the RTF header and CRC before completing the surrounding value. No RTF-to-text/HTML or high-level TNEF-to-MIME conversion is performed.
int
g_mime_tnef_property_writer_get_row_count
(GMimeTnefPropertyWriter *writer);
Gets the number of recipient rows started.
int
g_mime_tnef_property_writer_get_property_count
(GMimeTnefPropertyWriter *writer);
Gets the number of properties in the list or current row.
gboolean g_mime_tnef_property_writer_begin_row (GMimeTnefPropertyWriter *writer,GError **error);
Completes the previous row and starts a new recipient row.
gboolean g_mime_tnef_property_writer_write_property_tag (GMimeTnefPropertyWriter *writer,GMimeTnefPropertyTag tag,GError **error);
Completes the preceding property and starts an ordinary property.
gboolean g_mime_tnef_property_writer_write_named_property (GMimeTnefPropertyWriter *writer,GMimeTnefNameId *name,guint16 type,GError **error);
Starts a named property. The outer attribute writer assigns consistent identifiers in the range 0x8000 through 0xfffe within each TNEF stream.
gboolean g_mime_tnef_property_writer_write_value_boolean (GMimeTnefPropertyWriter *writer,gboolean value,GError **error);
Writes a Boolean value padded to four bytes.
gboolean g_mime_tnef_property_writer_write_value_int16 (GMimeTnefPropertyWriter *writer,gint16 value,GError **error);
Writes an I2 value padded to four bytes.
gboolean g_mime_tnef_property_writer_write_value_int32 (GMimeTnefPropertyWriter *writer,gint32 value,GError **error);
Writes a Long or Error value.
gboolean g_mime_tnef_property_writer_write_value_int64 (GMimeTnefPropertyWriter *writer,gint64 value,GError **error);
Writes an I8 value.
gboolean g_mime_tnef_property_writer_write_value_float (GMimeTnefPropertyWriter *writer,float value,GError **error);
Writes an R4 value, preserving its IEEE-754 representation.
gboolean g_mime_tnef_property_writer_write_value_double (GMimeTnefPropertyWriter *writer,double value,GError **error);
Writes a Double value, preserving its IEEE-754 representation.
gboolean g_mime_tnef_property_writer_write_value_currency (GMimeTnefPropertyWriter *writer,gint64 scaled_value,GError **error);
Writes an exact Currency value in units of 1/10000 of a monetary unit.
gboolean g_mime_tnef_property_writer_write_value_date_time (GMimeTnefPropertyWriter *writer,GDateTime *value,GError **error);
Writes SysTime as UTC FILETIME or AppTime as an OLE Automation date using the supplied wall-clock fields.
gboolean g_mime_tnef_property_writer_write_value_guid (GMimeTnefPropertyWriter *writer,const char *value,GError **error);
Writes a ClassId value using the MAPI GUID byte order.
gboolean g_mime_tnef_property_writer_write_value_string (GMimeTnefPropertyWriter *writer,const char *value,GError **error);
Writes a nul-terminated String8 or Unicode value, with its count, length and padding. String8 uses the writer's codepage; Unicode uses UTF-16LE.
gboolean g_mime_tnef_property_writer_write_value_bytes (GMimeTnefPropertyWriter *writer,const guint8 *buffer,gsize length,GError **error);
Writes a Binary or Object value with its length and padding.
gboolean g_mime_tnef_property_writer_write_value (GMimeTnefPropertyWriter *writer,const GValue *value,GError **error);
Writes a native GLib value. Currency is an exact signed 64-bit integer in units of 1/10000. GUIDs are strings. Null properties have no value and do not require this operation.
gboolean g_mime_tnef_property_writer_write_property (GMimeTnefPropertyWriter *writer,const GMimeTnefProperty *property,GError **error);
Writes a property and its values. Named identities are assigned fresh stream-local identifiers. Strings use the destination's codepage. Incomplete snapshots are rejected before writing a property tag.
GMimeStream * g_mime_tnef_property_writer_open_value_stream (GMimeTnefPropertyWriter *writer,GError **error);
Opens a write-only Binary or Object value stream. Close it explicitly to patch its length and add padding before writing another value.
GMimeStream * g_mime_tnef_property_writer_open_rtf_compressed_stream (GMimeTnefPropertyWriter *writer,gboolean compress,GError **error);
Opens a write-only stream for RTF bytes in an RtfCompressed Binary property. Explicit close writes the compressed-RTF header and CRC, then completes the property value. Flushing does not finalize the compression stream.
GMimeTnefWriter * g_mime_tnef_property_writer_open_embedded_message (GMimeTnefPropertyWriter *writer,int codepage,GError **error);
Opens an embedded TNEF writer for an Object property, prefixing its IMessage IID. The temporary-stream factory is inherited. Close the embedded writer explicitly before continuing the property list.
gboolean g_mime_tnef_property_writer_close (GMimeTnefPropertyWriter *writer,GError **error);
Completes the current property and row, patches counts, and queues the attribute. An incomplete property discards the attribute and latches an error in its parent. Close active value streams before calling this.
typedef struct _GMimeTnefPropertyWriter GMimeTnefPropertyWriter;
A MAPI property-list or recipient-table writer. Start each property with
its tag or name, then write its values. Recipient tables require
g_mime_tnef_property_writer_begin_row(). Explicit close patches counts
and completes the attribute.