pnpmobileservices/pnpms/PnP/NHwrParser/HttpProvHeaders.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Implementation of PnPMS components
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __HTTPPROVHEADERS_H__
       
    20 #define __HTTPPROVHEADERS_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 _LIT8( KReportUrl, "Report-URL" ); 
       
    25 _LIT8( KSignatureValue, "SignValue" );
       
    26 _LIT8( KDigestValue, "DigValue" );
       
    27 _LIT8( KProvisioningActivation, "Provisioning-Activation" );
       
    28 _LIT8( KUserInteraction, "User-Interaction" );
       
    29 _LIT8( KStringValueTrue, "1" );
       
    30 
       
    31 class CHttpProvHeaders : public CBase
       
    32 {
       
    33 public:
       
    34 
       
    35 /*!
       
    36   @function NewL
       
    37    
       
    38   @discussion Create a CHttpProvHeaders object
       
    39   @param aHeaders A descriptor containing headers of Nokia HeadWrapper.
       
    40   Should remain in the scope during the lifetime of the CHttpProvHeaders object
       
    41   @result a pointer to the created instance of CHttpProvHeaders
       
    42   */
       
    43     static CHttpProvHeaders* NewL(const TDesC8& aHeaders);
       
    44 
       
    45 /*!
       
    46   @function NewLC
       
    47    
       
    48   @discussion Create a CHttpProvHeaders object
       
    49   @param aHeaders A descriptor containing headers of Nokia HeadWrapper.
       
    50   Should remain in the scope during the lifetime of the CHttpProvHeaders object
       
    51   @result a pointer to the created instance of CHttpProvHeaders
       
    52   */
       
    53     static CHttpProvHeaders* NewLC(const TDesC8& aHeaders);
       
    54 
       
    55 /*!
       
    56   @function ~CHttpProvHeaders
       
    57   
       
    58   @discussion Destroy the object and release all memory objects
       
    59   */
       
    60     ~CHttpProvHeaders();
       
    61 
       
    62     const TDesC8& GetParamValL( const TDesC8& aName ) const;
       
    63 
       
    64 private:
       
    65 
       
    66 /*!
       
    67   @function CHttpProvHeaders
       
    68 
       
    69   @discussion Constructs this object
       
    70   */
       
    71     CHttpProvHeaders();
       
    72 
       
    73 /*!
       
    74   @function ConstructL
       
    75 
       
    76   @discussion Performs second phase construction of this object
       
    77   */
       
    78     void ConstructL(const TDesC8& aHeaders);
       
    79 
       
    80     void ParseL( const TDesC8& aHeaders  );
       
    81     void GetLineL( const TDesC8& aBuffer, TPtrC8& aLine, TInt& aNextLinePos );
       
    82     void HandleHeaderLineL( const TDesC8& aLine );
       
    83     void SetParamL( const TDesC8& aName, const TPtrC8& aVal );
       
    84     void SplitLineL( const TDesC8& aLine, TChar aSplitBy, TPtrC8& aLeft, TPtrC8& aRight );
       
    85 
       
    86 
       
    87 private:
       
    88     // Member variables
       
    89     TPtrC8 iReportUrl;
       
    90     TPtrC8 iSignatureValue;
       
    91     TPtrC8 iDigestValue;
       
    92     TPtrC8 iProvisioningActivation;
       
    93     TPtrC8 iUserInteraction;
       
    94 };
       
    95 
       
    96 #endif // __HTTPPROVHEADERS_H__
       
    97