webservices/wsidentitymanager/src/senwiseidentityprovider.cpp
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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 
       
    22 
       
    23 
       
    24 
       
    25 // INCLUDE FILES
       
    26 #include "senwiseidentityprovider.h"
       
    27 
       
    28 namespace
       
    29     {
       
    30     _LIT8(KIMEI, "IMEI");
       
    31     }
       
    32 
       
    33 
       
    34 EXPORT_C CSenWiseIdentityProvider* CSenWiseIdentityProvider::NewL(
       
    35                                                     TPtrC8 aIMEI,
       
    36                                                     const TDesC8& aEndPoint,
       
    37                                                     const TDesC8& aContract)
       
    38     {
       
    39     CSenWiseIdentityProvider* pNew = NewLC( aIMEI, aEndPoint, aContract );
       
    40     CleanupStack::Pop();
       
    41     return(pNew) ;
       
    42     }
       
    43 
       
    44 EXPORT_C CSenWiseIdentityProvider* CSenWiseIdentityProvider::NewLC(
       
    45                                                        TPtrC8 aIMEI,
       
    46                                                        const TDesC8& aEndPoint,
       
    47                                                        const TDesC8& aContract)
       
    48     {
       
    49     CSenWiseIdentityProvider* pNew =
       
    50             new (ELeave) CSenWiseIdentityProvider(EIdentityProvider, aIMEI);
       
    51     CleanupStack::PushL(pNew);
       
    52     pNew->ConstructL( aEndPoint, aContract );
       
    53     return pNew;
       
    54     }
       
    55 
       
    56 void CSenWiseIdentityProvider::ConstructL(const TDesC8& aEndPoint,
       
    57                                           const TDesC8& aContract)
       
    58     {
       
    59     CSenIdentityProvider::ConstructL(aEndPoint, aContract);
       
    60     }
       
    61 
       
    62 CSenWiseIdentityProvider::CSenWiseIdentityProvider(TDescriptionClassType aType,
       
    63                                                    TPtrC8 aIMEI)
       
    64 :   CSenIdentityProvider(aType),
       
    65     iIMEI(aIMEI)
       
    66     {
       
    67     }
       
    68 
       
    69 EXPORT_C CSenWiseIdentityProvider::~CSenWiseIdentityProvider()
       
    70     {
       
    71     }
       
    72 
       
    73 TPtrC8 CSenWiseIdentityProvider::AuthzID()
       
    74     {
       
    75     TPtrC8 authzid = CSenIdentityProvider::AuthzID();
       
    76     if (authzid == KIMEI) return iIMEI;
       
    77     return authzid;
       
    78     }
       
    79 
       
    80 TPtrC8 CSenWiseIdentityProvider::AdvisoryAuthnID()
       
    81     {
       
    82     TPtrC8 advisoryauthnid = CSenIdentityProvider::AdvisoryAuthnID();
       
    83     if (advisoryauthnid == KIMEI) return iIMEI;
       
    84     return advisoryauthnid;
       
    85     }
       
    86 
       
    87 TPtrC8 CSenWiseIdentityProvider::Password()
       
    88     {
       
    89     TPtrC8 password = CSenIdentityProvider::Password();
       
    90     if (password == KIMEI) return iIMEI;
       
    91     return password;
       
    92     }
       
    93 
       
    94 // End of File