Reconcil.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:6k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*
  2.  * Copyright (C) Microsoft Corporation, 1990-1999
  3.  * reconcil.h - OLE reconciliation interface definitions.
  4.  */
  5. #ifndef __RECONCIL_H__
  6. #define __RECONCIL_H__
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif
  10. /* Headers
  11.  **********/
  12. #include <recguids.h>
  13. #ifdef __cplusplus
  14. extern "C" {                        /* Assume C declarations for C++. */
  15. #endif   /* __cplusplus */
  16. /* Constants
  17.  ************/
  18. /* for use in IStorage::SetStateBits() */
  19. #define STATEBITS_FLAT                 (0x0001)
  20. /* reconciliation SCODEs */
  21. #define REC_S_IDIDTHEUPDATES           MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x1000)
  22. #define REC_S_NOTCOMPLETE              MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x1001)
  23. #define REC_S_NOTCOMPLETEBUTPROPAGATE  MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x1002)
  24. #define REC_E_ABORTED                  MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x1000)
  25. #define REC_E_NOCALLBACK               MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x1001)
  26. #define REC_E_NORESIDUES               MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x1002)
  27. #define REC_E_TOODIFFERENT             MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x1003)
  28. #define REC_E_INEEDTODOTHEUPDATES      MAKE_SCODE(SEVERITY_ERROR,   FACILITY_ITF, 0x1004)
  29. /* Interfaces
  30.  *************/
  31. #undef  INTERFACE
  32. #define INTERFACE INotifyReplica
  33. DECLARE_INTERFACE_(INotifyReplica, IUnknown)
  34. {
  35.    /* IUnknown methods */
  36.    STDMETHOD(QueryInterface)(THIS_
  37.                              REFIID riid,
  38.                              PVOID *ppvObject) PURE;
  39.    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  40.    STDMETHOD_(ULONG, Release)(THIS) PURE;
  41.    /* INotifyReplica methods */
  42.    STDMETHOD(YouAreAReplica)(THIS_
  43.                              ULONG ulcOtherReplicas,
  44.                              IMoniker **rgpmkOtherReplicas) PURE;
  45. };
  46. #undef  INTERFACE
  47. #define INTERFACE IReconcileInitiator
  48. DECLARE_INTERFACE_(IReconcileInitiator, IUnknown)
  49. {
  50.    /* IUnknown methods */
  51.    STDMETHOD(QueryInterface)(THIS_
  52.                              REFIID riid,
  53.                              PVOID *ppvObject) PURE;
  54.    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  55.    STDMETHOD_(ULONG, Release)(THIS) PURE;
  56.    /* IReconcileInitiator methods */
  57.    STDMETHOD(SetAbortCallback)(THIS_
  58.                                IUnknown *punkForAbort) PURE;
  59.    STDMETHOD(SetProgressFeedback)(THIS_
  60.                                   ULONG ulProgress,
  61.                                   ULONG ulProgressMax) PURE;
  62. };
  63. /* IReconcilableObject::Reconcile() flags */
  64. typedef enum _reconcilef
  65. {
  66.    /* interaction with the user is allowed */
  67.    RECONCILEF_MAYBOTHERUSER         = 0x0001,
  68.    /*
  69.     * hwndProgressFeedback may be used to provide reconciliation progress
  70.     * feedback to the user.
  71.     */
  72.    RECONCILEF_FEEDBACKWINDOWVALID   = 0x0002,
  73.    /* residue support not required */
  74.    RECONCILEF_NORESIDUESOK          = 0x0004,
  75.    /* caller not interested in callee's residues */
  76.    RECONCILEF_OMITSELFRESIDUE       = 0x0008,
  77.    /*
  78.     * Reconcile() call resuming after a previous Reconcile() call returned
  79.     * REC_E_NOTCOMPLETE
  80.     */
  81.    RECONCILEF_RESUMERECONCILIATION  = 0x0010,
  82.    /* Object may perform all updates. */
  83.    RECONCILEF_YOUMAYDOTHEUPDATES    = 0x0020,
  84.    /* Only this object has been changed. */
  85.    RECONCILEF_ONLYYOUWERECHANGED    = 0x0040,
  86.    /* flag combinations */
  87.    ALL_RECONCILE_FLAGS              = (RECONCILEF_MAYBOTHERUSER |
  88.                                        RECONCILEF_FEEDBACKWINDOWVALID |
  89.                                        RECONCILEF_NORESIDUESOK |
  90.                                        RECONCILEF_OMITSELFRESIDUE |
  91.                                        RECONCILEF_RESUMERECONCILIATION |
  92.                                        RECONCILEF_YOUMAYDOTHEUPDATES |
  93.                                        RECONCILEF_ONLYYOUWERECHANGED)
  94. }
  95. RECONCILEF;
  96. #undef  INTERFACE
  97. #define INTERFACE IReconcilableObject
  98. DECLARE_INTERFACE_(IReconcilableObject, IUnknown)
  99. {
  100.    /* IUnknown methods */
  101.    STDMETHOD(QueryInterface)(THIS_
  102.                              REFIID riid,
  103.                              PVOID *ppvObject) PURE;
  104.    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  105.    STDMETHOD_(ULONG, Release)(THIS) PURE;
  106.    /* IReconcilableObject methods */
  107.    STDMETHOD(Reconcile)(THIS_
  108.                         IReconcileInitiator *pInitiator,
  109.                         DWORD dwFlags,
  110.                         HWND hwndOwner,
  111.                         HWND hwndProgressFeedback,
  112.                         ULONG ulcInput,
  113.                         IMoniker **rgpmkOtherInput,
  114.                         PLONG plOutIndex,
  115.                         IStorage *pstgNewResidues,
  116.                         PVOID pvReserved) PURE;
  117.    STDMETHOD(GetProgressFeedbackMaxEstimate)(THIS_
  118.                                              PULONG pulProgressMax) PURE;
  119. };
  120. #undef  INTERFACE
  121. #define INTERFACE IBriefcaseInitiator
  122. DECLARE_INTERFACE_(IBriefcaseInitiator, IUnknown)
  123. {
  124.    /* IUnknown methods */
  125.    STDMETHOD(QueryInterface)(THIS_
  126.                              REFIID riid,
  127.                              PVOID *ppvObject) PURE;
  128.    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  129.    STDMETHOD_(ULONG, Release)(THIS) PURE;
  130.    /* IBriefcaseInitiator methods */
  131.    STDMETHOD(IsMonikerInBriefcase)(THIS_
  132.                                    IMoniker *pmk) PURE;
  133. };
  134. #ifdef __cplusplus
  135. }                                   /* End of extern "C" {. */
  136. #endif   /* __cplusplus */
  137. #endif   /* ! __RECONCIL_H__ */