SenCredential2.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : SenCredential2.h
00004 *  Part of     : Web Services Description
00005 *  Interface   : 
00006 *  Description : Class implements (web) service credential functionality
00007 *  Version     : 
00008 *
00009 *  Copyright © 2002-2006 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_CREDENTIAL2_H
00022 #define SEN_CREDENTIAL2_H
00023 
00024 //  INCLUDES
00025 #include <e32base.h>
00026 #include <s32strm.h>
00027 #include <SenFragmentBase.h>
00028 #include <SenDomFragmentBase.h>
00029 
00030 // CONSTANTS
00031 _LIT8(KCredentialsName2,     "Credentials");
00032 _LIT8(KEndpointName2,        "Endpoint");
00033 _LIT8(KSecurityMechIdName2,  "SecurityMechID");
00034 _LIT8(KNotOnOrAfterName2,    "NotOnOrAfter");
00035 _LIT8(KConditionsName2,      "Conditions");
00036 
00037 _LIT8(KSenCredentialId,                 "CredentialId");
00038 _LIT8(KSenCredentialValidUntil,         "ValidUntil");
00039 _LIT8(KSenCredentialIdentifierLocalname,"Identifier");
00040 _LIT8(KSenCredentialProperteisLocalname,"Properties");
00041 
00042 // FORWARD DECLARATIONS
00043 class SenDateUtils;
00044 class CSenCredentialIdentifier;
00045 class CSenXmlServiceDescription;
00046 class CSenIdentityProvider;
00047 class CSenServiceSession;
00048 class CSenFacet;
00049 
00050 // CLASS DECLARATION
00051 
00057 class CSenCredential2 : public CSenFragmentBase
00058     {
00059     public:  // Constructors and destructor
00060         
00066         static CSenCredential2* NewL();
00067 
00073         static CSenCredential2* NewLC();
00074 
00084         static CSenCredential2* NewL(const TDesC8& aNsUri,
00085                                      const TDesC8& aLocalName,
00086                                      const TDesC8& aQName,
00087                                      const RAttributeArray& aAttributes);
00088 
00098         static CSenCredential2* NewLC(const TDesC8& aNsUri,
00099                                       const TDesC8& aLocalName,
00100                                       const TDesC8& aQName,
00101                                       const RAttributeArray& aAttributes);
00102 
00113         static CSenCredential2* NewL(const TDesC8& aNsUri,
00114                                      const TDesC8& aLocalName,
00115                                      const TDesC8& aQName,
00116                                      const RAttributeArray& aAttributes,
00117                                      TXmlEngElement& aParent);
00118 
00129         static CSenCredential2* NewLC(const TDesC8& aNsUri,
00130                                       const TDesC8& aLocalName,
00131                                       const TDesC8& aQName,
00132                                       const RAttributeArray& aAttributes,
00133                                       TXmlEngElement& aParent);
00134 
00147         static CSenCredential2* NewL(const TDesC8& aNsUri,
00148                                      const TDesC8& aLocalName,
00149                                      const TDesC8& aQName,
00150                                      const RAttributeArray& aAttrs,
00151                                      TXmlEngElement& aParent,
00152                                      RSenDocument& aOwnerDocument);                                         
00153 
00166         static CSenCredential2* NewLC(const TDesC8& aNsUri,
00167                                            const TDesC8& aLocalName,
00168                                            const TDesC8& aQName,
00169                                            const RAttributeArray& aAttrs,
00170                                            TXmlEngElement& aParent,
00171                                            RSenDocument& aOwnerDocument);
00172 
00180         IMPORT_C static CSenCredential2* NewL(const CSenCredential2& aCredential);
00181 
00190         IMPORT_C static CSenCredential2* NewLC(const CSenCredential2& aCredential);
00191         
00195         IMPORT_C virtual ~CSenCredential2();        
00196 
00197         // New functions
00198         
00205         IMPORT_C virtual const TDesC8& Id();
00206 
00212         IMPORT_C virtual TTime& ValidUntil();
00213 
00220         IMPORT_C virtual void SetValidUntil(TTime& aTime);
00221 
00222     protected:  // Functions from base classes
00223         
00227         IMPORT_C CSenCredential2();
00228 
00229 
00230         IMPORT_C virtual void OnStartElementL(const RTagInfo& aElement,
00231                                                                           const RAttributeArray& aAttributes,
00232                                                                           TInt aErrorCode);
00233         
00241         IMPORT_C void BaseConstructL(const TDesC8& aNsUri,
00242                                      const TDesC8& aLocalName,
00243                                      const TDesC8& aQName,
00244                                      const RAttributeArray& aAttributes);
00245 
00255         IMPORT_C void BaseConstructL(const TDesC8& aNsUri,
00256                                      const TDesC8&  aLocalName,
00257                                      const TDesC8& aQName,
00258                                      const RAttributeArray& aAttributes,
00259                                      TXmlEngElement& aParent);
00260 
00274         IMPORT_C void BaseConstructL(const TDesC8& aNsUri,
00275                                      const TDesC8&  aLocalName,
00276                                      const TDesC8& aQName,
00277                                      const RAttributeArray& aAttributes,
00278                                      TXmlEngElement& aParent,
00279                                      RSenDocument& aOwnerDocument);                                         
00286         IMPORT_C void BaseConstructL(CSenCredential2& aCredential);
00287 
00288 
00289     private:
00297         IMPORT_C void ConstructL(const TDesC8& aLocalName);
00298 
00299         // New functions
00300 
00307         void SetIdL(const TDesC8& aId);
00308 
00309     private: // Data
00310         // Unique ID for this credential. Owned.
00311         HBufC8*                     iId;
00312         // One may use SenDateUtils to convert from XML date descrtor to TTime
00313         TTime                       iNotOnOrAfter;    
00314     };
00315 
00316 #endif // SEN_CREDENTIAL2_H
00317 
00318 // End of File
00319 
00320 

Copyright © Nokia Corporation 2001-2007
Back to top