senidentityprovider.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : SenIdentityProvider.h
00004 *  Part of     : Web Services Description
00005 *  Interface   : 
00006 *  Description : Class describes some IdentityProvider service
00007 *  Version     : 
00008 *
00009 *  Copyright © 2002-2005 Nokia. All rights reserved.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia. All rights are reserved. Copying, including 
00013 *  reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef SEN_IDENTITY_PROVIDER_H
00022 #define SEN_IDENTITY_PROVIDER_H
00023 
00024 //  INCLUDES
00025 #include <SenXmlServiceDescription.h>
00026 
00027 // CONSTANTS
00028 const TInt KSenAuthMaxUsernameLength = 32;
00029 const TInt KSenAuthMaxPasswordLength = 16;
00030 
00031 _LIT8(KIdentityProvider8, "IdentityProvider");
00032 _LIT8(KFakeIMEI8, "012345678901234");
00033 _LIT8(KContract8, "urn:liberty:as:2004-04");
00034 _LIT8(KImei, "IMEI");
00035 _LIT8(KType, "type");
00036 _LIT8(KAuthzID8, "AuthzID");
00037 _LIT8(KAdvisoryAuthnID8, "AdvisoryAuthnID");
00038 _LIT8(KPassword8, "Password");
00039 _LIT8(KProviderID8, "ProviderID");
00040 
00041 // DATA TYPES
00042 class TSenAuthentication
00043         {
00044         public:
00045                 TBuf8<KSenAuthMaxUsernameLength> iUsername;
00046                 TBuf8<KSenAuthMaxPasswordLength> iPassword;
00047         };
00048 
00049 // FORWARD DECLARATIONS
00050 class MSenIdentityManager;
00051 class CSenHttpChannel;
00052 
00053 // CLASS DECLARATION
00054 
00070 class CSenIdentityProvider : public CSenXmlServiceDescription
00071 {
00072     public:  // Constructors and destructor
00073         
00086                 IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint );
00087 
00101                 IMPORT_C static CSenIdentityProvider* NewLC( const TDesC8& aEndpoint );
00102 
00117                 IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint,
00118                                                                                                         const TDesC8& aContract );
00119 
00135                 IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00136                                                                                                         const TDesC8& aContract );
00137         
00154                 IMPORT_C static CSenIdentityProvider* NewL(     const TDesC8& aEndpoint,
00155                                                                                                         const TDesC8& aContract,
00156                                                                                                         const TDesC8& aProviderID);
00157 
00176                 IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00177                                                                                                         const TDesC8& aContract,
00178                                                                                                         const TDesC8& aProviderID);
00179 
00201                 IMPORT_C static CSenIdentityProvider* NewL( const TDesC8& aEndpoint,
00202                                                                                                         const TDesC8& aContract,
00203                                                                                                         const TDesC8& aProviderID,
00204                                                                                                         const TDesC8& aServiceID);
00205 
00228                 IMPORT_C static CSenIdentityProvider* NewLC(const TDesC8& aEndpoint,
00229                                                                                                         const TDesC8& aContract,
00230                                                                                                         const TDesC8& aProviderID,
00231                                                                                                         const TDesC8& aServiceID);
00232 
00236                 IMPORT_C virtual ~CSenIdentityProvider();
00237 
00238         // New functions
00239 
00245                 IMPORT_C virtual TPtrC8 AuthzID();
00246 
00252                 IMPORT_C virtual TPtrC8 AdvisoryAuthnID();
00253 
00259                 IMPORT_C TPtrC8 ProviderID();
00260 
00266                 IMPORT_C virtual TPtrC8 Password();
00267 
00273                 IMPORT_C const TDesC8& IMEI();
00274 
00280                 IMPORT_C TPtrC8 UserName();
00281 
00288                 IMPORT_C TInt SetProviderID( const TDesC8& aProviderID );
00289 
00301                 IMPORT_C TInt SetServiceID( const TDesC8& aServiceID );
00302 
00312                 IMPORT_C TBool IsTrustedByL( MSenServiceDescription& aServiceDescription );
00313 
00323                 IMPORT_C TBool IsTrustedByL( const TDesC8& aProviderID );
00324 
00330                 IMPORT_C TBool IsDefault();
00331 
00343                 IMPORT_C TInt SetUserInfoL(const TDesC8& aAuthzID,
00344                                                                    const TDesC8& aAdvisoryAuthnID,
00345                                                                    const TDesC8& aPassword );
00346 
00356                 IMPORT_C HBufC8* HttpCredentialsL(MSenIdentityManager& aIdMgr);
00357     
00358         // Functions from base classes
00359         
00360                 // From CSenXmlServiceDescription
00361                 
00369                 IMPORT_C const TDesC8& NewElementName();
00370 
00371     protected:  
00372         
00373                 /*
00374                   C++ default constructor
00375                 */
00376                 IMPORT_C CSenIdentityProvider(TDescriptionClassType aType);
00377         
00378 
00379         // Functions from base classes
00380     
00381                 // From CSenXmlServiceDescription
00382                 
00393                 IMPORT_C void ConstructL(const TDesC8& aEndPoint);
00394                 
00407                 IMPORT_C void ConstructL(const TDesC8& aEndPoint,
00408                                                                  const TDesC8& aContract);
00409 
00425                 IMPORT_C void ConstructL(const TDesC8& aEndPoint,
00426                                                                  const TDesC8& aContract,
00427                                                                  const TDesC8& aProviderID);
00428 
00448                 IMPORT_C void ConstructL(const TDesC8& aEndPoint,
00449                                                                  const TDesC8& aContract,
00450                                                                  const TDesC8& aProviderID,
00451                                                                 const TDesC8& aServiceID);
00452 };
00453 
00454 // SEN_IDENTITY_PROVIDER_H
00455 #endif
00456 
00457 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top