epoc32/include/mw/httpheaderiter.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/httpheaderiter.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,84 @@
     1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __HTTPHEADERITER_H__
    1.20 +#define __HTTPHEADERITER_H__
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +#include <thttpheadervaluevariant.h>
    1.24 +class CHeaders;
    1.25 +class CHeaderField;
    1.26 +class CHeaderFieldPart;
    1.27 +class CHeaderFieldParam;
    1.28 +
    1.29 +class THttpHeaderParamIterator
    1.30 +{
    1.31 +friend class THttpHeaderElementIterator;
    1.32 +friend class THttpHeaderIterator;
    1.33 +
    1.34 +public:
    1.35 +IMPORT_C THttpHeaderParamIterator operator++ (TInt);
    1.36 +IMPORT_C THttpHeaderParamIterator& operator++ ();
    1.37 +IMPORT_C TBool	AtEnd() const;
    1.38 +IMPORT_C const TDesC8& Name() const;
    1.39 +IMPORT_C THttpHeaderValueVariant Value() const;
    1.40 +IMPORT_C THttpHeaderParamIterator();
    1.41 +private:
    1.42 +    IMPORT_C THttpHeaderParamIterator(const RPointerArray<CHeaderFieldParam>* aArray, TInt aIndex = 0);
    1.43 +
    1.44 +private:
    1.45 +const RPointerArray<CHeaderFieldParam>*     iParameterArray; 
    1.46 +TInt iPostIdx;
    1.47 +};
    1.48 +
    1.49 +class THttpHeaderElementIterator
    1.50 +{
    1.51 +friend class THttpHeaderIterator;
    1.52 +friend class CHttpClientTransaction;
    1.53 +public:
    1.54 +IMPORT_C THttpHeaderElementIterator operator++ (TInt);
    1.55 +IMPORT_C THttpHeaderElementIterator& operator++ ();
    1.56 +IMPORT_C TBool AtEnd() const;
    1.57 +IMPORT_C THttpHeaderValueVariant Value() const;
    1.58 +IMPORT_C THttpHeaderParamIterator Parameter() const;
    1.59 +IMPORT_C THttpHeaderElementIterator();
    1.60 +private:
    1.61 +    IMPORT_C THttpHeaderElementIterator(const RPointerArray<CHeaderFieldPart>* aArray, TInt aIndex = 0);
    1.62 +
    1.63 +private:
    1.64 +const RPointerArray<CHeaderFieldPart>*     iElementArray; 
    1.65 +TInt iPostIdx;
    1.66 +};
    1.67 +
    1.68 +class THttpHeaderIterator
    1.69 +{
    1.70 +friend class CHttpClientTransaction;
    1.71 +public:
    1.72 +IMPORT_C THttpHeaderIterator operator++ (TInt);
    1.73 +IMPORT_C THttpHeaderIterator& operator++ ();
    1.74 +IMPORT_C TBool AtEnd() const;
    1.75 +IMPORT_C const TDesC8& Name() const;
    1.76 +IMPORT_C THttpHeaderElementIterator Elements() const;
    1.77 +IMPORT_C THttpHeaderParamIterator Parameters() const;
    1.78 +IMPORT_C THttpHeaderIterator();
    1.79 +private:
    1.80 +IMPORT_C THttpHeaderIterator(const CHeaders* aHeaders, TInt aIndex = 0);
    1.81 +
    1.82 +private:
    1.83 +const CHeaders* iHttpHeaders;
    1.84 +TInt iPostIdx;
    1.85 +};
    1.86 +#endif // __HTTPHEADERITER_H__
    1.87 +