sl@0: /* sl@0: * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: sl@0: sl@0: #ifndef __CAF_EMBEDDEDCONTENTITERATORBASE_H__ sl@0: #define __CAF_EMBEDDEDCONTENTITERATORBASE_H__ sl@0: sl@0: #include sl@0: sl@0: #include "StreamablePtrArray.h" sl@0: #include sl@0: sl@0: namespace ContentAccess sl@0: { sl@0: class CContent; sl@0: class CEmbeddedObject; sl@0: sl@0: sl@0: /** Internal class for recursively searching through a particular content file sl@0: sl@0: Only ever created by CContentIteratorBase, CEmbeddedContetnIterator or itself sl@0: sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: NONSHARABLE_CLASS(CEmbeddedContentIteratorBase) : public CBase sl@0: { sl@0: public: sl@0: virtual ~CEmbeddedContentIteratorBase(); sl@0: sl@0: CEmbeddedObject& EmbeddedObject(); sl@0: TInt Next(); sl@0: sl@0: private: sl@0: // Only ever created by one of these two or itself sl@0: friend class CEmbeddedContentIterator; sl@0: friend class CContentIteratorBase; sl@0: sl@0: /** Create a content iterator for a particular path in the file system sl@0: @param aContent Already set up to look at the container we are interested in sl@0: @param aRecursive Whether to explore sub-containers under the given path sl@0: @param aMimeType The mime type to search for. Finds content objects of any mime types if this parameter is omitted sl@0: @leave KErrNotFound If no suitable content objects were found inside the given path sl@0: */ sl@0: static CEmbeddedContentIteratorBase* NewL(CContent& aContent, TBool aRecursive, const TDesC8& aMimeType); sl@0: sl@0: CEmbeddedContentIteratorBase(CContent& aContent, TBool aRecursive, const TDesC8& aMimeType ); sl@0: void ConstructL(); sl@0: sl@0: // Construction parameters sl@0: CContent& iContent; sl@0: TBool iRecursive; sl@0: const TDesC8& iMimeType; sl@0: sl@0: // Index into the list of embedded content objects sl@0: TInt iContentIndex; sl@0: sl@0: // Index into the list of embedded container objects sl@0: TInt iContainerIndex; sl@0: sl@0: // Objects inside the current container within the specificed file sl@0: RStreamablePtrArray iEmbeddedContentObjects; sl@0: sl@0: // Container Objects inside the current container within the specified file sl@0: RStreamablePtrArray iEmbeddedContainerObjects; sl@0: sl@0: // Used for looking inside sub-containers sl@0: CEmbeddedContentIteratorBase* iSubIterator; sl@0: }; sl@0: sl@0: sl@0: } sl@0: sl@0: #endif