xref: /aoo41x/main/ucb/source/ucp/odma/odma_lib.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef ODMA_LIB_HXX
28*cdf0e10cSrcweir #define ODMA_LIB_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir typedef void	            *LPVOID;
31*cdf0e10cSrcweir typedef char				*LPSTR,
32*cdf0e10cSrcweir 							*PSTR;
33*cdf0e10cSrcweir typedef const char			*LPCSTR;
34*cdf0e10cSrcweir typedef unsigned long       DWORD;
35*cdf0e10cSrcweir typedef unsigned short      WORD;
36*cdf0e10cSrcweir typedef unsigned short      *LPWORD;
37*cdf0e10cSrcweir typedef DWORD		        *LPDWORD;
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir #define WINAPI				__stdcall
40*cdf0e10cSrcweir #define FAR
41*cdf0e10cSrcweir 
42*cdf0e10cSrcweir #include "odma.h"
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir namespace odma
45*cdf0e10cSrcweir {
46*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMRegisterApp) (	ODMHANDLE FAR *pOdmHandle,
47*cdf0e10cSrcweir 													WORD version,
48*cdf0e10cSrcweir 													LPSTR lpszAppId,
49*cdf0e10cSrcweir 													DWORD dwEnvData,
50*cdf0e10cSrcweir 													LPVOID pReserved);
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir 	typedef void (WINAPI *TODMUnRegisterApp)(ODMHANDLE odmHandle);
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSelectDoc)(		ODMHANDLE odmHandle,
56*cdf0e10cSrcweir 													LPSTR lpszDocId,
57*cdf0e10cSrcweir 													LPDWORD pdwFlags);
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMOpenDoc)(		ODMHANDLE odmHandle,
61*cdf0e10cSrcweir 													DWORD flags,
62*cdf0e10cSrcweir 													LPSTR lpszDocId,
63*cdf0e10cSrcweir 													LPSTR lpszDocLocation);
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSaveDoc)(		ODMHANDLE odmHandle,
66*cdf0e10cSrcweir 													LPSTR lpszDocId,
67*cdf0e10cSrcweir 													LPSTR lpszNewDocId);
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMCloseDoc)(		ODMHANDLE odmHandle,
70*cdf0e10cSrcweir 													LPSTR lpszDocId,
71*cdf0e10cSrcweir 													DWORD activeTime,
72*cdf0e10cSrcweir 													DWORD pagesPrinted,
73*cdf0e10cSrcweir 													LPVOID sessionData,
74*cdf0e10cSrcweir 													WORD dataLen);
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMNewDoc)(			ODMHANDLE odmHandle,
77*cdf0e10cSrcweir 													LPSTR lpszDocId,
78*cdf0e10cSrcweir 													DWORD dwFlags,
79*cdf0e10cSrcweir 													LPSTR lpszFormat,
80*cdf0e10cSrcweir 													LPSTR lpszDocLocation);
81*cdf0e10cSrcweir 
82*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSaveAs)(			ODMHANDLE odmHandle,
83*cdf0e10cSrcweir 													LPSTR lpszDocId,
84*cdf0e10cSrcweir 													LPSTR lpszNewDocId,
85*cdf0e10cSrcweir 													LPSTR lpszFormat,
86*cdf0e10cSrcweir 													ODMSAVEASCALLBACK pcbCallBack,
87*cdf0e10cSrcweir 													LPVOID pInstanceData);
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMActivate)(		ODMHANDLE odmHandle,
90*cdf0e10cSrcweir 													WORD action,
91*cdf0e10cSrcweir 													LPSTR lpszDocId);
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMGetDocInfo)(		ODMHANDLE odmHandle,
94*cdf0e10cSrcweir 													LPSTR lpszDocId,
95*cdf0e10cSrcweir 													WORD item,
96*cdf0e10cSrcweir 													LPSTR lpszData,
97*cdf0e10cSrcweir 													WORD dataLen);
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSetDocInfo)(		ODMHANDLE odmHandle,
100*cdf0e10cSrcweir 													LPSTR lpszDocId,
101*cdf0e10cSrcweir 													WORD item,
102*cdf0e10cSrcweir 													LPSTR lpszData);
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMGetDMSInfo)(		ODMHANDLE odmHandle,
105*cdf0e10cSrcweir 													LPSTR lpszDmsId,
106*cdf0e10cSrcweir 													LPWORD pwVerNo,
107*cdf0e10cSrcweir 													LPDWORD pdwExtensions);
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir 	/* Query Enhancements */
110*cdf0e10cSrcweir 	typedef WORD (WINAPI *TODMGetDMSCount)();
111*cdf0e10cSrcweir 
112*cdf0e10cSrcweir 	typedef WORD (WINAPI *TODMGetDMSList)(			LPSTR buffer,
113*cdf0e10cSrcweir 													WORD buffer_size );
114*cdf0e10cSrcweir 
115*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMGetDMS)(			LPCSTR lpszAppId,
116*cdf0e10cSrcweir 													LPSTR lpszDMSId );
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSetDMS)(			LPCSTR lpszAppId,
119*cdf0e10cSrcweir 													LPCSTR lpszDMSId );
120*cdf0e10cSrcweir 
121*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMQueryExecute)(	ODMHANDLE odmHandle,
122*cdf0e10cSrcweir 													LPCSTR lpszQuery,
123*cdf0e10cSrcweir 													DWORD flags,
124*cdf0e10cSrcweir 													LPCSTR lpszDMSList,
125*cdf0e10cSrcweir 													LPSTR queryId );
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMQueryGetResults)(ODMHANDLE odmHandle,
128*cdf0e10cSrcweir 													LPCSTR queryId,
129*cdf0e10cSrcweir 													LPSTR lpszDocId,
130*cdf0e10cSrcweir 													LPSTR lpszDocName,
131*cdf0e10cSrcweir 													WORD docNameLen,
132*cdf0e10cSrcweir 													WORD *docCount );
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMQueryClose)(		ODMHANDLE odmHandle,
135*cdf0e10cSrcweir 													LPCSTR queryId );
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir 	/* ODMA 2.0 Enhancements */
138*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMCloseDocEx)(		ODMHANDLE odmHandle,
139*cdf0e10cSrcweir 													LPSTR lpszDocId,
140*cdf0e10cSrcweir 													LPDWORD pdwFlags,
141*cdf0e10cSrcweir 													DWORD activeTime,
142*cdf0e10cSrcweir 													DWORD pagesPrinted,
143*cdf0e10cSrcweir 													LPVOID sessionData,
144*cdf0e10cSrcweir 													WORD dataLen);
145*cdf0e10cSrcweir 
146*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSaveAsEx)(		ODMHANDLE odmHandle,
147*cdf0e10cSrcweir 													LPSTR lpszDocId,
148*cdf0e10cSrcweir 													LPSTR lpszNewDocId,
149*cdf0e10cSrcweir 													LPSTR lpszFormat,
150*cdf0e10cSrcweir 													ODMSAVEASCALLBACK pcbCallBack,
151*cdf0e10cSrcweir 													LPVOID pInstanceData,
152*cdf0e10cSrcweir 													LPDWORD pdwFlags);
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSaveDocEx)(		ODMHANDLE odmHandle,
155*cdf0e10cSrcweir 													LPSTR lpszDocId,
156*cdf0e10cSrcweir 													LPSTR lpszNewDocId,
157*cdf0e10cSrcweir 													LPDWORD pdwFlags);
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSelectDocEx)(	ODMHANDLE odmHandle,
160*cdf0e10cSrcweir 													LPSTR lpszDocIds,
161*cdf0e10cSrcweir 													LPWORD pwDocIdsLen,
162*cdf0e10cSrcweir 													LPWORD pwDocCount,
163*cdf0e10cSrcweir 													LPDWORD pdwFlags,
164*cdf0e10cSrcweir 													LPSTR lpszFormatFilter);
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMQueryCapability)(ODMHANDLE odmHandle,
167*cdf0e10cSrcweir 													LPCSTR lpszDmsId,
168*cdf0e10cSrcweir 													DWORD function,
169*cdf0e10cSrcweir 													DWORD item,
170*cdf0e10cSrcweir 													DWORD flags);
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSetDocEvent)(	ODMHANDLE odmHandle,
173*cdf0e10cSrcweir 													LPSTR lpszDocId,
174*cdf0e10cSrcweir 													DWORD flags,
175*cdf0e10cSrcweir 													DWORD event,
176*cdf0e10cSrcweir 													LPVOID lpData,
177*cdf0e10cSrcweir 													DWORD dwDataLen,
178*cdf0e10cSrcweir 													LPSTR lpszComment);
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMGetAlternateContent)(ODMHANDLE odmHandle,
181*cdf0e10cSrcweir 													LPSTR lpszDocId,
182*cdf0e10cSrcweir 													LPDWORD pdwFlags,
183*cdf0e10cSrcweir 													LPSTR lpszFormat,
184*cdf0e10cSrcweir 													LPSTR lpszDocLocation);
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSetAlternateContent)(ODMHANDLE odmHandle,
187*cdf0e10cSrcweir 													LPSTR lpszDocId,
188*cdf0e10cSrcweir 													LPDWORD pdwFlags,
189*cdf0e10cSrcweir 													LPSTR lpszFormat,
190*cdf0e10cSrcweir 													LPSTR lpszDocLocation);
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMGetDocRelation)(	ODMHANDLE odmHandle,
193*cdf0e10cSrcweir 													LPSTR lpszDocId,
194*cdf0e10cSrcweir 													LPDWORD pdwFlags,
195*cdf0e10cSrcweir 													LPSTR lpszLinkedId,
196*cdf0e10cSrcweir 													LPSTR lpszFormat,
197*cdf0e10cSrcweir 													LPSTR lpszPreviousId);
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir 	typedef ODMSTATUS (WINAPI *TODMSetDocRelation)(	ODMHANDLE odmHandle,
200*cdf0e10cSrcweir 													LPSTR lpszDocId,
201*cdf0e10cSrcweir 													LPDWORD pdwFlags,
202*cdf0e10cSrcweir 													LPSTR lpszLinkedId,
203*cdf0e10cSrcweir 													LPSTR lpszFormat,
204*cdf0e10cSrcweir 													LPSTR lpszPreviousId);
205*cdf0e10cSrcweir 
206*cdf0e10cSrcweir 	// now we define some macros
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir 	#define NODMRegisterApp(a,b,c,d,e)			(*(pODMRegisterApp))(a,b,c,d,e)
209*cdf0e10cSrcweir 	#define NODMUnRegisterApp(a)				(*(pODMUnRegisterApp))(a)
210*cdf0e10cSrcweir 	#define NODMSelectDoc(a,b,c)				(*(pODMSelectDoc))(a,b,c)
211*cdf0e10cSrcweir 	#define NODMOpenDoc(a,b,c,d)				(*(pODMOpenDoc))(a,b,c,d)
212*cdf0e10cSrcweir 	#define NODMSaveDoc(a,b,c)					(*(pODMSaveDoc))(a,b,c)
213*cdf0e10cSrcweir 	#define NODMCloseDoc(a,b,c,d,e,f)			(*(pODMCloseDoc))(a,b,c,d,e,f)
214*cdf0e10cSrcweir 	#define NODMNewDoc(a,b,c,d,e)				(*(pODMNewDoc))(a,b,c,d,e)
215*cdf0e10cSrcweir 	#define NODMSaveAs(a,b,c,d,e,f)				(*(pODMSaveAs))(a,b,c,d,e,f)
216*cdf0e10cSrcweir 	#define NODMActivate(a,b,c)					(*(pODMActivate))(a,b,c)
217*cdf0e10cSrcweir 	#define NODMGetDocInfo(a,b,c,d,e)			(*(pODMGetDocInfo))(a,b,c,d,e)
218*cdf0e10cSrcweir 	#define NODMSetDocInfo(a,b,c,d)				(*(pODMSetDocInfo))(a,b,c,d)
219*cdf0e10cSrcweir 	#define NODMGetDMSInfo(a,b,c,d)				(*(pODMGetDMSInfo))(a,b,c,d)
220*cdf0e10cSrcweir 	#define NODMGetDMSCount()					(*(pODMGetDMSCount))()
221*cdf0e10cSrcweir 	#define NODMGetDMSList(a,b)					(*(pODMGetDMSList))(a,b)
222*cdf0e10cSrcweir 	#define NODMGetDMS(a,b)						(*(pODMGetDMS))(a,b)
223*cdf0e10cSrcweir 	#define NODMSetDMS(a,b)						(*(pODMSetDMS))(a,b)
224*cdf0e10cSrcweir 	#define NODMQueryExecute(a,b,c,d,e)			(*(pODMQueryExecute))(a,b,c,d,e)
225*cdf0e10cSrcweir 	#define NODMQueryGetResults(a,b,c,d,e,f)	(*(pODMQueryGetResults))(a,b,c,d,e,f)
226*cdf0e10cSrcweir 	#define NODMQueryClose(a,b)					(*(pODMQueryClose))(a,b)
227*cdf0e10cSrcweir 	#define NODMCloseDocEx(a,b,c,d,e,f,g)		(*(pODMCloseDocEx))(a,b,c,d,e,f,g)
228*cdf0e10cSrcweir 	#define NODMSaveAsEx(a,b,c,d,e,f,g)			(*(pODMSaveAsEx))(a,b,c,d,e,f,g)
229*cdf0e10cSrcweir 	#define NODMSaveDocEx(a,b,c,d)				(*(pODMSaveDocEx))(a,b,c,d)
230*cdf0e10cSrcweir 	#define NODMSelectDocEx(a,b,c,d,e,f)		(*(pODMSelectDocEx))(a,b,c,d,e,f)
231*cdf0e10cSrcweir 	#define NODMQueryCapability(a,b,c,d,e)		(*(pODMQueryCapability))(a,b,c,d,e)
232*cdf0e10cSrcweir 	#define NODMSetDocEvent(a,b,c,d,e,f,g)		(*(pODMSetDocEvent))(a,b,c,d,e,f,g)
233*cdf0e10cSrcweir 	#define NODMGetAlternateContent(a,b,c,d,e)	(*(pODMGetAlternateContent))(a,b,c,d,e)
234*cdf0e10cSrcweir 	#define NODMSetAlternateContent(a,b,c,d,e)	(*(pODMSetAlternateContent))(a,b,c,d,e)
235*cdf0e10cSrcweir 	#define NODMGetDocRelation(a,b,c,d,e,f)		(*(pODMGetDocRelation))(a,b,c,d,e,f)
236*cdf0e10cSrcweir 	#define NODMSetDocRelation(a,b,c,d,e,f)		(*(pODMSetDocRelation))(a,b,c,d,e,f)
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir 	sal_Bool LoadLibrary();
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir 	extern TODMRegisterApp			pODMRegisterApp;
241*cdf0e10cSrcweir 	extern TODMUnRegisterApp		pODMUnRegisterApp;
242*cdf0e10cSrcweir 	extern TODMSelectDoc			pODMSelectDoc;
243*cdf0e10cSrcweir 	extern TODMOpenDoc				pODMOpenDoc;
244*cdf0e10cSrcweir 	extern TODMSaveDoc				pODMSaveDoc;
245*cdf0e10cSrcweir 	extern TODMCloseDoc				pODMCloseDoc;
246*cdf0e10cSrcweir 	extern TODMNewDoc				pODMNewDoc;
247*cdf0e10cSrcweir 	extern TODMSaveAs				pODMSaveAs;
248*cdf0e10cSrcweir 	extern TODMActivate				pODMActivate;
249*cdf0e10cSrcweir 	extern TODMGetDocInfo			pODMGetDocInfo;
250*cdf0e10cSrcweir 	extern TODMSetDocInfo			pODMSetDocInfo;
251*cdf0e10cSrcweir 	extern TODMGetDMSInfo			pODMGetDMSInfo;
252*cdf0e10cSrcweir 	extern TODMGetDMSCount			pODMGetDMSCount;
253*cdf0e10cSrcweir 	extern TODMGetDMSList			pODMGetDMSList;
254*cdf0e10cSrcweir 	extern TODMGetDMS				pODMGetDMS;
255*cdf0e10cSrcweir 	extern TODMSetDMS				pODMSetDMS;
256*cdf0e10cSrcweir 	extern TODMQueryExecute			pODMQueryExecute;
257*cdf0e10cSrcweir 	extern TODMQueryGetResults		pODMQueryGetResults;
258*cdf0e10cSrcweir 	extern TODMQueryClose			pODMQueryClose;
259*cdf0e10cSrcweir 	extern TODMCloseDocEx			pODMCloseDocEx;
260*cdf0e10cSrcweir 	extern TODMSaveAsEx				pODMSaveAsEx;
261*cdf0e10cSrcweir 	extern TODMSaveDocEx			pODMSaveDocEx;
262*cdf0e10cSrcweir 	extern TODMSelectDocEx			pODMSelectDocEx;
263*cdf0e10cSrcweir 	extern TODMQueryCapability		pODMQueryCapability;
264*cdf0e10cSrcweir 	extern TODMSetDocEvent			pODMSetDocEvent;
265*cdf0e10cSrcweir 	extern TODMGetAlternateContent	pODMGetAlternateContent;
266*cdf0e10cSrcweir 	extern TODMSetAlternateContent	pODMSetAlternateContent;
267*cdf0e10cSrcweir 	extern TODMGetDocRelation		pODMGetDocRelation;
268*cdf0e10cSrcweir 	extern TODMSetDocRelation		pODMSetDocRelation;
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir }
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir #endif // ODMA_LIB_HXX
273