PageRenderTime 22ms CodeModel.GetById 2ms app.highlight 16ms RepoModel.GetById 1ms app.codeStats 0ms

/Sources/sdk/sccda.h

http://github.com/Nashev/OracleOutsideIn4Delphi
C Header | 377 lines | 254 code | 53 blank | 70 comment | 0 complexity | ea41df1a0707ce61ce2049d6ae482ca3 MD5 | raw file
  1/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. */
  2
  3   /*
  4    |   Data Access
  5    |   Include File sccda.h
  6    |
  7    |   DDDD     A
  8    |   D   D   A A
  9    |   D   D  A   A
 10    |   D   D  AAAAA
 11    |   D   D  A   A
 12    |   DDDD   A   A
 13    |
 14    |   Data Access
 15    |
 16    */
 17
 18
 19#ifndef _SCCDA_H
 20#define _SCCDA_H
 21
 22#ifdef WINDOWS
 23#ifndef SCC_PACK_SET
 24#define SCC_PACK_SET 1
 25#define SCC_PACKED_BY_SCCDA_H 1
 26#pragma pack(push,8)
 27#endif /* SCC_PACK_SET */
 28#endif /* WINDOWS */
 29
 30#include "scctype.h"
 31#include "sccop.h"
 32#include "sccfi.h"
 33#include "sccanno.h"
 34#include "sccerr.h"
 35
 36#ifdef __cplusplus
 37extern "C"
 38{
 39#endif
 40
 41#ifndef DA_ENTRYSC
 42
 43#ifdef WIN32
 44#define DA_ENTRYMOD     __cdecl
 45#define DA_ENTRYSC      __declspec(dllexport)
 46#define DA_ENTRYMODPTR  DA_ENTRYMOD *
 47#endif /*WIN32*/
 48
 49#ifdef UNIX
 50#define DA_ENTRYMOD
 51#define DA_ENTRYSC
 52#define DA_ENTRYMODPTR  DA_ENTRYMOD *
 53#endif /*UNIX*/
 54
 55#ifdef NLM
 56#define DA_ENTRYMOD
 57#define DA_ENTRYSC
 58#define DA_ENTRYMODPTR  DA_ENTRYMOD *
 59#endif /*NLM*/
 60
 61#endif // DA_ENTRYSC
 62
 63typedef VTSYSPARAM VTHDOC, * VTLPHDOC;
 64
 65#define VTHDOC_INVALID     0
 66
 67   /*
 68   | SCCDAPOS  structure
 69   */
 70
 71typedef SCCPOS SCCDAPOS;
 72typedef SCCPOS * PSCCDAPOS;
 73
 74typedef struct VTSELECTIONtag
 75{
 76    VTDWORD       dwStructSize;           /* Initialize to sizeof(VTSELECTION)  */
 77    VTDWORD       dwType;                 /* Selection type (see below)         */
 78    union
 79    {
 80        VTWORD  wSection;
 81    } uSelection;
 82} VTSELECTION, * PVTSELECTION;
 83/* Values for VTSELECTION.dwType */
 84#define VTSEL_SECTIONNUMBER      1
 85
 86typedef SCCERR  DAERR;
 87
 88#define DAERR_OK                      SCCERR_OK
 89#define DAERR_BADFILE                 SCCERR_BADFILE
 90#define DAERR_EMPTYFILE               SCCERR_EMPTYFILE
 91#define DAERR_PROTECTEDFILE           SCCERR_PROTECTEDFILE
 92#define DAERR_DRMFILE                 SCCERR_DRMFILE
 93#define DAERR_SUPFILEOPENFAILS        SCCERR_SUPFILEOPENFAILED
 94#define DAERR_MEMORY                  SCCERR_OUTOFMEMORY
 95#define DAERR_EOF                     SCCERR_EOF
 96#define DAERR_ABORT                   SCCERR_ABORT
 97#define DAERR_FILTERNOTAVAIL          SCCERR_NOFILTER
 98#define DAERR_FILTERLOADFAILED        SCCERR_FILTERLOADFAILED
 99#define DAERR_FILEOPENFAILED          SCCERR_FILEOPENFAILED
100#define DAERR_CHARMAPFAILED           SCCERR_CHARMAPFAILED
101#define DAERR_UNKNOWN                 SCCERR_UNKNOWN
102#define DAERR_FILECREATE              SCCERR_FILECREATE
103#define DAERR_FILEWRITEFAILED         SCCERR_FILEWRITEFAILED
104#define DAERR_MORE                    SCCERR_MORE
105#define DAERR_BADPARAM                SCCERR_BADPARAM
106#define DAERR_NOFILE                  SCCERR_NOFILE
107#define DAERR_UNSUPPORTEDCOMPRESSION  SCCERR_UNSUPPORTEDCOMPRESSION
108#define DAERR_MISALIGNMENT            SCCERR_EXCEPT_DATATYPE_MISALIGNMENT
109#define DAERR_NODATATORENDER          SCCERR_NODATATORENDER
110#define DAERR_EXTERNALURLREFERENCE    SCCERR_EXTERNALURLREFERENCE
111#define DAERR_LINKTOFILE              SCCERR_LINKTOFILE
112#define DAERR_NOTARCHIVEFILE          SCCERR_NOTARCHIVEFILE
113#define DAERR_NOTSUPPORTEDARCHIVEFILE SCCERR_NOTSUPPORTEDARCHIVEFILE
114#define DAERR_BADCREDENTIALS          SCCERR_BADCREDENTIALS
115
116#define DA_PATHSIZE 1024
117#define DA_EXTENSIONSIZE 8
118
119/* For tree file access, 8-9-99 */
120typedef struct DATREENODEtag
121{
122    VTDWORD dwSize;
123    VTDWORD dwNode;
124    VTBYTE  szName[DA_PATHSIZE];
125    VTDWORD dwFileSize;
126    VTDWORD dwTime;
127    VTDWORD dwFlags;
128    VTDWORD dwCharSet;
129} SCCDATREENODE, *PSCCDATREENODE;
130#define SCCDA_TREENODEFLAG_FOLDER   (0x00000001)
131#define SCCDA_TREENODEFLAG_SELECTED (0x00000002)
132#define SCCDA_TREENODEFLAG_FOCUS    (0x00000004)
133#define SCCDA_TREENODEFLAG_ENCRYPT  (0x00000010)
134#define SCCDA_TREENODEFLAG_ARCKNOWNENCRYPT (0x00000020)
135#define SCCDA_TREENODEFLAG_BUFFEROVERFLOW	(0x00000100)
136
137typedef struct DATREENODELOCATORtag
138{
139    VTDWORD dwSize;           /* the size of the DATREENODELOCATOR structure */
140    VTDWORD dwSpecialFlags;   /* the archive tree node special flag */
141    VTDWORD dwData1;
142    VTDWORD dwData2;
143}SCCDATREENODELOCATOR, *PSCCDATREENODELOCATOR;
144
145
146/* For Dramamine support */
147typedef struct DADRAMAMINEINFO1tag
148{
149  VTWORD  word1;
150  VTBYTE  szByte1[64];
151  VTBYTE  szByte2[64];
152} DADRAMAMINEINFO1, * PDADRAMAMINEINFO1;
153
154/* maximum size of a subdocument specification */
155#define DA_MAXSUBDOCSPEC    256
156
157typedef struct DAFILESPECtag
158{
159    VTDWORD   dwSpecType;
160    VTLPVOID  pSpec;
161    VTHANDLE  hThis;
162} DAFILESPEC, * PDAFILESPEC;
163
164
165/*
166|  DAFILEFORMATTYPE enumeration
167*/
168typedef enum DAFILEFORMATTYPEtag
169	{
170	DAFORMAT_UNKNOWN = 0,  /* Unknown format */
171	DAFORMAT_WP = 1,       /* Word processor */
172	DAFORMAT_SS = 2,       /* Spreadsheet */
173	DAFORMAT_DB = 3,       /* Database */
174	DAFORMAT_IM = 5,       /* Bitmap image */
175	DAFORMAT_AR = 6,       /* Archive */
176	DAFORMAT_DR = 7,       /* Vector Drawing */
177	DAFORMAT_PR = 8,       /* Presentation */
178	DAFORMAT_CH = 9,       /* Chart */
179	DAFORMAT_MM = 10,      /* Multimedia */
180
181	DAFORMAT_MULTIPLE = 98,    /* File supports multiple file types */
182	DAFORMAT_OTHER    = 99     /* A format not otherwise listed */
183	} DAFILEFORMATTYPE;
184
185
186/* 
187|  SCCDAOBJECT structure
188| 
189|  Object identifier. Used in calls to DASaveObject and DAGetInputObjectInfoX 
190*/
191typedef struct SCCDAOBJECTtag
192	{
193	VTDWORD    dwSize;       /* Filled in by caller with sizeof(SCCDAOBJECT) */
194	VTHDOC     hDoc;         /* Filled in by caller with the DA handle for the document containing the object */
195	VTDWORD    dwObjectType; /* SCCCA_EMBEDDEDOBJECT, SCCCA_LINKEDOBJECT, SCCCA_COMPRESSEDFILE, or SCCCA_ATTACHMENT */
196	VTDWORD    dwData1;      /* Additional data identifying the object */
197	VTDWORD    dwData2;      /* Additional data identifying the object */
198	VTDWORD    dwData3;      /* Additional data identifying the object */
199	VTDWORD    dwData4;      /* Additional data identifying the object */
200    } SCCDAOBJECT, * PSCCDAOBJECT;
201
202/* 
203|  SCCDAOBJECTINFOW structure
204|
205|  Object information
206*/
207
208typedef struct SCCDAOBJECTINFOWtag
209    {
210    VTDWORD    dwSize;                 /* Filled in by caller with sizeof(SCCDAOBJECTINFO) */
211    VTWORD     name[DA_PATHSIZE];      /* Object name (2 byte characters) */
212    VTDWORD    dwObjectType;           /* Type of object: SCCCA_EMBEDDEDOBJECT, SCCCA_LINKEDOBJECT, SCCCA_COMPRESSEDFILE, or SCCCA_ATTACHMENT */
213    VTDWORD    dwFormatId;             /* File format identifier          */
214    VTDWORD    dwCompression;          /* Compression type (if known)     */
215    VTDWORD    dwFlags;                /* Additional flags (See below)    */
216    DAFILEFORMATTYPE formatType;       /* File format type (see DAFILEFORMATTYPE enum) */
217    VTWORD     commonExtension[DA_EXTENSIONSIZE]; /* Commonly used filename extension for this file format */
218    VTBOOL     bGetObjectFromOLELocator;
219    VTBOOL     bGetObjectFromOLEPackage;
220    VTBOOL     bGetObjectInfo;
221    } SCCDAOBJECTINFOW, * PSCCDAOBJECTINFOW;
222
223/* 
224|  DAGetObjectInfo and DAGetOutputObjectInfo parameters
225*/
226#define DAOBJECT_NAME_A             1 /* Retrieves the name of the object, in 8-bit characters.  pInfo points to a buffer of size DA_PATHSIZE.                       */
227#define DAOBJECT_NAME_W             2 /* Retrieves the name of the object in Unicode characters.  pInfo points to a buffer of 16 bit characters of size DA_PATHSIZE. */
228#define DAOBJECT_FORMATID           3 /* Retrieves the OIT file ID of the object.  pInfo points to a VTDWORD value.                                                  */
229#define DAOBJECT_COMPRESSIONTYPE    4 /* Retrieves an identifier of the type of compression used to store the object, if known.  pInfo points to a VTDWORD value.    */
230#define DAOBJECT_FLAGS              5 /* Retrieves a bitfield of flags indicating additional attributes of the object.  pInfo points to a VTDWORD value.             */
231#define DAOBJECT_OBJECTTYPE         6 /* Type of object                                                                                                              */
232#define DAOBJECT_FORMATTYPE         7 /* File format type (see DAFILEFORMATTYPE enum)                                                                                */
233#define DAOBJECT_COMMONEXTENSION_A  8 /* Commonly used filename extension for this file format in 8-bit characters.                                                  */
234#define DAOBJECT_COMMONEXTENSION_W  9 /* Commonly used filename extension for this file format in Unicode characters.                                                */
235
236/* Flags for DAGetObjectInfo( DAOBJECT_FLAGS ) */
237#define DAOBJECTFLAG_PARTIALFILE       0x00000001 /* Object would not normally exist outside the source document */
238#define DAOBJECTFLAG_PROTECTEDFILE     0x00000002 /* Object is encrypted or password protected                   */
239#define DAOBJECTFLAG_UNSUPPORTEDCOMP   0x00000004 /* Object uses an unsupported compression mechanism            */
240#define DAOBJECTFLAG_DRMFILE           0x00000008 /* Object uses Digital Rights Management protection            */
241#define DAOBJECTFLAG_UNIDENTIFIEDFILE  0x00000010 /* Object is extracted, but can not successfully identified    */
242#define DAOBJECTFLAG_LINKTOFILE        0x00000020 /* Object links to file, it can not be extracted               */
243#define DAOBJECTFLAG_ARCKNOWNENCRYPT   0x00000040 /* Object is encrypted and can be decryped with the known password  */
244
245/*
246|  DA Component types
247|  Used in calls to DAAddPipelineComponent, DAGetCurrentPipelineComponentType
248|    DAGetPipelineComponent, and DAOpenPipelineComponent
249*/
250#define DACOMP_UNKNOWN          0xC000   /* Unknown/any component type */
251#define DACOMP_HIOFILE          0xC001   /* SCCIO (HIOFILE) */
252#define DACOMP_SOFILTER         0xC002   /* SO Filter (HFILTER) */
253#define DACOMP_EXFILTER         0xC003   /* Export filter */
254#define DACOMP_PASSIVECOMPONENT 0xC004   /* Passive component filter (HCOMPONENT) */
255#define DACOMP_ACTIVECOMPONENT  0xC005   /* Active component filter (HCOMPONENT) */
256#define DACOMP_CHUNKER          0xC006   /* Standard chunker (HCHUNKER) */
257#define DACOMP_XCHUNKER         0xC007   /* XChunker (HCHUNKER)*/
258#define DACOMP_FILESPEC         0xC008   /* I/O Spec/spec type (PDAFILESPEC)*/
259#define DACOMP_XTREE            0xC009   /* XTree (HXTREE) */
260
261
262
263/*
264|  DA Component flags
265|  Used in calls to DAAddPipelineComponent
266*/
267#define DACOMPF_CLOSEHANDLE  0x00000001 /* Set if component handle should be closed on DACloseDocument */
268#define DACOMPF_FREEHANDLE   0x00000002 /* Set if component handle should be freed on DACloseDocument (by calling UTGlobalFree) */
269
270/*
271|  DAGetFileInfoEx() flags
272*/
273#define DA_FILEINFO_RAWFI 0x00000001
274
275/*
276|  DA Internal flags
277*/
278#define DAOLE_COPYSTORAGE_DOTEMPFILE 0x01
279#define DAOLE_COPYSTORAGE_DOUSERFILE 0x02
280
281/*
282|  Additional flags for DAOpenDocument
283*/
284#define DAOPENDOCUMENT_CONTINUEONFAILURE   0x80000000   /* Return a valid VTHDOC that can be used to obtain information */
285                                                        /* about a document even if a failure occurs.                   */
286                                                        /* Currently used by DAGetObjectInfo                            */ 
287#define DAOPENDOCUMENT_ARCHIVEONLYMODE     0x04000000   /* When the flag is set, only archive document can be opened    */
288                                                        /* All other file formats will return an error                  */
289
290/* File Access callback function signature */
291typedef VTDWORD (DA_ENTRYMODPTR DAFILEACCESSCALLBACKFN)(VTDWORD dwID, VTSYSVAL pRequestData, VTSYSVAL pReturnData, VTDWORD dwReturnDataSize);
292
293/* - defines for file access callback */
294#ifndef SCCVW_H
295#define OIT_FILEACCESS_PASSWORD  1
296#define OIT_FILEACCESS_NOTESID   2
297#endif
298
299/* The sig of the UT status callback function */
300typedef VTDWORD (DA_ENTRYMODPTR DASTATCALLBACKFN)(VTHANDLE hUnique, VTDWORD dwID, VTSYSVAL pCallbackData, VTSYSVAL pAppData);
301
302#ifndef SCCVW_H
303	 /* 
304	  |  Defines for DA status callback
305     */
306#define OIT_STATUS_WORKING		0
307#define OIT_STATUS_CONTINUE		DAERR_OK
308#define OIT_STATUS_CANCEL		SCCERR_CANCEL
309#define OIT_STATUS_ABORT		DAERR_ABORT
310#endif
311#define DASTAT_WORKING              0
312
313/*
314|  P R O T O T Y P E S
315*/
316
317DA_ENTRYSC DAERR DA_ENTRYMOD DAInit(VTVOID);
318DA_ENTRYSC VTLONG DA_ENTRYMOD DAThreadInitExt(
319                    VTLONG (*Lock)(VTVOID *), VTLONG (*Unlock)(VTVOID *));
320DA_ENTRYSC VTLONG DA_ENTRYMOD DAThreadInit(VTSHORT ThreadOption);
321DA_ENTRYSC DAERR DA_ENTRYMOD DADeInit(VTVOID);
322DA_ENTRYSC DAERR DA_ENTRYMOD DAOpenDocument( 
323            VTLPHDOC phDoc, VTDWORD  dwSpecType, VTLPVOID pSpec, VTDWORD  dwFlags);
324DA_ENTRYSC DAERR DA_ENTRYMOD DAOpenNextDocument( 
325            VTHDOC hDoc, VTDWORD  dwSpecType, VTLPVOID pSpec, VTDWORD  dwFlags);
326DA_ENTRYSC DAERR DA_ENTRYMOD DACloseDocument(VTHDOC hDoc);
327DA_ENTRYSC DAERR DA_ENTRYMOD DARetrieveDocHandle(VTHDOC hItem, VTLPHDOC phDoc);
328DA_ENTRYSC DAERR DA_ENTRYMOD DASetOption(
329            VTHDOC hItem, VTDWORD dwOptionId, VTLPVOID pValue, VTDWORD dwSize);
330DA_ENTRYSC DAERR DA_ENTRYMOD DASetFileSpecOption( 
331            VTHDOC hItem, VTDWORD dwOptionId, VTDWORD dwType, VTVOID * pSpec);
332DA_ENTRYSC DAERR DA_ENTRYMOD DAGetOption(
333            VTHDOC hItem, VTDWORD dwOptionId, VTLPVOID pValue, VTLPDWORD pSize);
334DA_ENTRYSC DAERR DA_ENTRYMOD DAGetFileId(VTHDOC hItem, VTLPDWORD pdwFileId);
335DA_ENTRYSC DAERR DA_ENTRYMOD DAGetFileIdEx(VTHDOC hItem, VTLPDWORD pdwFileId, VTDWORD dwFlags);
336DA_ENTRYSC VTVOID DA_ENTRYMOD DAGetErrorString(DAERR deError, VTLPVOID pBuffer, VTDWORD dwSize);
337DA_ENTRYSC DAERR DA_ENTRYMOD DAGetTreeCount(VTHDOC hDoc, VTLPDWORD lpRecordCount);
338DA_ENTRYSC DAERR DA_ENTRYMOD DAGetTreeRecord(VTHDOC hDoc, PSCCDATREENODE pTreeRecord);
339DA_ENTRYSC DAERR DA_ENTRYMOD DAOpenTreeRecord(VTHDOC hDoc, VTLPHDOC lphDoc, VTDWORD dwRecord);
340DA_ENTRYSC DAERR DA_ENTRYMOD DAOpenRandomTreeRecord (VTHDOC hDoc, VTLPHDOC lphDoc, SCCDATREENODELOCATOR sTreeNodeLocator);
341DA_ENTRYSC DAERR DA_ENTRYMOD DASaveTreeRecord(
342            VTHDOC hDoc, VTDWORD dwRecord, VTDWORD dwSpecType, VTLPVOID pSpec, VTDWORD dwFlags);
343DA_ENTRYSC DAERR DA_ENTRYMOD DASaveRandomTreeRecord(
344            VTHDOC hDoc, SCCDATREENODELOCATOR sTreeNodeLocator, VTDWORD dwSpecType, VTLPVOID pSpec, VTDWORD dwFlags);
345
346DA_ENTRYSC DAERR DA_ENTRYMOD DACloseTreeRecord(VTHDOC hDoc);
347DA_ENTRYSC DAERR DA_ENTRYMOD DAGetObjectInfo( 
348            VTHDOC hDoc, VTDWORD dwInfoId, VTLPVOID pInfo );
349DA_ENTRYSC DAERR DA_ENTRYMOD DAGetOutputObjectInfo( 
350            VTHDOC hDoc, VTDWORD dwOutputFileId, VTDWORD dwInfoId, VTLPVOID pInfo );
351DA_ENTRYSC DAERR DA_ENTRYMOD DASaveInputObject( 
352            VTHDOC hDoc, VTDWORD dwSpecType, VTLPVOID pSpec, VTDWORD dwFlags );
353DA_ENTRYSC DAERR DA_ENTRYMOD DAOpenSubdocumentById( 
354            VTHDOC hDoc, VTLPHDOC lphDoc, VTDWORD dwSubdocumentId, VTDWORD dwFlags );
355DA_ENTRYSC DAERR DA_ENTRYMOD DASetStatCallback(DASTATCALLBACKFN pCallback, VTHANDLE hUnique, VTLPVOID pAppData);
356DA_ENTRYSC DAERR DA_ENTRYMOD DASetFileAccessCallback(DAFILEACCESSCALLBACKFN pCallback);
357
358#ifdef __cplusplus
359}
360#endif
361
362/* defines for thread initialization.  Needed only for UNIX */
363#define DATHREAD_INIT_PTHREADS  0
364#define DATHREAD_INIT_NOTHREADS 1
365#define DATHREAD_INIT_NATIVETHREADS 2
366
367#define DATHREAD_INIT_SUCCESS 0
368#define DATHREAD_INIT_FAILED  1
369#define DATHREAD_INIT_ALREADY_CALLED 2
370
371#ifdef SCC_PACKED_BY_SCCDA_H
372#pragma pack(pop)
373#undef SCC_PACKED_BY_SCCDA_H
374#undef SCC_PACK_SET
375#endif /* SCC_PACKED_BY_SCCDA_H */
376
377#endif /* SCCDA_H */