~ubuntu-branches/ubuntu/hoary/libextractor/hoary

« back to all changes in this revision

Viewing changes to src/plugins/ole2/gsf-msole-impl.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2004-10-30 23:50:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041030235000-poix4e5mzhmzkpbk
Tags: 0.3.10-2
* Added fix from cvs for various Sparc64 problems (Closes #278905).
* Added workaround from cvs for re-load glib problem of OLE2 extractor.
* debian/watch added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
2
/*
 
3
 * gsf-msole-impl.h: 
 
4
 *
 
5
 * Copyright (C) 2002-2004 Jody Goldberg (jody@gnome.org)
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or
 
8
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 
9
 * License as published by the Free Software Foundation.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 
19
 * USA
 
20
 */
 
21
 
 
22
#ifndef GSF_MSOLE_IMPL_H
 
23
#define GSF_MSOLE_IMPL_H
 
24
 
 
25
#include "gsf.h"
 
26
 
 
27
G_BEGIN_DECLS
 
28
 
 
29
#define OLE_HEADER_SIZE          0x200  /* independent of big block size size */
 
30
#define OLE_HEADER_SIGNATURE     0x00
 
31
#define OLE_HEADER_CLSID         0x08   /* See ReadClassStg */
 
32
#define OLE_HEADER_MINOR_VER     0x18   /* 0x33 and 0x3e have been seen */
 
33
#define OLE_HEADER_MAJOR_VER     0x1a   /* 0x3 been seen in wild */
 
34
#define OLE_HEADER_BYTE_ORDER    0x1c   /* 0xfe 0xff == Intel Little Endian */
 
35
#define OLE_HEADER_BB_SHIFT      0x1e
 
36
#define OLE_HEADER_SB_SHIFT      0x20
 
37
/* 0x22..0x27 reserved == 0 */
 
38
#define OLE_HEADER_CSECTDIR      0x28
 
39
#define OLE_HEADER_NUM_BAT       0x2c
 
40
#define OLE_HEADER_DIRENT_START  0x30
 
41
/* 0x34..0x37 transacting signature must be 0 */
 
42
#define OLE_HEADER_THRESHOLD     0x38
 
43
#define OLE_HEADER_SBAT_START    0x3c
 
44
#define OLE_HEADER_NUM_SBAT      0x40
 
45
#define OLE_HEADER_METABAT_BLOCK 0x44
 
46
#define OLE_HEADER_NUM_METABAT   0x48
 
47
#define OLE_HEADER_START_BAT     0x4c
 
48
#define BAT_INDEX_SIZE           4
 
49
#define OLE_HEADER_METABAT_SIZE  ((OLE_HEADER_SIZE - OLE_HEADER_START_BAT) / BAT_INDEX_SIZE)
 
50
 
 
51
#define DIRENT_MAX_NAME_SIZE    0x40
 
52
#define DIRENT_DETAILS_SIZE     0x40
 
53
#define DIRENT_SIZE             (DIRENT_MAX_NAME_SIZE + DIRENT_DETAILS_SIZE)
 
54
#define DIRENT_NAME_LEN         0x40    /* length in bytes incl 0 terminator */
 
55
#define DIRENT_TYPE             0x42
 
56
#define DIRENT_COLOUR           0x43
 
57
#define DIRENT_PREV             0x44
 
58
#define DIRENT_NEXT             0x48
 
59
#define DIRENT_CHILD            0x4c
 
60
#define DIRENT_CLSID            0x50    /* only for dirs */
 
61
#define DIRENT_USERFLAGS        0x60    /* only for dirs */
 
62
#define DIRENT_CREATE_TIME      0x64    /* for files */
 
63
#define DIRENT_MODIFY_TIME      0x6c    /* for files */
 
64
#define DIRENT_FIRSTBLOCK       0x74
 
65
#define DIRENT_FILE_SIZE        0x78
 
66
/* 0x7c..0x7f reserved == 0 */
 
67
 
 
68
#define DIRENT_TYPE_INVALID     0
 
69
#define DIRENT_TYPE_DIR         1
 
70
#define DIRENT_TYPE_FILE        2
 
71
#define DIRENT_TYPE_LOCKBYTES   3       /* ? */
 
72
#define DIRENT_TYPE_PROPERTY    4       /* ? */
 
73
#define DIRENT_TYPE_ROOTDIR     5
 
74
#define DIRENT_MAGIC_END        0xffffffff
 
75
 
 
76
/* flags in the block allocation list to denote special blocks */
 
77
#define BAT_MAGIC_UNUSED        0xffffffff      /*                 -1 */
 
78
#define BAT_MAGIC_END_OF_CHAIN  0xfffffffe      /*                 -2 */
 
79
#define BAT_MAGIC_BAT           0xfffffffd      /* a bat block,    -3 */
 
80
#define BAT_MAGIC_METABAT       0xfffffffc      /* a metabat block -4 */
 
81
 
 
82
G_END_DECLS
 
83
 
 
84
#endif /* GSF_MSOLE_IMPL_H */