Separatista
mt940sdocument.h
1 /***************************************************************************
2  * Copyright (C) 2013 by Okkel Klaver *
3  * info@vanhetland.nl *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
21 #ifndef SEPARATISTA_MT940SDOCUMENT_H
22 #define SEPARATISTA_MT940SDOCUMENT_H
23 
24 #include <windows.h>
25 #include <oleauto.h>
26 
27 #include "mt940s/mt940s.h"
28 #include "dispatch.h"
29 
30 struct IMT940SRecordset;
31 
32 // {051E4622-F5B0-40c4-81BC-F12EB35F1868}
33 DEFINE_GUID(IID_IMT940SDocument,
34 0x51e4622, 0xf5b0, 0x40c4, 0x81, 0xbc, 0xf1, 0x2e, 0xb3, 0x5f, 0x18, 0x68);
35 
36 // {6DF05A76-0582-415a-9B96-163F76914250}
37 DEFINE_GUID(CLSID_CMT940SDocument,
38 0x6df05a76, 0x582, 0x415a, 0x9b, 0x96, 0x16, 0x3f, 0x76, 0x91, 0x42, 0x50);
39 
40 struct IMT940SDocument : public IDispatch
41 {
42  // IDispatch
43  STDMETHOD_(ULONG, AddRef)() PURE;
44  STDMETHOD_(ULONG, Release)() PURE;
45  STDMETHOD(QueryInterface)(REFIID riid, void** ppvObject) PURE;
46  STDMETHOD(GetTypeInfoCount)(UINT* pctinfo) PURE;
47  STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo) PURE;
48  STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId) PURE;
49  STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr) PURE;
50 
51  // IMT940SDocument
52  STDMETHOD(Open)(BSTR Path, Separatista::MT940SDocument::OpenStatus *pStatus) PURE;
53  STDMETHOD(Count)(long *plCount) PURE;
54  STDMETHOD(Item)(VARIANT vIndex, IMT940SRecordset **ppIMT940SRecordset) PURE;
55  STDMETHOD(_NewEnum)(IUnknown ** ppUnk) PURE;
56 
57 };
58 
59 struct __declspec(uuid("{051E4622-F5B0-40c4-81BC-F12EB35F1868}")) IMT940SDocument;
60 
67 class CMT940SDocument : public SepaControlDispatch<IMT940SDocument>
68 {
69 public:
71  STDMETHOD(Open)(BSTR Path, Separatista::MT940SDocument::OpenStatus *pStatus);
72 
73  STDMETHOD(Count)(long *plCount);
74  STDMETHOD(Item)(VARIANT vIndex, IMT940SRecordset **ppIMT940SRecordset);
75  STDMETHOD(_NewEnum)(IUnknown ** ppUnk);
76 
77 private:
79  Separatista::MT940SDocument m_MT940SDocument;
80 };
81 
82 class __declspec(uuid("{6DF05A76-0582-415a-9B96-163F76914250}")) CMT940SDocument;
83 
84 #endif // ifndef SEPARATISTA_MT940SDOCUMENT_H
Definition: mt940sdocument.h:40
Definition: mt940srecordset.h:40
OpenStatus
Definition: mt940s.h:163