msvcp60: Use --prefer-native instead of DLL_WINE_PREATTACH.
[wine/zf.git] / include / transact.idl
blobfb3bd42de11c1a87cde5d712e96e40f36a2396d0
1 /*
2 * Copyright (C) 2013 Daniel JeliƄski
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "unknwn.idl";
21 cpp_quote("#include <winerror.h>")
23 interface ITransaction;
24 interface ITransactionCloner;
25 interface ITransaction2;
26 interface ITransactionDispenser;
27 interface ITransactionOptions;
28 interface ITransactionOutcomeEvents;
29 interface ITmNodeName;
31 typedef struct BOID {
32 byte rgb[16];
33 } BOID;
35 cpp_quote("#ifndef MAX_TRAN_DESC_DEFINED")
36 cpp_quote("#define MAX_TRAN_DESC_DEFINED")
37 typedef enum TX_MISC_CONSTANTS {
38 MAX_TRAN_DESC = 40
39 } TX_MISC_CONSTANTS;
40 cpp_quote("#endif")
42 typedef BOID XACTUOW;
43 typedef LONG ISOLEVEL;
45 typedef enum ISOLATIONLEVEL {
46 ISOLATIONLEVEL_UNSPECIFIED = 0xffffffff,
47 ISOLATIONLEVEL_CHAOS = 0x10,
48 ISOLATIONLEVEL_READUNCOMMITTED = 0x100,
49 ISOLATIONLEVEL_BROWSE = 0x100,
50 ISOLATIONLEVEL_CURSORSTABILITY = 0x1000,
51 ISOLATIONLEVEL_READCOMMITTED = 0x1000,
52 ISOLATIONLEVEL_REPEATABLEREAD = 0x10000,
53 ISOLATIONLEVEL_SERIALIZABLE = 0x100000,
54 ISOLATIONLEVEL_ISOLATED = 0x100000
55 } ISOLATIONLEVEL;
57 typedef struct XACTTRANSINFO {
58 XACTUOW uow;
59 ISOLEVEL isoLevel;
60 ULONG isoFlags;
61 DWORD grfTCSupported;
62 DWORD grfRMSupported;
63 DWORD grfTCSupportedRetaining;
64 DWORD grfRMSupportedRetaining;
65 } XACTTRANSINFO;
67 typedef struct XACTSTATS {
68 ULONG cOpen;
69 ULONG cCommitting;
70 ULONG cCommitted;
71 ULONG cAborting;
72 ULONG cAborted;
73 ULONG cInDoubt;
74 ULONG cHeuristicDecision;
75 FILETIME timeTransactionsUp;
76 } XACTSTATS;
78 typedef enum ISOFLAG {
79 ISOFLAG_RETAIN_COMMIT_DC = 1,
80 ISOFLAG_RETAIN_COMMIT = 2,
81 ISOFLAG_RETAIN_COMMIT_NO = 3,
82 ISOFLAG_RETAIN_ABORT_DC = 4,
83 ISOFLAG_RETAIN_ABORT = 8,
84 ISOFLAG_RETAIN_ABORT_NO = 12,
85 ISOFLAG_RETAIN_DONTCARE = ISOFLAG_RETAIN_COMMIT_DC | ISOFLAG_RETAIN_ABORT_DC,
86 ISOFLAG_RETAIN_BOTH = ISOFLAG_RETAIN_COMMIT | ISOFLAG_RETAIN_ABORT,
87 ISOFLAG_RETAIN_NONE = ISOFLAG_RETAIN_COMMIT_NO | ISOFLAG_RETAIN_ABORT_NO,
88 ISOFLAG_OPTIMISTIC = 16,
89 ISOFLAG_READONLY = 32
90 } ISOFLAG;
92 typedef enum XACTTC {
93 XACTTC_NONE = 0,
94 XACTTC_SYNC_PHASEONE = 1,
95 XACTTC_SYNC_PHASETWO = 2,
96 XACTTC_SYNC = 2,
97 XACTTC_ASYNC_PHASEONE = 4,
98 XACTTC_ASYNC = 4
99 } XACTTC;
101 typedef enum XACTRM {
102 XACTRM_OPTIMISTICLASTWINS = 1,
103 XACTRM_NOREADONLYPREPARES
104 } XACTRM;
106 typedef enum XACTCONST {
107 XACTCONST_TIMEOUTINFINITE
108 } XACTCONST;
110 typedef enum XACTHEURISTIC {
111 XACTHEURISTIC_ABORT = 1,
112 XACTHEURISTIC_COMMIT,
113 XACTHEURISTIC_DAMAGE,
114 XACTHEURISTIC_DANGER
115 } XACTHEURISTIC;
117 typedef enum XACTSTAT {
118 XACTSTAT_NONE = 0,
119 XACTSTAT_OPENNORMAL = 0x1,
120 XACTSTAT_OPENREFUSED = 0x2,
121 XACTSTAT_PREPARING = 0x4,
122 XACTSTAT_PREPARED = 0x8,
123 XACTSTAT_PREPARERETAINING = 0x10,
124 XACTSTAT_PREPARERETAINED = 0x20,
125 XACTSTAT_COMMITTING = 0x40,
126 XACTSTAT_COMMITRETAINING = 0x80,
127 XACTSTAT_ABORTING = 0x100,
128 XACTSTAT_ABORTED = 0x200,
129 XACTSTAT_COMMITTED = 0x400,
130 XACTSTAT_HEURISTIC_ABORT = 0x800,
131 XACTSTAT_HEURISTIC_COMMIT = 0x1000,
132 XACTSTAT_HEURISTIC_DAMAGE = 0x2000,
133 XACTSTAT_HEURISTIC_DANGER = 0x4000,
134 XACTSTAT_FORCED_ABORT = 0x8000,
135 XACTSTAT_FORCED_COMMIT = 0x10000,
136 XACTSTAT_INDOUBT = 0x20000,
137 XACTSTAT_CLOSED = 0x40000,
138 XACTSTAT_OPEN = 0x3,
139 XACTSTAT_NOTPREPARED = 0x7ffc3,
140 XACTSTAT_ALL = 0x7ffff
141 } XACTSTAT;
143 typedef struct XACTOPT {
144 ULONG ulTimeout;
145 char szDescription[40 ];
146 } XACTOPT;
149 object,
150 uuid(0fb15084-af41-11ce-bd2b-204c4f4f5020)
152 interface ITransaction : IUnknown {
153 HRESULT Commit([in] BOOL fRetaining,
154 [in] DWORD grfTC,
155 [in] DWORD grfRM);
156 HRESULT Abort([in, unique] BOID *pboidReason,
157 [in] BOOL fRetaining,
158 [in] BOOL fAsync);
159 HRESULT GetTransactionInfo([out] XACTTRANSINFO *pinfo);
163 object,
164 uuid(02656950-2152-11d0-944C-00A0C905416E)
166 interface ITransactionCloner : ITransaction {
167 HRESULT CloneWithCommitDisabled([out] ITransaction **ppITransaction);
171 object,
172 uuid(34021548-0065-11d3-bac1-00c04f797be2)
174 interface ITransaction2 : ITransactionCloner {
175 HRESULT GetTransactionInfo2([out] XACTTRANSINFO *pinfo);
179 object,
180 uuid(3A6AD9E1-23B9-11cf-AD60-00AA00A74CCD)
182 interface ITransactionDispenser : IUnknown {
183 HRESULT GetOptionsObject([out] ITransactionOptions **ppOptions);
184 HRESULT BeginTransaction([in, unique] IUnknown *punkOuter,
185 [in] ISOLEVEL isoLevel,
186 [in] ULONG isoFlags,
187 [in, unique] ITransactionOptions *pOptions,
188 [out] ITransaction **ppTransaction);
192 object,
193 uuid(3A6AD9E0-23B9-11cf-AD60-00AA00A74CCD)
195 interface ITransactionOptions : IUnknown {
196 HRESULT SetOptions([in] XACTOPT *pOptions);
197 HRESULT GetOptions([in, out] XACTOPT *pOptions);
201 object,
202 uuid(3A6AD9E2-23B9-11cf-AD60-00AA00A74CCD)
204 interface ITransactionOutcomeEvents : IUnknown {
205 HRESULT Committed([in] BOOL fRetaining,
206 [in, unique] XACTUOW *pNewUOW,
207 [in] HRESULT hr);
208 HRESULT Aborted([in, unique] BOID *pboidReason,
209 [in] BOOL fRetaining,
210 [in, unique] XACTUOW *pNewUOW,
211 [in] HRESULT hr);
212 HRESULT HeuristicDecision([in] DWORD dwDecision,
213 [in, unique] BOID *pboidReason,
214 [in] HRESULT hr);
215 HRESULT Indoubt(void);
219 object,
220 uuid(30274F88-6EE4-474e-9B95-7807BC9EF8CF)
222 interface ITmNodeName : IUnknown {
223 HRESULT GetNodeNameSize([out] ULONG *pcbNodeNameSize);
224 HRESULT GetNodeName([in] ULONG cbNodeNameBufferSize,
225 [in, out] LPWSTR pNodeNameBuffer);