1.1 --- a/epoc32/include/http/thttphdrfielditer.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/http/thttphdrfielditer.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,106 @@
1.4 -thttphdrfielditer.h
1.5 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file THTTPHdrFieldIter.h
1.24 + @warning : This file contains Rose Model ID comments - please do not delete
1.25 +*/
1.26 +
1.27 +#ifndef __THTTPHDRFIELDITER_H__
1.28 +#define __THTTPHDRFIELDITER_H__
1.29 +
1.30 +// System includes
1.31 +#include <e32std.h>
1.32 +#include <stringpool.h>
1.33 +
1.34 +// Forward declarations
1.35 +class CHeaders;
1.36 +
1.37 +
1.38 +//##ModelId=3A914DFD005C
1.39 +class THTTPHdrFieldIter
1.40 +/**
1.41 +Iterator class to iterate the fields within a RHTTPHeaders.
1.42 +@publishedAll
1.43 +@released
1.44 +*/
1.45 + {
1.46 +public:
1.47 + /** Construct an iterator for the fields of the supplied header collection.
1.48 + @param aHeaders The header collection whose fields we want to iterate
1.49 + */
1.50 + //##ModelId=3A914DFD0087
1.51 + THTTPHdrFieldIter(const CHeaders* aHeaders);
1.52 + /** Class destructor
1.53 + */
1.54 + //##ModelId=3A914DFD0086
1.55 + IMPORT_C ~THTTPHdrFieldIter();
1.56 +
1.57 + /** Reset iterator to point at the first field in the header collection
1.58 + */
1.59 + //##ModelId=3A914DFD0085
1.60 + IMPORT_C void First();
1.61 +
1.62 + /** Check if the iterator is at the end of the collection. If so,
1.63 + further calls to operator() will return NULL.
1.64 + @return True if the iterator has reached the end of the header
1.65 + fields
1.66 + */
1.67 + //##ModelId=3A914DFD0084
1.68 + IMPORT_C TBool AtEnd() const;
1.69 +
1.70 + /** Advance the iterator to the next field.
1.71 + @return True if the iterator still points at a valid part
1.72 + after advancing.
1.73 + */
1.74 + //##ModelId=3A914DFD007E
1.75 + IMPORT_C void operator++();
1.76 +
1.77 + /** Obtain the name of the header field currently pointed at by
1.78 + the iterator.
1.79 + @return The field name; or <empty string> if the iterator has
1.80 + gone off the end of the header collection
1.81 + */
1.82 + //##ModelId=3A914DFD007D
1.83 + IMPORT_C RStringTokenF operator()();
1.84 +
1.85 +private:
1.86 +
1.87 + /** Check the iterator state for invalidity following deletions in the collection
1.88 + */
1.89 + //##ModelId=3BA613240002
1.90 + void CheckInvalidation();
1.91 +
1.92 + /** The headers whose fields we are iterating.
1.93 + */
1.94 + //##ModelId=3A914DFD007A
1.95 + const CHeaders* iHeaders;
1.96 + /** The index of the field in the header that is currently pointed
1.97 + at by the iterator
1.98 + */
1.99 + //##ModelId=3A914DFD0072
1.100 + TInt iPosIdx;
1.101 + };
1.102 +
1.103 +inline THTTPHdrFieldIter::THTTPHdrFieldIter(const CHeaders* aHeaders)
1.104 + : iHeaders(aHeaders)
1.105 + {
1.106 + First();
1.107 + }
1.108 +
1.109 +
1.110 +#endif // __THTTPHDRFIELDITER_H__