os/security/contentmgmt/referencedrmagent/contentiterator/EmbeddedcontentIterator.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_EMBEDDEDCONTENTITERATOR_H__
27 #define __CAF_EMBEDDEDCONTENTITERATOR_H__
31 #include "StreamablePtrArray.h"
32 #include <caf/virtualpathptr.h>
33 #include "ContentIteratorInterface.h"
35 namespace ContentAccess
38 class CEmbeddedObject;
39 class CEmbeddedContentIteratorBase;
41 /** Recursively iterate over all content objects within a file
43 Can be used to find the all content objects inside a given file. A mimetype
44 can be specified to return only those objects with the correct mime type
49 NONSHARABLE_CLASS(CEmbeddedContentIterator): public MContentIterator
52 /** Create a content iterator for a particular path in the file system
53 @param aVirtualPath The file to search inside
54 @param aRecursive Whether to explore sub-containers under the given path
55 @param aMimeType The mime type to search for. Finds content objects of any mime types if this parameter is omitted
56 @leave KErrNotFound If no suitable content objects were found inside the given path
58 static CEmbeddedContentIterator* NewL(const TVirtualPathPtr& aVirtualPath, TBool aRecursive, const TDesC8& aMimeType = KNullDesC8);
61 virtual ~CEmbeddedContentIterator();
64 virtual const TDesC& FileName() const;
65 virtual const TDesC& UniqueId() const;
66 virtual const TDesC& Name() const;
67 virtual const TDesC8& MimeType() const;
72 CEmbeddedContentIterator();
73 void ConstructL(const TVirtualPathPtr& aVirtualPath, TBool aRecursive, const TDesC8& aMimeType);
75 // Construction parameters (copies)
76 CContent* iContent; // created from virtual path
81 // Iterator that actually does the work
82 CEmbeddedContentIteratorBase* iSubIterator;