added some development tools
[windows-sources.git] / developer / VSSDK / VisualStudioIntegration / Common / Source / CPP / VSL / MockInterfaces / VSLMockIVsRunningDocTableEvents4.h
blobb52d962be40399fc387a0a4f07c1993325a7c967
1 /***************************************************************************
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 This code is licensed under the Visual Studio SDK license terms.
5 THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
10 This code is a part of the Visual Studio Library.
12 ***************************************************************************/
14 #ifndef IVSRUNNINGDOCTABLEEVENTS4_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5
15 #define IVSRUNNINGDOCTABLEEVENTS4_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5
17 #if _MSC_VER > 1000
18 #pragma once
19 #endif
21 #include "vsshell80.h"
23 #pragma warning(push)
24 #pragma warning(disable : 4510) // default constructor could not be generated
25 #pragma warning(disable : 4610) // can never be instantiated - user defined constructor required
26 #pragma warning(disable : 4512) // assignment operator could not be generated
27 #pragma warning(disable : 6011) // Dereferencing NULL pointer (a NULL derference is just another kind of failure for a unit test
29 namespace VSL
32 class IVsRunningDocTableEvents4NotImpl :
33 public IVsRunningDocTableEvents4
36 VSL_DECLARE_NONINSTANTIABLE_BASE_CLASS(IVsRunningDocTableEvents4NotImpl)
38 public:
40 typedef IVsRunningDocTableEvents4 Interface;
42 STDMETHOD(OnBeforeFirstDocumentLock)(
43 /*[in]*/ IVsHierarchy* /*pHier*/,
44 /*[in]*/ VSITEMID /*itemid*/,
45 /*[in]*/ LPCOLESTR /*pszMkDocument*/)VSL_STDMETHOD_NOTIMPL
47 STDMETHOD(OnAfterSaveAll)()VSL_STDMETHOD_NOTIMPL
49 STDMETHOD(OnAfterLastDocumentUnlock)(
50 /*[in]*/ IVsHierarchy* /*pHier*/,
51 /*[in]*/ VSITEMID /*itemid*/,
52 /*[in]*/ LPCOLESTR /*pszMkDocument*/,
53 /*[in]*/ BOOL /*fClosedWithoutSaving*/)VSL_STDMETHOD_NOTIMPL
56 class IVsRunningDocTableEvents4MockImpl :
57 public IVsRunningDocTableEvents4,
58 public MockBase
61 VSL_DECLARE_NONINSTANTIABLE_BASE_CLASS(IVsRunningDocTableEvents4MockImpl)
63 public:
65 VSL_DEFINE_MOCK_CLASS_TYPDEFS(IVsRunningDocTableEvents4MockImpl)
67 typedef IVsRunningDocTableEvents4 Interface;
68 struct OnBeforeFirstDocumentLockValidValues
70 /*[in]*/ IVsHierarchy* pHier;
71 /*[in]*/ VSITEMID itemid;
72 /*[in]*/ LPCOLESTR pszMkDocument;
73 HRESULT retValue;
76 STDMETHOD(OnBeforeFirstDocumentLock)(
77 /*[in]*/ IVsHierarchy* pHier,
78 /*[in]*/ VSITEMID itemid,
79 /*[in]*/ LPCOLESTR pszMkDocument)
81 VSL_DEFINE_MOCK_METHOD(OnBeforeFirstDocumentLock)
83 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pHier);
85 VSL_CHECK_VALIDVALUE(itemid);
87 VSL_CHECK_VALIDVALUE_STRINGW(pszMkDocument);
89 VSL_RETURN_VALIDVALUES();
91 struct OnAfterSaveAllValidValues
93 HRESULT retValue;
96 STDMETHOD(OnAfterSaveAll)()
98 VSL_DEFINE_MOCK_METHOD_NOARGS(OnAfterSaveAll)
100 VSL_RETURN_VALIDVALUES();
102 struct OnAfterLastDocumentUnlockValidValues
104 /*[in]*/ IVsHierarchy* pHier;
105 /*[in]*/ VSITEMID itemid;
106 /*[in]*/ LPCOLESTR pszMkDocument;
107 /*[in]*/ BOOL fClosedWithoutSaving;
108 HRESULT retValue;
111 STDMETHOD(OnAfterLastDocumentUnlock)(
112 /*[in]*/ IVsHierarchy* pHier,
113 /*[in]*/ VSITEMID itemid,
114 /*[in]*/ LPCOLESTR pszMkDocument,
115 /*[in]*/ BOOL fClosedWithoutSaving)
117 VSL_DEFINE_MOCK_METHOD(OnAfterLastDocumentUnlock)
119 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pHier);
121 VSL_CHECK_VALIDVALUE(itemid);
123 VSL_CHECK_VALIDVALUE_STRINGW(pszMkDocument);
125 VSL_CHECK_VALIDVALUE(fClosedWithoutSaving);
127 VSL_RETURN_VALIDVALUES();
132 } // namespace VSL
134 #pragma warning(pop)
136 #endif // IVSRUNNINGDOCTABLEEVENTS4_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5