ncdengine/provider/client/inc/ncdqueryoptionimpl.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006 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:   MNcdProtocolElementEntity declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCDQUERYOPTIONIMPL_H
       
    20 #define NCDQUERYOPTIONIMPL_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class RWriteStream;
       
    25 class RReadStream;
       
    26 class CNcdString;
       
    27 
       
    28 class MNcdConfigurationProtocolQueryOption;
       
    29 
       
    30 /**
       
    31  * Defines a selectable option in a query item.
       
    32  */
       
    33 class CNcdQueryOption : public CBase
       
    34     {
       
    35 public:
       
    36     
       
    37     static CNcdQueryOption* NewL( RReadStream& aReadStream );
       
    38     
       
    39     static CNcdQueryOption* NewLC( RReadStream& aReadStream );
       
    40     
       
    41     static CNcdQueryOption* NewL(
       
    42         const MNcdConfigurationProtocolQueryOption& aOption );
       
    43     
       
    44     static CNcdQueryOption* NewLC(
       
    45         const MNcdConfigurationProtocolQueryOption& aOption );
       
    46 
       
    47     static CNcdQueryOption* NewL( const CNcdString& aPaymentMethodName,
       
    48                                   const TDesC8& aPaymentMethodType );
       
    49     static CNcdQueryOption* NewLC( const CNcdString& aPaymentMethodName,
       
    50                                   const TDesC8& aPaymentMethodType );
       
    51         
       
    52     virtual ~CNcdQueryOption();
       
    53     
       
    54     void InternalizeL( RReadStream& aReadStream );
       
    55 
       
    56     void InternalizeL( const MNcdConfigurationProtocolQueryOption& aOption );
       
    57     
       
    58     void ExternalizeL( RWriteStream& aWriteStream );
       
    59     
       
    60 //    const TDesC& Key() const;
       
    61     
       
    62     const TDesC& Value() const;
       
    63     
       
    64     const CNcdString& Name() const;
       
    65 
       
    66     const TDesC8& Data() const;
       
    67     void SetDataL( const TDesC8& aData );
       
    68 
       
    69 private:
       
    70 
       
    71     CNcdQueryOption(){}
       
    72 
       
    73     virtual void ConstructL( const CNcdString& aPaymentMethodName,
       
    74                              const TDesC8& aPaymentMethodType );
       
    75 
       
    76 private:
       
    77 
       
    78     HBufC* iValue;
       
    79     CNcdString* iName;
       
    80     HBufC8* iData;
       
    81     };
       
    82 
       
    83 
       
    84 #endif // NCDQUERYOPTIONIMPL_H