00001
00023 #ifndef M_SEN_SERVICE_DESCRIPTION_H
00024 #define M_SEN_SERVICE_DESCRIPTION_H
00025
00026
00027 #include <e32base.h>
00028 #include <e32des8.h>
00029 #include <s32strm.h>
00030
00031
00032 _LIT8(KSenFacetValFalse, "false");
00033 _LIT8(KSenFacetValTrue, "true");
00034
00035
00036 _LIT8(KCompleteMessagesFacet, "urn:nokia.com.serene:complete-messages");
00037 _LIT8(KExposeLocalServiceFacet, "urn:nokia.com.serene:expose");
00038 _LIT8(KProviderSharableFacet, "urn:nokia.com.serene.provider:sharable");
00039 _LIT8(KProviderCompleteClientMsgsFacet, "urn:nokia.com.serene.provider:complete-client-messages") ;
00040 _LIT8(KProviderLoadOnStartupFacet, "urn:nokia.com.serene.provider:load-on-startup") ;
00041 _LIT8(KProviderThreadsafeFacet, "urn:nokia.com.serene.provider:threadsafe") ;
00042 _LIT8(KProviderReinitializableFacet, "urn:nokia.com.serene.provider:re-initializable") ;
00043 _LIT8(KProviderStayOnBackgroundFacet, "urn:nokia.com.serene.provider:stay-on-background") ;
00044 _LIT8(KTransportClassFacet, "urn:nokia.com:serene:transport:class");
00045
00046
00047 _LIT8(KSenTransportCueHTTP, "com.nokia.wsf.transport.plugin.httpchannel");
00048 _LIT8(KSenTransportCueVirtualTCP, "com.nokia.wsf.transport.plugin.virtualtcp");
00049 _LIT8(KSenTransportCueLocalEcom, "com.nokia.wsf.transport.plugin.local");
00050 _LIT8(KSenTransportCueHostletConnection, "com.nokia.wsf.transport.plugin.hostlet");
00051
00052
00053 _LIT8(KSenTransportSchemeHTTP, "http");
00054 _LIT8(KSenTransportSchemeTCP, "tcp");
00055 _LIT8(KSenTransportSchemeLocal, "local");
00056 _LIT8(KSenTransportSchemeHostlet, "hostlet");
00057
00058
00059 const TInt KSenServiceDescriptionBaseScore = 100;
00060
00061
00062 class CSenFacet;
00063
00064
00065 typedef RPointerArray<CSenFacet> RFacetArray;
00066
00067
00068
00076 class MSenServiceDescription
00077 {
00078 public:
00079
00083 IMPORT_C enum TDescriptionClassType
00084 {
00085 ERoot = 0,
00086 EBaseServiceDescription = 1,
00087 EXmlServiceDescription = 2,
00088 EIdentityProvider = 3,
00089 EServicePattern = 4,
00090 EServiceSession = 5,
00091 EWebServiceSession = 6,
00092 EBasicWebServiceSession = 7,
00093 EIdWSFServiceSession = 8,
00094 EIdWsfServiceInstance = 9,
00095 ECoreServiceConsumer = 10,
00096 ESenInternalServiceConsumer = 11,
00097 EIdWsfAuthenticationServiceClient = 12,
00098 EIdWsfDiscoveryServiceClient = 13,
00099 ERestServiceSession = 14,
00100 EWSStarServiceSession = 15,
00101 EWSStarSTSClient = 16,
00102 EWSStarPolicyClient = 17,
00103 EWSDescription = 18,
00104 EWSPattern = 19,
00105 EAtomPubServiceSession = 20,
00106 EAtomPubAuthClient = 21,
00107 EAccount = 22,
00108 EOviServiceSession = 23,
00109 EOviOAuthClient = 24
00110 };
00111
00112
00113
00121 virtual TDescriptionClassType DescriptionClassType() = 0;
00122
00142 virtual TBool Matches(MSenServiceDescription& aPattern) = 0;
00143
00149 virtual TPtrC8 Contract() = 0;
00150
00158 virtual TInt HasFacetL(const TDesC8& aURI, TBool& aHasFacet) = 0;
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173 virtual TInt FacetValue(TDesC8& aURI, HBufC8*& aValueTo) = 0;
00174
00184 virtual TInt AddFacetL(const CSenFacet& aFacet) = 0;
00185
00197 virtual TInt SetFacetL(const CSenFacet& aFacet) = 0;
00198
00207 virtual TInt RemoveFacet(const TDesC8& aURI) = 0;
00208
00219 virtual TInt FacetsL(RFacetArray& aFacetArray) = 0;
00220
00240 virtual TInt ScoreMatchL(MSenServiceDescription& aPattern) = 0;
00241
00247 virtual TPtrC8 Endpoint() = 0;
00248
00254 virtual TPtrC8 FrameworkId() = 0;
00255
00261 virtual TPtrC8 FrameworkVersion() = 0;
00262
00268 virtual void SetContractL(const TDesC8& aContract) = 0;
00269
00280 virtual void SetEndPointL(const TDesC8& aEndPoint) = 0;
00281
00288 virtual HBufC8* AsXmlL() = 0;
00289
00296 virtual HBufC* AsXmlUnicodeL() = 0;
00297
00303 virtual void WriteAsXMLToL(RWriteStream& aWriteStream) = 0;
00304 };
00305
00306 #endif // M_SEN_SERVICE_DESCRIPTION_H
00307
00308