tsrc/provisioningenginestub/inc/mwpelement.h
changeset 22 496ad160a278
parent 0 f0cf47e981f9
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Declares an abstract element in WAP Provisioning.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CWPELEMENT_H
       
    20 #define CWPELEMENT_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // CONSTANTS
       
    26 enum TWPElementTypes 
       
    27     {
       
    28     KWPElement,
       
    29     KWPParameter,
       
    30     KWPPxLogical = 0x51,    // codepage 0
       
    31     KWPPxPhysical,
       
    32     KWPPort,
       
    33     KWPValidity,
       
    34     KWPNapDef,
       
    35     KWPBootstrap,
       
    36     KWPVendorConfig,
       
    37     KWPClientIdentity,
       
    38     KWPPxAuthInfo,
       
    39     KWPNapAuthInfo,
       
    40     KWPAccess,
       
    41     KWPBearerInfo,
       
    42     KWPDNSAddrInfo,
       
    43     KWPWLAN,
       
    44     KWPWepKey,
       
    45 	KWPWebKey = 0x5f,
       
    46     KWPPort1 =0x53+0x100,   // codepage 1
       
    47                                     // 0x54 empty
       
    48     KWPApplication = 0x55+0x100,    
       
    49     KWPAppAddr,
       
    50     KWPAppAuth,
       
    51     KWPClientIdentity1,
       
    52     KWPResource,
       
    53     KWPLoginScript,
       
    54 
       
    55     KWPNamedCharacteristic = 0xffff
       
    56     };
       
    57 
       
    58 // DATA TYPES
       
    59 
       
    60 // FORWARD DECLARATIONS
       
    61 class RWriteStream;
       
    62 class RReadStream;
       
    63 class MWPVisitor;
       
    64 
       
    65 // CLASS DECLARATION
       
    66 
       
    67 /**
       
    68 *  Abstract base class for the contents of a WAP Provisioning document.
       
    69 *
       
    70 *  @lib ProvisioningEngine
       
    71 *  @since 2.0
       
    72 */
       
    73 class MWPElement 
       
    74     {
       
    75     public: // New functions
       
    76         /**
       
    77         * Destructor.
       
    78         */
       
    79         virtual ~MWPElement() {};
       
    80 
       
    81         /**
       
    82         * Calls the visitor with this as parameter.
       
    83         * @param aVisitor Visitor is called.
       
    84         */
       
    85         virtual void CallVisitorL( MWPVisitor& aVisitor ) = 0;
       
    86 
       
    87         /**
       
    88         * Returns the type of the element.
       
    89         * @return Type
       
    90         */
       
    91         virtual TInt Type() const = 0;
       
    92         
       
    93         /**
       
    94         * Externalizes this element.
       
    95         * @param aStream Stream to externalize to.
       
    96         */
       
    97         virtual void ExternalizeL(RWriteStream& aStream) const = 0;
       
    98         
       
    99         /**
       
   100         * Internalizes this element.
       
   101         * @param aStream Stream to internalize from.
       
   102         */
       
   103         virtual void InternalizeL(RReadStream& aStream) = 0;
       
   104     };
       
   105 
       
   106 #endif /* CWPELEMENT_H */