/* 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 */ // Folders.h : Declaration of the CFolders #ifndef __FOLDERS_H_ #define __FOLDERS_H_ #include "resource.h" // main symbols #include "Folder.h" #include #include "EnumHelpers.h" typedef CComEnumOnSTL, std::list< CAdapt< CComPtr > > > CComEnumVariantOnListOfFolders; typedef ICollectionOnSTLImpl, std::list< CAdapt< CComPtr > >, IFolder*, _CopyItfFromAdaptItf, CComEnumVariantOnListOfFolders> IFoldersCollImpl; ///////////////////////////////////////////////////////////////////////////// // CFolders class ATL_NO_VTABLE CFolders : public CComObjectRootEx, public CComCoClass, // non-creatable public ISupportErrorInfo, public IFoldersCollImpl { public: DECLARE_NO_REGISTRY() DECLARE_NOT_AGGREGATABLE(CFolders) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CFolders) COM_INTERFACE_ENTRY(IFolders) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(ISupportErrorInfo) END_COM_MAP() // ISupportsErrorInfo STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); // IFolders public: STDMETHODIMP AddFolder(IFolder* pFolder) { CComPtr pF = pFolder; m_coll.push_back(pF); return S_OK; } }; #endif //__FOLDERS_H_