reposition ok and cancel buttons on import patches dialog
[TortoiseGit.git] / contrib / issue-tracker-plugins / ExampleAtlPlugin / Provider.h
blobd78a4f3d70e872d1653db7aef731524894c96f76
1 #pragma once
2 #include "resource.h" // main symbols
3 #include "ExampleAtlPlugin_i.h"
4 #include "..\inc\IBugTraqProvider_h.h"
6 class ATL_NO_VTABLE CProvider :
7 public CComObjectRootEx<CComSingleThreadModel>,
8 public CComCoClass<CProvider, &CLSID_Provider>,
9 public IBugTraqProvider2
11 public:
12 CProvider();
14 DECLARE_REGISTRY_RESOURCEID(IDR_PROVIDER)
16 DECLARE_NOT_AGGREGATABLE(CProvider)
18 BEGIN_COM_MAP(CProvider)
19 COM_INTERFACE_ENTRY(IBugTraqProvider)
20 COM_INTERFACE_ENTRY(IBugTraqProvider2)
21 END_COM_MAP()
23 DECLARE_PROTECT_FINAL_CONSTRUCT()
25 HRESULT FinalConstruct();
26 void FinalRelease();
28 // IBugTraqProvider
29 public:
30 virtual HRESULT STDMETHODCALLTYPE ValidateParameters(
31 /* [in] */ HWND hParentWnd,
32 /* [in] */ BSTR parameters,
33 /* [retval][out] */ VARIANT_BOOL *valid);
35 virtual HRESULT STDMETHODCALLTYPE GetLinkText(
36 /* [in] */ HWND hParentWnd,
37 /* [in] */ BSTR parameters,
38 /* [retval][out] */ BSTR *linkText);
40 virtual HRESULT STDMETHODCALLTYPE GetCommitMessage(
41 /* [in] */ HWND hParentWnd,
42 /* [in] */ BSTR parameters,
43 /* [in] */ BSTR commonRoot,
44 /* [in] */ SAFEARRAY * pathList,
45 /* [in] */ BSTR originalMessage,
46 /* [retval][out] */ BSTR *newMessage);
48 virtual HRESULT STDMETHODCALLTYPE GetCommitMessage2(
49 /* [in] */ HWND hParentWnd,
50 /* [in] */ BSTR parameters,
51 /* [in] */ BSTR commonURL,
52 /* [in] */ BSTR commonRoot,
53 /* [in] */ SAFEARRAY * pathList,
54 /* [in] */ BSTR originalMessage,
55 /* [retval][out] */ BSTR *newMessage);
57 virtual HRESULT STDMETHODCALLTYPE OnCommitFinished (
58 /* [in] */ HWND hParentWnd,
59 /* [in] */ BSTR commonRoot,
60 /* [in] */ SAFEARRAY * pathList,
61 /* [in] */ BSTR logMessage,
62 /* [in] */ ULONG revision,
63 /* [out, retval] */ BSTR * error);
65 virtual HRESULT STDMETHODCALLTYPE HasOptions(
66 /* [out, retval] */ VARIANT_BOOL *ret // Whether the provider provides options
69 // this method is called if HasOptions() returned true before.
70 // Use this to show a custom dialog so the user doesn't have to
71 // create the parameters string manually
72 virtual HRESULT STDMETHODCALLTYPE ShowOptionsDialog(
73 /* [in] */ HWND hParentWnd, // Parent window for the options dialog
74 /* [in] */ BSTR parameters,
75 /* [out, retval] */ BSTR * newparameters // the parameters string
78 private:
79 typedef std::map< CString, CString > parameters_t;
80 parameters_t ParseParameters(BSTR parameters) const;
83 OBJECT_ENTRY_AUTO(__uuidof(Provider), CProvider)