' ########################################################################################
' Microsoft Windows
' File: Reconcil.inc
' Contents: OLE reconciliation interface definitions
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_Reconcil_PBI)
#DEFINE PBX_Reconcil_PBI
%EQUATE `REONCIL_INC = 1
'/* Headers
' **********/
#INCLUDE ONCE "Legacy/UI/RecGuids.inc"
#INCLUDE ONCE "Legacy/COM/ObjIdl.inc"
'/* Constants
' ************/
'/* for use in IStorage::SetStateBits() */
%EQUATE `STATEBITS_FLAT = &H0001
'/* reconciliation SCODEs */
'#define REC_S_IDIDTHEUPDATES MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x1000)
'#define REC_S_NOTCOMPLETE MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x1001)
'#define REC_S_NOTCOMPLETEBUTPROPAGATE MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x1002)
'#define REC_E_ABORTED MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1000)
'#define REC_E_NOCALLBACK MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1001)
'#define REC_E_NORESIDUES MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1002)
'#define REC_E_TOODIFFERENT MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1003)
'#define REC_E_INEEDTODOTHEUPDATES MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1004)
%EQUATE `REC_S_IDIDTHEUPDATES = &H00041000&
%EQUATE `REC_S_NOTCOMPLETE = &H00041001&
%EQUATE `REC_S_NOTCOMPLETEBUTPROPAGATE = &H00041002&
%EQUATE `REC_E_ABORTED = &H80041000&
%EQUATE `REC_E_NOCALLBACK = &H80041001&
%EQUATE `REC_E_NORESIDUES = &H80041002&
%EQUATE `REC_E_TOODIFFERENT = &H80041003&
%EQUATE `REC_E_INEEDTODOTHEUPDATES = &H80041004&
'/* Interfaces
' *************/
' ########################################################################################
' INotifyReplica interface
' IID = 99180163-DA16-101A-935C-444553540000
' Inherited interface = IUnknown
' ########################################################################################
INTERFACE INotifyReplica $IID_INotifyReplica
 INHERIT IUnknown
 ' =====================================================================================
 METHOD YouAreAReplica ( ' VTable offset = 12
 BYVAL ulcOtherReplicas AS DWORD
 , BYREF rgpmkOtherReplicas AS IMoniker
 ) AS LONG
 ' =====================================================================================
END INTERFACE
' ########################################################################################
' IReconcileInitiator interface
' IID = 99180161-DA16-101A-935C-444553540000
' Inherited interface = IUnknown
' ########################################################################################
INTERFACE IReconcileInitiator $IID_IReconcileInitiator
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetAbortCallback ( ' VTable offset = 12
 BYVAL punkForAbort AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SetProgressFeedback ( ' VTable offset = 16
 BYVAL ulProgress AS DWORD
 , BYVAL ulProgressMax AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
'/* IReconcilableObject::Reconcile() flags */
' enum RECONCILEF
'/* interaction with the user is allowed */
%EQUATE `RECONCILEF_MAYBOTHERUSER = &H0001
'/*
'* hwndProgressFeedback may be used to provide reconciliation progress
'* feedback to the user.
'*/
%EQUATE `RECONCILEF_FEEDBACKWINDOWVALID = &H0002
'/* residue support not required */
%EQUATE `RECONCILEF_NORESIDUESOK = &H0004
'/* caller not interested in callee's residues */
%EQUATE `RECONCILEF_OMITSELFRESIDUE = &H0008
'/*
' * Reconcile() call resuming after a previous Reconcile() call returned
' * REC_E_NOTCOMPLETE
' */
%EQUATE `RECONCILEF_RESUMERECONCILIATION = &H0010
'/* Object may perform all updates. */
%EQUATE `RECONCILEF_YOUMAYDOTHEUPDATES = &H0020
'/* Only this object has been changed. */
%EQUATE `RECONCILEF_ONLYYOUWERECHANGED = &H0040
'/* flag combinations */
%EQUATE `ALL_RECONCILE_FLAGS = %RECONCILEF_MAYBOTHERUSER OR %RECONCILEF_FEEDBACKWINDOWVALID OR %RECONCILEF_NORESIDUESOK OR %RECONCILEF_OMITSELFRESIDUE OR %RECONCILEF_RESUMERECONCILIATION OR %RECONCILEF_YOUMAYDOTHEUPDATES OR %RECONCILEF_ONLYYOUWERECHANGED
' ########################################################################################
' IReconcilableObject interface
' IID =99180162-DA16-101A-935C-444553540000
' Inherited interface = IUnknown
' ########################################################################################
INTERFACE IReconcilableObject $IID_IReconcilableObject
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Reconcile ( ' VTable offset = 12
 BYVAL pInitiator AS IReconcileInitiator
 , BYVAL dwFlags AS DWORD
 , BYVAL hwndOwner AS DWORD
 , BYVAL hwndProgressFeedback AS DWORD
 , BYVAL ulcInput AS DWORD
 , BYREF rgpmkOtherInput AS IMoniker
 , BYREF plOutIndex AS LONG
 , BYVAL pstgNewResidues AS IUnknown
 , BYVAL pvReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetProgressFeedbackMaxEstimate ( ' VTable offset = 16
 BYREF pulProgressMax AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
' ########################################################################################
' IBriefcaseInitiator interface
' IID = 99180164-DA16-101A-935C-444553540000
' Inherited interface = IUnknown
' ########################################################################################
INTERFACE IBriefcaseInitiator $IID_IBriefcaseInitiator
 INHERIT IUnknown
 ' =====================================================================================
 METHOD IsMonikerInBriefcase ( ' VTable offset = 12
 BYVAL pmk AS IMoniker
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF
