senservicepattern.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : SenServicePattern.h
00004 *  Part of     : Web Services Description
00005 *  Interface   : 
00006 *  Description : Class derives the XML service description and further extends
00007 *                it by adding consumer policy interface implementation.
00008 *  Version     : 
00009 *
00010 *  Copyright © 2002-2005 Nokia. All rights reserved.
00011 *  This material, including documentation and any related 
00012 *  computer programs, is protected by copyright controlled by 
00013 *  Nokia. All rights are reserved. Copying, including 
00014 *  reproducing, storing, adapting or translating, any 
00015 *  or all of this material requires the prior written consent of 
00016 *  Nokia. This material also contains confidential 
00017 *  information which may not be disclosed to others without the 
00018 *  prior written consent of Nokia.
00019 * ==============================================================================
00020 */
00021 
00022 #ifndef SEN_SERVICE_PATTERN_H
00023 #define SEN_SERVICE_PATTERN_H
00024 
00025 //  INCLUDES
00026 #include <e32base.h>
00027 #include <s32strm.h>
00028 #include <SenXmlServiceDescription.h>
00029 #include <MSenConsumerPolicy.h>
00030 
00031 // FORWARD DECLARATIONS
00032 class CSenConsumerPolicy;
00033 
00034 // CLASS DECLARATION
00035 
00068 class CSenServicePattern : public CSenXmlServiceDescription, public MSenConsumerPolicy
00069 
00070     {
00071     public:  // Constructors and destructor
00072         
00076                 IMPORT_C static CSenServicePattern* NewL();
00077 
00081                 IMPORT_C static CSenServicePattern* NewLC();
00082 
00087                 IMPORT_C static CSenServicePattern* NewL(const TDesC8& aNamespaceURI);
00088 
00093                 IMPORT_C static CSenServicePattern* NewLC(const TDesC8& aNamespaceURI);
00094 
00100                 IMPORT_C static CSenServicePattern* NewL(       const TDesC8& aEndPoint,
00101                                                                                                         const TDesC8& aContract );
00102 
00108                 IMPORT_C static CSenServicePattern* NewLC(      const TDesC8& aEndPoint,
00109                                                                                                         const TDesC8& aContract );
00110         
00114                 IMPORT_C virtual ~CSenServicePattern();
00115 
00116         // New functions
00117         
00125                 IMPORT_C HBufC8* ConsumerPolicyAsXmlL();
00126                 
00127         // Functions from base classes
00128                 
00129                 // From CSenXmlServiceDescription 
00130                 
00140                 IMPORT_C TBool Matches(MSenServiceDescription& aServicePattern);
00141                 
00151                 IMPORT_C void StartElementL(const TDesC8& aNsUri,
00152                                                                         const TDesC8& aLocalName,
00153                                                                         const TDesC8& aQName,
00154                                                                         const RAttributeArray& aAttributes);
00155                                                                 
00156                 // From MSenConsumerPolicy 
00157                 IMPORT_C virtual void SetConsumerIapIdL(TUint32 aIapId);
00158                 IMPORT_C virtual TInt ConsumerIapId(TUint32& aCurrentIapId);
00159                 IMPORT_C virtual void SetConsumerIdentityProviderIdsL(
00160                                                                         CSenIdentityProviderIdArray8& aList);
00161         
00162                 IMPORT_C virtual TInt AddConsumerIdentityProviderIdL(
00163                                                                                                                 const TDesC8& aProviderId);
00164 
00165                 IMPORT_C virtual const CSenIdentityProviderIdArray8&
00166                                                                                                 ConsumerIdentityProviderIds8L();
00167 
00168                 IMPORT_C virtual TBool AcceptsConsumerPolicy(
00169                                                                                         MSenConsumerPolicy& aPolicyPattern);
00170 
00171                 IMPORT_C virtual TInt RebuildFromConsumerPolicy(
00172                                                                                                         MSenConsumerPolicy& aTemplate);
00173         
00174     protected:  // New functions
00175                 
00181                 IMPORT_C CSenServicePattern(
00182                                                         MSenServiceDescription::TDescriptionClassType aType);
00183                 
00188                 IMPORT_C void BaseConstructL();
00189 
00196                 IMPORT_C void BaseConstructL(const TDesC8& aNamespaceURI);
00197 
00204                 IMPORT_C void BaseConstructL(const TDesC8& aEndPoint, const TDesC8& aContract);
00205         
00206     protected:  // Data
00207     
00208         // Consumer policy class instance, used as a delegate in parsing
00209         CSenConsumerPolicy* iConsumerPolicy;
00210         };
00211 
00212 #endif SEN_SERVICE_PATTERN_H
00213 
00214 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top