natfw/natfwunsaf_protocols/unsaf_codec/inc/natfwunsafdataattribute.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CNATFWUNSAFDATAATTRIBUTE_H
       
    22 #define CNATFWUNSAFDATAATTRIBUTE_H
       
    23 
       
    24 #include "natfwunsaftextattribute.h"
       
    25 
       
    26 /**
       
    27  * Class for DATA attribute.
       
    28  *
       
    29  *  @lib natfwunsafprotocols.lib
       
    30  *  @since S60 3.2
       
    31  */
       
    32 class CNATFWUNSAFDataAttribute : public CNATFWUNSAFTextAttribute
       
    33     {
       
    34 public: // Constructors and destructor
       
    35 
       
    36     /**
       
    37     * Decodes a UNSAF attribute from a byte stream.
       
    38     * This version is for lookup table.
       
    39     * @param aByteStream Byte stream, containing attribute type, length and
       
    40     *    value.
       
    41     * @return Decoded UNSAF attribute, ownership is transferred.
       
    42     */
       
    43     static CNATFWUNSAFAttribute* DecodeAttributeL(
       
    44         const TDesC8& aByteStream);
       
    45 
       
    46     /**
       
    47     * Creates a new instance of CNATFWUNSAFDataAttribute
       
    48     * @param aData Data
       
    49     * @return A new instance of CNATFWUNSAFDataAttribute
       
    50     *          ownership is transferred.
       
    51     */
       
    52     IMPORT_C static CNATFWUNSAFDataAttribute* NewL(const TDesC8& aData);
       
    53 
       
    54     /**
       
    55     * Creates a new instance of CNATFWUNSAFDataAttribute and
       
    56     * pushes it to the CleanupStack.
       
    57     * @param aData Data
       
    58     * @return A new instance of CNATFWUNSAFDataAttribute,
       
    59     *          ownership is transferred.
       
    60     */
       
    61     IMPORT_C static CNATFWUNSAFDataAttribute* NewLC(const TDesC8& aData);
       
    62 
       
    63             /**
       
    64     * Destructor, deletes the resources of CNATFWUNSAFDataAttribute.
       
    65     */
       
    66     ~CNATFWUNSAFDataAttribute();
       
    67 
       
    68 public: // From CNATFWUNSAFAttribute
       
    69 
       
    70     CNATFWUNSAFAttribute::TType Type() const;
       
    71 
       
    72 private: // Constructors
       
    73 
       
    74     CNATFWUNSAFDataAttribute();
       
    75     };
       
    76 
       
    77 #endif // CNATFWUNSAFDATAATTRIBUTE_H
       
    78 
       
    79