1 /////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000 John Adcock.  All rights reserved.
3 /////////////////////////////////////////////////////////////////////////////
4 //
5 // This library is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU Library General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or (at your
8 // option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
13 // License for more details.
14 //
15 // You should have received a copy of the GNU Library General Public License
16 // along with this library; if not, write to the Free Software Foundation,
17 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 // The id3lib authors encourage improvements and optimisations to be sent to
20 // the id3lib coordinator.  Please see the README file for details on where to
21 // send such submissions.  See the AUTHORS file for a list of people who have
22 // contributed to id3lib.  See the ChangeLog file for a list of changes to
23 // id3lib.  These files are distributed with id3lib at
24 // http://download.sourceforge.net/id3lib/
25 //
26 /////////////////////////////////////////////////////////////////////////////
27 // ID3Frame.h : Declaration of the CID3Frame
28 /////////////////////////////////////////////////////////////////////////////
29 // Change Log
30 //
31 // Date          Developer             Changes
32 //
33 // 05 Jan 2000   John Adcock           Original Release
34 // 18 Aug 2000   Philip Oldaker        Added Picture Functionality
35 //
36 /////////////////////////////////////////////////////////////////////////////
37 
38 #ifndef __ID3FRAME_H_
39 #define __ID3FRAME_H_
40 
41 #include "resource.h"       // main symbols
42 #include <id3/tag.h>
43 #include <id3.h>
44 
45 /////////////////////////////////////////////////////////////////////////////
46 // CID3Frame
47 class ATL_NO_VTABLE CID3Frame :
48 	public CComObjectRootEx<CComSingleThreadModel>,
49 	public CComCoClass<CID3Frame, &CLSID_ID3ComFrame>,
50 	public ISupportErrorInfo,
51 	public IDispatchImpl<IID3ComFrame, &IID_IID3ComFrame, &LIBID_ID3COM>
52 {
53 public:
54 	CID3Frame();
55 	~CID3Frame();
GetID3Frame()56 	ID3_Frame *GetID3Frame()
57 	{
58 		return m_Frame;
59 	}
60 	static IID3ComFrame* CreateObject(IID3ComTag* TagParent, ID3_Frame* Frame);
61 
62 DECLARE_REGISTRY_RESOURCEID(IDR_ID3FRAME)
63 
64 DECLARE_PROTECT_FINAL_CONSTRUCT()
65 
66 BEGIN_COM_MAP(CID3Frame)
67 	COM_INTERFACE_ENTRY(IID3ComFrame)
68 	COM_INTERFACE_ENTRY(IDispatch)
69 	COM_INTERFACE_ENTRY(ISupportErrorInfo)
70 END_COM_MAP()
71 
72 // ISupportsErrorInfo
73 	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
74 
75 // IID3ComFrame
76 public:
77 	STDMETHOD(get_Compressed)(/*[out, retval]*/ VARIANT_BOOL *pVal);
78 	STDMETHOD(put_Compressed)(/*[in]*/ VARIANT_BOOL newVal);
79 	STDMETHOD(get_FrameName)(/*[out, retval]*/ BSTR *pVal);
80 	STDMETHOD(get_ID)(/*[out, retval]*/ eID3FrameTypes *pVal);
81 	STDMETHOD(put_ID)(/*[in]*/ eID3FrameTypes newVal);
82 	STDMETHOD(Clear)();
83 	STDMETHOD(get_Field)(/*[in]*/ eID3FieldTypes FieldType, /*[out, retval]*/ IID3ComField** pVal);
84 
85 protected:
86 	ID3_Frame* m_Frame;
87 	IID3ComTag* m_TagParent;
88 };
89 
90 #endif //__ID3FRAME_H_
91