msenservicedescription.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : MSenServiceDescription.h
00004 *  Part of     : Web Services Description
00005 *  Interface   : 
00006 *  Description : Interface (abstract) class for subclasses implementing the 
00007 *                most common value objects used in WSF, which are used to
00008 *                describe some invocable service. 
00009 *  Version     : 
00010 *
00011 *  Copyright © 2002-2005 Nokia. All rights reserved.
00012 *  This material, including documentation and any related 
00013 *  computer programs, is protected by copyright controlled by 
00014 *  Nokia. All rights are reserved. Copying, including 
00015 *  reproducing, storing, adapting or translating, any 
00016 *  or all of this material requires the prior written consent of 
00017 *  Nokia. This material also contains confidential 
00018 *  information which may not be disclosed to others without the 
00019 *  prior written consent of Nokia.
00020 * ==============================================================================
00021 */
00022 
00023 #ifndef M_SEN_SERVICE_DESCRIPTION_H
00024 #define M_SEN_SERVICE_DESCRIPTION_H
00025 
00026 //  INCLUDES
00027 #include <e32base.h>
00028 #include <e32des8.h>    // HBufC8
00029 #include <s32strm.h>    // RWriteStream
00030 
00031 // CONSTANTS
00032 _LIT8(KSenFacetValFalse, "false");
00033 _LIT8(KSenFacetValTrue, "true");
00034 _LIT8(KCompleteMessagesFacet, "urn:nokia.com.serene:complete-messages");
00035 
00036 // FORWARD DECLARATIONS
00037 class CSenFacet;
00038 
00039 // DATA TYPES
00040 typedef RPointerArray<CSenFacet> RFacetArray;
00041 
00042 // CLASS DECLARATION
00043 
00051 class MSenServiceDescription
00052     {
00053         public: 
00054                 
00058                 enum TDescriptionClassType
00059                         {
00060                         ERoot = 0,
00061                         EBaseServiceDescription,
00062                         EXmlServiceDescription,
00063                         EIdentityProvider,
00064                         EServicePattern,
00065                         EServiceSession,
00066                         EWebServiceSession,
00067                         EBasicWebServiceSession,
00068                         EIdWSFServiceSession,
00069                         EIdWsfServiceInstance,
00070                         ECoreServiceConsumer,
00071                         ESenInternalServiceConsumer,
00072                         EIdWsfAuthenticationServiceClient,
00073                         EIdWsfDiscoveryServiceClient
00074                         };
00075 
00076             // New functions
00077         
00085                 virtual TDescriptionClassType DescriptionClassType() = 0;
00086 
00106                 virtual TBool Matches(MSenServiceDescription& aPattern) = 0;
00107 
00113                 virtual TPtrC8 Contract() = 0;
00114 
00122                 virtual TInt HasFacetL(const TDesC8& aURI, TBool& aHasFacet) = 0;
00123 
00124                 /*
00125                 * Method for getting a facet value  from the service description 
00126                 * 
00127                 * @param aURI                   the facet to get
00128                 * @param aValueTo               a ref-to-pointer into which the value will
00129                 *                       be allocated, which ownership is transferred
00130                 *                       to the caller.
00131                 * @return               KErrNone 
00132                 *                               KErrNoMemory value couldn't be allocated due to lack 
00133                 *                               of memory
00134                 *                               KErrNotFound if the wanted facet was not found.
00135                 *                               Other system-wide Symbian error codes.
00136                 */
00137                 virtual TInt FacetValue(TDesC8& aURI, HBufC8*& aValueTo) = 0;
00138 
00148                 virtual TInt AddFacetL(const CSenFacet& aFacet) = 0;
00149 
00161                 virtual TInt SetFacetL(const CSenFacet& aFacet) = 0;
00162 
00171                 virtual TInt RemoveFacet(const TDesC8& aURI) = 0;
00172 
00183                 virtual TInt FacetsL(RFacetArray& aFacetArray) = 0;
00184 
00201                 virtual TInt ScoreMatchL(MSenServiceDescription& aPattern) = 0;
00202 
00208                 virtual TPtrC8 Endpoint() = 0;
00209 
00215                 virtual TPtrC8 FrameworkId() = 0;
00216 
00222                 virtual TPtrC8 FrameworkVersion() = 0;
00223 
00229                 virtual void SetContractL(const TDesC8& aContract) = 0;
00230 
00241                 virtual void SetEndPointL(const TDesC8& aEndPoint) = 0;
00242 
00249                 virtual HBufC8* AsXmlL() = 0;
00250 
00257                 virtual HBufC* AsXmlUnicodeL() = 0;
00258 
00264                 virtual void WriteAsXMLToL(RWriteStream& aWriteStream) = 0;
00265         };
00266 
00267 // M_SEN_SERVICE_DESCRIPTION_H
00268 #endif
00269 
00270 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top