webservices/wsidentitymanager/src/senuser.cpp
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2009 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 #include "senuser.h"
       
    21 
       
    22 CSenUser::CSenUser(TBool aActive)
       
    23     : iActive(aActive)
       
    24 {
       
    25 }
       
    26 
       
    27 
       
    28 CSenUser::~CSenUser()
       
    29 {
       
    30     iBaseIdentities.ResetAndDestroy();
       
    31 }
       
    32 
       
    33 CSenUser* CSenUser::NewLC(const TDesC8& aUserName, const TDesC8& aPIN, TBool aActive)
       
    34 {
       
    35 	CSenUser* self = new (ELeave)CSenUser(aActive);
       
    36 	CleanupStack::PushL(self);
       
    37 	self->ConstructL(aUserName, aPIN);
       
    38 	return self;
       
    39 }
       
    40 
       
    41 CSenUser* CSenUser::NewL(const TDesC8& aUserName, const TDesC8& aPIN, TBool aActive)
       
    42 {
       
    43 	CSenUser* self=CSenUser::NewLC(aUserName, aPIN, aActive);
       
    44 	CleanupStack::Pop(); // self;
       
    45 	return self;
       
    46 }
       
    47 
       
    48 void CSenUser::ConstructL(const TDesC8& aUserName, const TDesC8& aPIN)
       
    49 {
       
    50     iUserName.Close();
       
    51     iUserName.CreateL(aUserName);
       
    52     iPIN.Close();
       
    53     iPIN.CreateL(aPIN);
       
    54 }