Common

Name

Common —

Synopsis


#include <libole2/libole2.h>


enum        MsOleErr;
typedef     MsOlePos;
typedef     MsOleSPos;
struct      MsOleStat;
enum        MsOleType;
enum        MsOleSeek;
struct      MsOleSysWrappers;
#define     MS_OLE_GET_GUINT8               (p)
#define     MS_OLE_GET_GUINT16              (p)
#define     MS_OLE_GET_GUINT32              (p)
#define     MS_OLE_GET_GUINT64              (p)
#define     MS_OLE_SET_GUINT8               (p,n)
#define     MS_OLE_SET_GUINT16              (p,n)
#define     MS_OLE_SET_GUINT32              (p,n)

Description

Details

enum MsOleErr

typedef enum {
	MS_OLE_ERR_OK,
	MS_OLE_ERR_EXIST,
	MS_OLE_ERR_INVALID,
	MS_OLE_ERR_FORMAT,
	MS_OLE_ERR_PERM,
	MS_OLE_ERR_MEM,
	MS_OLE_ERR_SPACE,
	MS_OLE_ERR_NOTEMPTY,
	MS_OLE_ERR_BADARG
} MsOleErr;


MsOlePos

typedef guint32 MsOlePos;


MsOleSPos

typedef gint32  MsOleSPos;


struct MsOleStat

struct MsOleStat {
	MsOleType type;
	MsOlePos  size;
};


enum MsOleType

typedef enum  {
	MsOleStorageT = 1,
	MsOleStreamT  = 2,
	MsOleRootT    = 5
} MsOleType;


enum MsOleSeek

typedef enum {
	MsOleSeekSet,
	MsOleSeekCur,
	MsOleSeekEnd
} MsOleSeek;


struct MsOleSysWrappers

struct MsOleSysWrappers {
	int     (*open2)	(const char *pathname, int flags);
	int     (*open3)	(const char *pathname, int flags, mode_t mode);
	ssize_t (*read)		(int fd, void *buf, size_t count);
	int     (*close)	(int fd);
	ssize_t (*write)	(int fd, const void *buf, size_t count);
	off_t   (*lseek)	(int fd, off_t offset, int whence);
	int     (*isregfile)	(int fd);
	int     (*getfilesize)	(int fd, guint32 *size);
};


MS_OLE_GET_GUINT8()

#define MS_OLE_GET_GUINT8(p)  (*((const guint8 *)(p) + 0))

p : 


MS_OLE_GET_GUINT16()

#define     MS_OLE_GET_GUINT16(p)

p : 


MS_OLE_GET_GUINT32()

#define     MS_OLE_GET_GUINT32(p)

p : 


MS_OLE_GET_GUINT64()

#define     MS_OLE_GET_GUINT64(p)

p : 


MS_OLE_SET_GUINT8()

#define MS_OLE_SET_GUINT8(p,n)  (*((guint8 *)(p) + 0) = n)

p : 
n : 


MS_OLE_SET_GUINT16()

#define     MS_OLE_SET_GUINT16(p,n)

p : 
n : 


MS_OLE_SET_GUINT32()

#define     MS_OLE_SET_GUINT32(p,n)

p : 
n :