epoc32/include/mw/http/thttphdrfielditer.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/http/thttphdrfielditer.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
williamr@2
    17
williamr@2
    18
/**
williamr@2
    19
 @file THTTPHdrFieldIter.h
williamr@2
    20
 @warning : This file contains Rose Model ID comments - please do not delete
williamr@2
    21
*/
williamr@2
    22
williamr@2
    23
#ifndef __THTTPHDRFIELDITER_H__
williamr@2
    24
#define __THTTPHDRFIELDITER_H__
williamr@2
    25
williamr@2
    26
// System includes
williamr@2
    27
#include <e32std.h>
williamr@2
    28
#include <stringpool.h>
williamr@2
    29
williamr@2
    30
// Forward declarations
williamr@2
    31
class CHeaders;
williamr@2
    32
williamr@2
    33
williamr@2
    34
//##ModelId=3A914DFD005C
williamr@2
    35
class THTTPHdrFieldIter
williamr@2
    36
/** 
williamr@2
    37
Iterator class to iterate the fields within a RHTTPHeaders. 
williamr@2
    38
@publishedAll
williamr@2
    39
@released
williamr@2
    40
*/
williamr@2
    41
	{
williamr@2
    42
public:
williamr@2
    43
	/** Construct an iterator for the fields of the supplied header collection.
williamr@2
    44
		@param aHeaders The header collection whose fields we want to iterate
williamr@2
    45
	*/
williamr@2
    46
	//##ModelId=3A914DFD0087
williamr@2
    47
	THTTPHdrFieldIter(const CHeaders* aHeaders);
williamr@2
    48
	/** Class destructor
williamr@2
    49
	*/
williamr@2
    50
	//##ModelId=3A914DFD0086
williamr@2
    51
	IMPORT_C ~THTTPHdrFieldIter();
williamr@2
    52
williamr@2
    53
	/** Reset iterator to point at the first field in the header collection
williamr@2
    54
	*/
williamr@2
    55
	//##ModelId=3A914DFD0085
williamr@2
    56
	IMPORT_C void First();
williamr@2
    57
williamr@2
    58
	/** Check if the iterator is at the end of the collection. If so,
williamr@2
    59
	    further calls to operator() will return NULL.
williamr@2
    60
		@return True if the iterator has reached the end of the header
williamr@2
    61
		fields 
williamr@2
    62
	*/
williamr@2
    63
	//##ModelId=3A914DFD0084
williamr@2
    64
	IMPORT_C TBool AtEnd() const;
williamr@2
    65
williamr@2
    66
	/** Advance the iterator to the next field.
williamr@2
    67
		@return True if the iterator still points at a valid part
williamr@2
    68
		after advancing.
williamr@2
    69
	*/
williamr@2
    70
	//##ModelId=3A914DFD007E
williamr@2
    71
	IMPORT_C void operator++();
williamr@2
    72
williamr@2
    73
	/** Obtain the name of the header field currently pointed at by
williamr@2
    74
		the iterator.
williamr@2
    75
		@return The field name; or <empty string> if the iterator has
williamr@2
    76
		gone off the end of the header collection 
williamr@2
    77
	*/
williamr@2
    78
	//##ModelId=3A914DFD007D
williamr@2
    79
	IMPORT_C RStringTokenF operator()();
williamr@2
    80
williamr@2
    81
private:
williamr@2
    82
williamr@2
    83
	/** Check the iterator state for invalidity following deletions in the collection
williamr@2
    84
	*/
williamr@2
    85
	//##ModelId=3BA613240002
williamr@2
    86
	void CheckInvalidation();
williamr@2
    87
williamr@2
    88
	/** The headers whose fields we are iterating.
williamr@2
    89
	*/
williamr@2
    90
	//##ModelId=3A914DFD007A
williamr@2
    91
	const CHeaders* iHeaders;
williamr@2
    92
	/** The index of the field in the header that is currently pointed
williamr@2
    93
		at by the iterator
williamr@2
    94
	*/
williamr@2
    95
	//##ModelId=3A914DFD0072
williamr@2
    96
	TInt iPosIdx;
williamr@2
    97
	};
williamr@2
    98
williamr@2
    99
inline THTTPHdrFieldIter::THTTPHdrFieldIter(const CHeaders* aHeaders)
williamr@2
   100
	: iHeaders(aHeaders)
williamr@2
   101
	{
williamr@2
   102
	First();
williamr@2
   103
	}
williamr@2
   104
williamr@2
   105
williamr@2
   106
#endif // __THTTPHDRFIELDITER_H__