natfw/natfwunsaf_protocols/unsaf_codec/src/natfwunsafusernameattribute.cpp
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 #include "natfwunsafusernameattribute.h"
       
    22 
       
    23 // -----------------------------------------------------------------------------
       
    24 // CNATFWUNSAFUsernameAttribute::NewL
       
    25 // -----------------------------------------------------------------------------
       
    26 //
       
    27 EXPORT_C CNATFWUNSAFUsernameAttribute* CNATFWUNSAFUsernameAttribute::NewL(
       
    28     const TDesC8& aUsername)
       
    29     {
       
    30     CNATFWUNSAFUsernameAttribute* self = CNATFWUNSAFUsernameAttribute::NewLC(
       
    31         aUsername);
       
    32     CleanupStack::Pop(self);
       
    33     return self;
       
    34     }
       
    35 
       
    36 // -----------------------------------------------------------------------------
       
    37 // CNATFWUNSAFUsernameAttribute::NewLC
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 EXPORT_C CNATFWUNSAFUsernameAttribute* CNATFWUNSAFUsernameAttribute::NewLC(
       
    41     const TDesC8& aUsername)
       
    42     {
       
    43     CNATFWUNSAFUsernameAttribute* self =
       
    44         new (ELeave) CNATFWUNSAFUsernameAttribute();
       
    45     CleanupStack::PushL(self);
       
    46     self->CNATFWUNSAFTextAttribute::ConstructL(aUsername);
       
    47     return self;
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // CNATFWUNSAFUsernameAttribute::DecodeAttributeL
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 CNATFWUNSAFAttribute*
       
    55 CNATFWUNSAFUsernameAttribute::DecodeAttributeL(const TDesC8& aByteStream)
       
    56     {
       
    57     CNATFWUNSAFUsernameAttribute* self =
       
    58         new (ELeave) CNATFWUNSAFUsernameAttribute();
       
    59     CleanupStack::PushL(self);
       
    60     self->DecodeL(aByteStream);
       
    61     CleanupStack::Pop(self);
       
    62     return self;
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // CNATFWUNSAFUsernameAttribute::CNATFWUNSAFUsernameAttribute
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 CNATFWUNSAFUsernameAttribute::CNATFWUNSAFUsernameAttribute() :
       
    70     CNATFWUNSAFTextAttribute()
       
    71     {
       
    72     }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CNATFWUNSAFUsernameAttribute::~CNATFWUNSAFUsernameAttribute
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 CNATFWUNSAFUsernameAttribute::~CNATFWUNSAFUsernameAttribute()
       
    79     {
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // CNATFWUNSAFUsernameAttribute::Type
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 CNATFWUNSAFAttribute::TType CNATFWUNSAFUsernameAttribute::Type() const
       
    87     {
       
    88     return EUsername;
       
    89     }