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