MsOleSummary

Name

MsOleSummary — Handle the summary streams.

Synopsis


#include <libole2/libole2.h>


typedef     MsOleSummary;
MsOleSummary* ms_ole_summary_open           (MsOle *f);
MsOleSummary* ms_ole_docsummary_open        (MsOle *f);
MsOleSummary* ms_ole_summary_open_stream    (MsOleStream *stream,
                                             const MsOlePropertySetID psid);
MsOleSummary* ms_ole_summary_create         (MsOle *f);
MsOleSummary* ms_ole_docsummary_create      (MsOle *f);
MsOleSummary* ms_ole_summary_create_stream  (MsOleStream *s,
                                             const MsOlePropertySetID psid);
void        ms_ole_summary_close            (MsOleSummary *si);
GArray*     ms_ole_summary_get_properties   (MsOleSummary *si);
gchar*      ms_ole_summary_get_string       (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);
gboolean    ms_ole_summary_get_boolean      (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);
guint16     ms_ole_summary_get_short        (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);
guint32     ms_ole_summary_get_long         (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);
GTimeVal    ms_ole_summary_get_time         (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);
MsOleSummaryPreview ms_ole_summary_get_preview
                                            (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);
void        ms_ole_summary_preview_destroy  (MsOleSummaryPreview d);
void        ms_ole_summary_set_string       (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             const gchar *str);
void        ms_ole_summary_set_boolean      (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean bool);
void        ms_ole_summary_set_short        (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             guint16 i);
void        ms_ole_summary_set_long         (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             guint32 i);
void        ms_ole_summary_set_time         (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             GTimeVal time);
void        ms_ole_summary_set_preview      (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             constMsOleSummaryPreview *preview);
typedef     MsOleSummarySection;
enum        MsOlePropertySetID;
enum        MsOleSummaryType;
#define     MS_OLE_SUMMARY_TYPE             (x)
enum        MsOleSummaryPID;
#define     MsOleSummaryAllSecurityFlagsEqNone
#define     MsOleSummarySecurityPassworded
#define     MsOleSummarySecurityRORecommended
#define     MsOleSummarySecurityRO
#define     MsOleSummarySecurityLockedForAnnotations
typedef     MsOleSummaryTime;
typedef     MsOleSummaryPreview;

Description

Details

MsOleSummary

typedef struct {
	guint8			class_id[16];
	GArray *		sections;
	GArray *		items;
	GList *			write_items;
	gboolean		read_mode;
	MsOleStream *		s;
	MsOlePropertySetID	ps_id;
} MsOleSummary;


ms_ole_summary_open ()

MsOleSummary* ms_ole_summary_open           (MsOle *f);

Opens the SummaryInformation stream, returns NULL on failure.

f : filesystem object.
Returns : NULL if unable to open summary stream or a pointer to the SummaryInformation Stream.


ms_ole_docsummary_open ()

MsOleSummary* ms_ole_docsummary_open        (MsOle *f);

Opens the DocumentSummaryInformation stream, returns NULL on failure.

f : filesystem object.
Returns : NULL if unable to open summary stream or a pointer to the DocumentSummaryInformation Stream.


ms_ole_summary_open_stream ()

MsOleSummary* ms_ole_summary_open_stream    (MsOleStream *stream,
                                             const MsOlePropertySetID psid);

Opens s as a summary stream, returns NULL on failure.

stream : stream object
psid : Property Set ID, indicates which property set to open
Returns : NULL if unable to open summary stream or a pointer to the Summary Stream.


ms_ole_summary_create ()

MsOleSummary* ms_ole_summary_create         (MsOle *f);

Create a SummaryInformation stream, returns NULL on failure.

f : filesystem object.
Returns : NULL if unable to create the stream, otherwise a pointer to a new SummaryInformation stream.


ms_ole_docsummary_create ()

MsOleSummary* ms_ole_docsummary_create      (MsOle *f);

Create a DocumentSummaryInformation stream, returns NULL on failure.

f : filesystem object.
Returns : NULL if unable to create the stream, otherwise a pointer to a new DocumentSummaryInformation stream.


ms_ole_summary_create_stream ()

MsOleSummary* ms_ole_summary_create_stream  (MsOleStream *s,
                                             const MsOlePropertySetID psid);

Creates s as a summary stream (psid determines which one), returns NULL on failure.

s : stream object
psid : Property Set ID, indicates which property set to open
Returns : NULL if unable to create stream, otherwise a pointer to a new summary stream.


ms_ole_summary_close ()

void        ms_ole_summary_close            (MsOleSummary *si);

FIXME

si : FIXME


ms_ole_summary_get_properties ()

GArray*     ms_ole_summary_get_properties   (MsOleSummary *si);

Returns an array of MsOleSummaryPID.

si : summary stream
Returns : an array of property ids in the current summary stream or NULL if either the summary stream is non-existent or the summary stream contains no properties.


ms_ole_summary_get_string ()

gchar*      ms_ole_summary_get_string       (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);

FIXME Note: Ensure that you free returned value after use.

si : FIXME
id : FIXME
available : FIXME
Returns : FIXME


ms_ole_summary_get_boolean ()

gboolean    ms_ole_summary_get_boolean      (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);

FIXME

si : FIXME
id : FIXME
available : FIXME
Returns : FIXME


ms_ole_summary_get_short ()

guint16     ms_ole_summary_get_short        (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);

FIXME

si : FIXME
id : FIXME
available : FIXME
Returns : FIXME


ms_ole_summary_get_long ()

guint32     ms_ole_summary_get_long         (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);

FIXME

si : FIXME
id : FIXME
available : FIXME
Returns : FIXME


ms_ole_summary_get_time ()

GTimeVal    ms_ole_summary_get_time         (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);

FIXME

si : FIXME
id : FIXME
available : FIXME
Returns : FIXME


ms_ole_summary_get_preview ()

MsOleSummaryPreview ms_ole_summary_get_preview
                                            (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean *available);

FIXME

si : FIXME
id : FIXME
available : FIXME
Returns : FIXME


ms_ole_summary_preview_destroy ()

void        ms_ole_summary_preview_destroy  (MsOleSummaryPreview d);

FIXME

d : FIXME


ms_ole_summary_set_string ()

void        ms_ole_summary_set_string       (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             const gchar *str);

FIXME

si : FIXME
id : FIXME
str : FIXME


ms_ole_summary_set_boolean ()

void        ms_ole_summary_set_boolean      (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             gboolean bool);

FIXME

si : FIXME
id : FIXME
bool : FIXME


ms_ole_summary_set_short ()

void        ms_ole_summary_set_short        (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             guint16 i);

FIXME

si : FIXME
id : FIXME
i : FIXME


ms_ole_summary_set_long ()

void        ms_ole_summary_set_long         (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             guint32 i);

FIXME

si : FIXME
id : FIXME
i : FIXME


ms_ole_summary_set_time ()

void        ms_ole_summary_set_time         (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             GTimeVal time);

FIXME

si : FIXME
id : FIXME
time : FIXME


ms_ole_summary_set_preview ()

void        ms_ole_summary_set_preview      (MsOleSummary *si,
                                             MsOleSummaryPID id,
                                             constMsOleSummaryPreview *preview);

FIXME

si : FIXME
id : FIXME
preview : FIXME


MsOleSummarySection

typedef struct {
	guint32			offset;
	guint32			props;
	guint32			bytes;
	MsOlePropertySetID	ps_id;
} MsOleSummarySection;


enum MsOlePropertySetID

typedef enum {
	MS_OLE_PS_SUMMARY_INFO,
	MS_OLE_PS_DOCUMENT_SUMMARY_INFO,
	MS_OLE_PS_USER_DEFINED_SUMMARY_INFO
} MsOlePropertySetID;


enum MsOleSummaryType

typedef enum {
	MS_OLE_SUMMARY_TYPE_STRING  = 0x10,
	MS_OLE_SUMMARY_TYPE_TIME    = 0x20,
	MS_OLE_SUMMARY_TYPE_LONG    = 0x30,
	MS_OLE_SUMMARY_TYPE_SHORT   = 0x40,
	MS_OLE_SUMMARY_TYPE_BOOLEAN = 0x50,
	MS_OLE_SUMMARY_TYPE_OTHER   = 0x60
} MsOleSummaryType;


MS_OLE_SUMMARY_TYPE()

#define MS_OLE_SUMMARY_TYPE(x) ((MsOleSummaryType)((x)>>8))

x : 


enum MsOleSummaryPID

typedef enum {
/* SummaryInformation Stream Properties */
/* String properties */
	MS_OLE_SUMMARY_TITLE          = 0x1002,
	MS_OLE_SUMMARY_SUBJECT        = 0x1003,
	MS_OLE_SUMMARY_AUTHOR         = 0x1004,
	MS_OLE_SUMMARY_KEYWORDS       = 0x1005,
	MS_OLE_SUMMARY_COMMENTS       = 0x1006,
	MS_OLE_SUMMARY_TEMPLATE       = 0x1007,
	MS_OLE_SUMMARY_LASTAUTHOR     = 0x1008,
	MS_OLE_SUMMARY_REVNUMBER      = 0x1009,
	MS_OLE_SUMMARY_APPNAME        = 0x1012,
	
/* Time properties */
	MS_OLE_SUMMARY_TOTAL_EDITTIME = 0x200A,
	MS_OLE_SUMMARY_LASTPRINTED    = 0x200B,
	MS_OLE_SUMMARY_CREATED        = 0x200C,
	MS_OLE_SUMMARY_LASTSAVED      = 0x200D,
	
/* Long integer properties */
	MS_OLE_SUMMARY_PAGECOUNT      = 0x300E,
	MS_OLE_SUMMARY_WORDCOUNT      = 0x300F,
	MS_OLE_SUMMARY_CHARCOUNT      = 0x3010,
	MS_OLE_SUMMARY_SECURITY       = 0x3013,

/* Short integer properties */
	MS_OLE_SUMMARY_CODEPAGE       = 0x4001,

/* Security */	
	MS_OLE_SUMMARY_THUMBNAIL      = 0x6011,


/* DocumentSummaryInformation Properties */
/* String properties */
	MS_OLE_SUMMARY_CATEGORY	      = 0x1002,
	MS_OLE_SUMMARY_PRESFORMAT     = 0x1003,
	MS_OLE_SUMMARY_MANAGER        = 0x100E,
	MS_OLE_SUMMARY_COMPANY        = 0x100F,

/* Long integer properties */
	MS_OLE_SUMMARY_BYTECOUNT      = 0x3004,
	MS_OLE_SUMMARY_LINECOUNT      = 0x3005,
	MS_OLE_SUMMARY_PARCOUNT       = 0x3006,
	MS_OLE_SUMMARY_SLIDECOUNT     = 0x3007,
	MS_OLE_SUMMARY_NOTECOUNT      = 0x3008,
	MS_OLE_SUMMARY_HIDDENCOUNT    = 0x3009,
	MS_OLE_SUMMARY_MMCLIPCOUNT    = 0X300A,

/* Boolean properties */
	MS_OLE_SUMMARY_SCALE          = 0x500B,
	MS_OLE_SUMMARY_LINKSDIRTY     = 0x5010
} MsOleSummaryPID;


MsOleSummaryAllSecurityFlagsEqNone

#define MsOleSummaryAllSecurityFlagsEqNone        0x00


MsOleSummarySecurityPassworded

#define MsOleSummarySecurityPassworded            0x01


MsOleSummarySecurityRORecommended

#define MsOleSummarySecurityRORecommended         0x02


MsOleSummarySecurityRO

#define MsOleSummarySecurityRO                    0x04


MsOleSummarySecurityLockedForAnnotations

#define MsOleSummarySecurityLockedForAnnotations  0x08


MsOleSummaryTime

typedef struct {
	GTimeVal time;
	GDate    date;
} MsOleSummaryTime;


MsOleSummaryPreview

typedef struct {
	guint32 len;
	guint8 *data;
} MsOleSummaryPreview;