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