os/security/contentmgmt/referencedrmagent/contentiterator/EmbeddedcontentIteratorBase.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
/**
sl@0
    20
 @file
sl@0
    21
 @internalComponent
sl@0
    22
 @released
sl@0
    23
*/
sl@0
    24
sl@0
    25
sl@0
    26
#ifndef __CAF_EMBEDDEDCONTENTITERATORBASE_H__
sl@0
    27
#define __CAF_EMBEDDEDCONTENTITERATORBASE_H__
sl@0
    28
sl@0
    29
#include <e32base.h>
sl@0
    30
sl@0
    31
#include "StreamablePtrArray.h"
sl@0
    32
#include <caf/virtualpathptr.h>
sl@0
    33
sl@0
    34
namespace ContentAccess 
sl@0
    35
	{
sl@0
    36
	class CContent;
sl@0
    37
	class CEmbeddedObject;
sl@0
    38
sl@0
    39
sl@0
    40
	/** Internal class for recursively searching through a particular content file
sl@0
    41
sl@0
    42
	Only ever created by CContentIteratorBase, CEmbeddedContetnIterator or itself
sl@0
    43
sl@0
    44
	@internalComponent
sl@0
    45
	@released
sl@0
    46
	*/
sl@0
    47
	NONSHARABLE_CLASS(CEmbeddedContentIteratorBase) : public CBase
sl@0
    48
		{
sl@0
    49
	public:
sl@0
    50
		virtual ~CEmbeddedContentIteratorBase();
sl@0
    51
sl@0
    52
		CEmbeddedObject& EmbeddedObject();
sl@0
    53
		TInt Next();
sl@0
    54
sl@0
    55
	private:
sl@0
    56
		// Only ever created by one of these two or itself
sl@0
    57
		friend class CEmbeddedContentIterator;
sl@0
    58
		friend class CContentIteratorBase;
sl@0
    59
sl@0
    60
		/** Create a content iterator for a particular path in the file system
sl@0
    61
		@param aContent Already set up to look at the container we are interested in
sl@0
    62
		@param aRecursive Whether to explore sub-containers under the given path
sl@0
    63
		@param aMimeType The mime type to search for. Finds content objects of any mime types if this parameter is omitted
sl@0
    64
		@leave KErrNotFound If no suitable content objects were found inside the given path
sl@0
    65
		*/
sl@0
    66
		static CEmbeddedContentIteratorBase* NewL(CContent& aContent, TBool aRecursive, const TDesC8& aMimeType);
sl@0
    67
sl@0
    68
		CEmbeddedContentIteratorBase(CContent& aContent, TBool aRecursive, const TDesC8& aMimeType );
sl@0
    69
		void ConstructL();
sl@0
    70
sl@0
    71
		// Construction parameters
sl@0
    72
		CContent& iContent;
sl@0
    73
		TBool iRecursive;
sl@0
    74
		const TDesC8& iMimeType;
sl@0
    75
sl@0
    76
		// Index into the list of embedded content objects
sl@0
    77
		TInt iContentIndex;
sl@0
    78
		
sl@0
    79
		// Index into the list of embedded container objects
sl@0
    80
		TInt iContainerIndex;
sl@0
    81
		
sl@0
    82
		// Objects inside the current container within the specificed file
sl@0
    83
		RStreamablePtrArray<CEmbeddedObject> iEmbeddedContentObjects;
sl@0
    84
sl@0
    85
		// Container Objects inside the current container within the specified file
sl@0
    86
		RStreamablePtrArray<CEmbeddedObject> iEmbeddedContainerObjects;
sl@0
    87
sl@0
    88
		// Used for looking inside sub-containers
sl@0
    89
		CEmbeddedContentIteratorBase* iSubIterator;
sl@0
    90
		};
sl@0
    91
sl@0
    92
sl@0
    93
	}
sl@0
    94
sl@0
    95
#endif