1/* 2 * Copyright (C) 2013 Daniel Jeliński 3 * 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. 8 * 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. 13 * 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 17 */ 18 19import "transact.idl"; 20import "objidl.idl"; 21 22interface ITransactionResourceAsync; 23interface ITransactionLastResourceAsync; 24interface ITransactionResource; 25interface ITransactionEnlistmentAsync; 26interface ITransactionLastEnlistmentAsync; 27interface ITransactionExportFactory; 28interface ITransactionImportWhereabouts; 29interface ITransactionExport; 30interface ITransactionImport; 31interface ITipTransaction; 32interface ITipHelper; 33interface ITipPullSink; 34interface IDtcNetworkAccessConfig; 35interface IDtcNetworkAccessConfig2; 36 37[ 38 object, 39 uuid(69e971f0-23ce-11cf-ad60-00aa00a74ccd) 40] 41interface ITransactionResourceAsync : IUnknown { 42 HRESULT PrepareRequest([in]BOOL fRetaining,[in]DWORD grfRM,[in]BOOL fWantMoniker,[in]BOOL fSinglePhase); 43 HRESULT CommitRequest([in]DWORD grfRM,[in]XACTUOW *pNewUOW); 44 HRESULT AbortRequest([in]BOID *pboidReason,[in]BOOL fRetaining,[in]XACTUOW *pNewUOW); 45 HRESULT TMDown(void); 46} 47 48[ 49 object, 50 uuid(c82bd532-5b30-11d3-8a91-00c04f79eb6d) 51] 52interface ITransactionLastResourceAsync : IUnknown { 53 HRESULT DelegateCommit([in]DWORD grfRM); 54 HRESULT ForgetRequest([in]XACTUOW *pNewUOW); 55} 56 57[ 58 object, 59 uuid(ee5ff7b3-4572-11d0-9452-00a0c905416e) 60] 61interface ITransactionResource : IUnknown { 62 HRESULT PrepareRequest([in]BOOL fRetaining,[in]DWORD grfRM,[in]BOOL fWantMoniker,[in]BOOL fSinglePhase); 63 HRESULT CommitRequest([in]DWORD grfRM,[in]XACTUOW *pNewUOW); 64 HRESULT AbortRequest([in]BOID *pboidReason,[in]BOOL fRetaining,[in]XACTUOW *pNewUOW); 65 HRESULT TMDown(void); 66} 67 68[ 69 object, 70 uuid(0fb15081-af41-11ce-bd2b-204c4f4f5020) 71] 72interface ITransactionEnlistmentAsync : IUnknown { 73 HRESULT PrepareRequestDone([in]HRESULT hr,[in]IMoniker *pmk,[in]BOID *pboidReason); 74 HRESULT CommitRequestDone([in]HRESULT hr); 75 HRESULT AbortRequestDone([in]HRESULT hr); 76} 77 78[ 79 object, 80 uuid(c82bd533-5b30-11d3-8a91-00c04f79eb6d) 81] 82interface ITransactionLastEnlistmentAsync : IUnknown { 83 HRESULT TransactionOutcome([in]XACTSTAT XactStat,[in]BOID *pboidReason); 84} 85 86[ 87 object, 88 uuid(e1cf9b53-8745-11ce-a9ba-00aa006c3706) 89] 90interface ITransactionExportFactory : IUnknown { 91 HRESULT GetRemoteClassId([in]CLSID *pclsid); 92 HRESULT Create([in]ULONG cbWhereabouts,[in]byte *rgbWhereabouts,[out]ITransactionExport **ppExport); 93} 94 95[ 96 object, 97 uuid(0141fda4-8fc0-11ce-bd18-204c4f4f5020) 98] 99interface ITransactionImportWhereabouts : IUnknown { 100 HRESULT GetWhereaboutsSize([out]ULONG *pcbWhereabouts); 101 HRESULT GetWhereabouts([in]ULONG cbWhereabouts,[out]byte *rgbWhereabouts,[out]ULONG *pcbUsed); 102} 103 104[ 105 object, 106 uuid(0141fda5-8fc0-11ce-bd18-204c4f4f5020) 107] 108interface ITransactionExport : IUnknown { 109 HRESULT Export([in]IUnknown *punkTransaction,[out]ULONG *pcbTransactionCookie); 110 HRESULT GetTransactionCookie([in]IUnknown *punkTransaction,[in]ULONG cbTransactionCookie,[out]byte *rgbTransactionCookie,[out]ULONG *pcbUsed); 111} 112 113[ 114 object, 115 uuid(e1cf9b5a-8745-11ce-a9ba-00aa006c3706) 116] 117interface ITransactionImport : IUnknown { 118 HRESULT Import([in]ULONG cbTransactionCookie,[in]byte *rgbTransactionCookie,[in]IID *piid,[out,iid_is(piid)]void **ppvTransaction); 119} 120[ 121 object, 122 uuid(17cf72d0-bac5-11d1-b1bf-00c04fc2f3ef) 123] 124interface ITipTransaction : IUnknown { 125 HRESULT Push([in]char *i_pszRemoteTmUrl,[out]char **o_ppszRemoteTxUrl); 126 HRESULT GetTransactionUrl([out]char **o_ppszLocalTxUrl); 127} 128[ 129 object, 130 uuid(17cf72d1-bac5-11d1-b1bf-00c04fc2f3ef) 131] 132interface ITipHelper : IUnknown { 133 HRESULT Pull([in]char *i_pszTxUrl,[out]ITransaction **o_ppITransaction); 134 HRESULT PullAsync([in]char *i_pszTxUrl,[in]ITipPullSink *i_pTipPullSink,[out]ITransaction **o_ppITransaction); 135 HRESULT GetLocalTmUrl([out]char **o_ppszLocalTmUrl); 136} 137[ 138 object, 139 uuid(17cf72d2-bac5-11d1-b1bf-00c04fc2f3ef) 140] 141interface ITipPullSink : IUnknown { 142 HRESULT PullComplete([in]HRESULT i_hrPull); 143} 144[ 145 object, 146 uuid(9797c15d-a428-4291-87b6-0995031a678d) 147] 148interface IDtcNetworkAccessConfig : IUnknown { 149 HRESULT GetAnyNetworkAccess([out]BOOL *pbAnyNetworkAccess); 150 HRESULT SetAnyNetworkAccess([in]BOOL bAnyNetworkAccess); 151 HRESULT GetNetworkAdministrationAccess([out]BOOL *pbNetworkAdministrationAccess); 152 HRESULT SetNetworkAdministrationAccess([in]BOOL bNetworkAdministrationAccess); 153 HRESULT GetNetworkTransactionAccess([out]BOOL *pbNetworkTransactionAccess); 154 HRESULT SetNetworkTransactionAccess([in]BOOL bNetworkTransactionAccess); 155 HRESULT GetNetworkClientAccess([out]BOOL *pbNetworkClientAccess); 156 HRESULT SetNetworkClientAccess([in]BOOL bNetworkClientAccess); 157 HRESULT GetNetworkTIPAccess([out]BOOL *pbNetworkTIPAccess); 158 HRESULT SetNetworkTIPAccess([in]BOOL bNetworkTIPAccess); 159 HRESULT GetXAAccess([out]BOOL *pbXAAccess); 160 HRESULT SetXAAccess([in]BOOL bXAAccess); 161 HRESULT RestartDtcService(void); 162} 163 164typedef enum AUTHENTICATION_LEVEL { 165 NO_AUTHENTICATION_REQUIRED, 166 INCOMING_AUTHENTICATION_REQUIRED, 167 MUTUAL_AUTHENTICATION_REQUIRED 168} AUTHENTICATION_LEVEL; 169 170[ 171 object, 172 uuid(a7aa013b-eb7d-4f42-b41c-b2dec09ae034) 173] 174interface IDtcNetworkAccessConfig2 : IDtcNetworkAccessConfig { 175 HRESULT GetNetworkInboundAccess([out]BOOL *pbInbound); 176 HRESULT GetNetworkOutboundAccess([out]BOOL *pbOutbound); 177 HRESULT SetNetworkInboundAccess([in]BOOL bInbound); 178 HRESULT SetNetworkOutboundAccess([in]BOOL bOutbound); 179 HRESULT GetAuthenticationLevel([out]AUTHENTICATION_LEVEL *pAuthLevel); 180 HRESULT SetAuthenticationLevel([in]AUTHENTICATION_LEVEL AuthLevel); 181} 182