os/security/contentmgmt/referencedrmagent/contentiterator/EmbeddedcontentIteratorBase.h
First public contribution.
2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
26 #ifndef __CAF_EMBEDDEDCONTENTITERATORBASE_H__
27 #define __CAF_EMBEDDEDCONTENTITERATORBASE_H__
31 #include "StreamablePtrArray.h"
32 #include <caf/virtualpathptr.h>
34 namespace ContentAccess
37 class CEmbeddedObject;
40 /** Internal class for recursively searching through a particular content file
42 Only ever created by CContentIteratorBase, CEmbeddedContetnIterator or itself
47 NONSHARABLE_CLASS(CEmbeddedContentIteratorBase) : public CBase
50 virtual ~CEmbeddedContentIteratorBase();
52 CEmbeddedObject& EmbeddedObject();
56 // Only ever created by one of these two or itself
57 friend class CEmbeddedContentIterator;
58 friend class CContentIteratorBase;
60 /** Create a content iterator for a particular path in the file system
61 @param aContent Already set up to look at the container we are interested in
62 @param aRecursive Whether to explore sub-containers under the given path
63 @param aMimeType The mime type to search for. Finds content objects of any mime types if this parameter is omitted
64 @leave KErrNotFound If no suitable content objects were found inside the given path
66 static CEmbeddedContentIteratorBase* NewL(CContent& aContent, TBool aRecursive, const TDesC8& aMimeType);
68 CEmbeddedContentIteratorBase(CContent& aContent, TBool aRecursive, const TDesC8& aMimeType );
71 // Construction parameters
74 const TDesC8& iMimeType;
76 // Index into the list of embedded content objects
79 // Index into the list of embedded container objects
82 // Objects inside the current container within the specificed file
83 RStreamablePtrArray<CEmbeddedObject> iEmbeddedContentObjects;
85 // Container Objects inside the current container within the specified file
86 RStreamablePtrArray<CEmbeddedObject> iEmbeddedContainerObjects;
88 // Used for looking inside sub-containers
89 CEmbeddedContentIteratorBase* iSubIterator;