/* Copyright (C) 2000 Andy Sherwood (enigmax@home.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // Songs.h : Declaration of the CSongs #ifndef __SONGS_H_ #define __SONGS_H_ #include "resource.h" // main symbols #include "Song.h" #include #include "EnumHelpers.h" typedef CComEnumOnSTL, std::list< CAdapt< CComPtr > > > CComEnumVariantOnListOfSongs; typedef ICollectionOnSTLImpl, std::list< CAdapt< CComPtr > >, ISong*, _CopyItfFromAdaptItf, CComEnumVariantOnListOfSongs> ISongsCollImpl; ///////////////////////////////////////////////////////////////////////////// // CSongs class ATL_NO_VTABLE CSongs : public CComObjectRootEx, public CComCoClass, // non-creatable public ISupportErrorInfo, public ISongsCollImpl { public: DECLARE_NO_REGISTRY() DECLARE_NOT_AGGREGATABLE(CSongs) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CSongs) COM_INTERFACE_ENTRY(ISongs) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(ISupportErrorInfo) END_COM_MAP() // ISupportsErrorInfo STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); // ISongs public: STDMETHODIMP AddSong(ISong* pSong) { CComPtr pRV = pSong; m_coll.push_back(pRV); return S_OK; } }; #endif //__SONGS_H_