00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SEN_XML_SERVICE_DESCRIPTION_H
00023 #define SEN_XML_SERVICE_DESCRIPTION_H
00024
00025
00026 #include <e32base.h>
00027 #include <e32des8.h>
00028 #include <e32std.h>
00029 #include <MSenServiceDescription.h>
00030 #include <MSenProviderPolicy.h>
00031 #include <SenDomFragment.h>
00032
00033
00034 const TInt KStateParsingCredentials = 12;
00035 const TInt KStateParsingSingleCredential = 122;
00036 const TInt KStateParsingProviderPolicy = 1222;
00037 const TInt KStateParsingServicePolicy = 12222;
00038
00039 _LIT8( KSenAttrSoap12, "SOAP12" );
00040 _LIT8( KSenAttrAddressing, "Addressing" );
00041 _LIT8( KSenAttrClientEntropy, "ClientEntropy" );
00042 _LIT8( KSenAttrTokenType, "TokenType" );
00043 _LIT8( KSenAttrPassportExtensions, "PassportExtensions" );
00044 _LIT8( KSenAttrMetadataEndpoint, "MetadataEndpoint" );
00045 _LIT8( KSenAttrUsernameTokenOverTLS, "UsernameTokenOverTLS" );
00046 _LIT8( KSenAttrPromptUserInfo, "promptUserInfo" );
00047
00048
00049 class CSenCredential;
00050 class CSenProviderPolicy;
00051 class CSenServicePolicy;
00052 class MSenServicePolicy;
00053
00054
00055 typedef RPointerArray<CSenCredential> RCredentialList;
00056
00057
00058
00077 class CSenXmlServiceDescription : public CSenDomFragment,
00078 public MSenServiceDescription,
00079 public MSenProviderPolicy
00080 {
00081 public:
00082
00087 IMPORT_C static CSenXmlServiceDescription* NewL();
00088
00094 IMPORT_C static CSenXmlServiceDescription* NewLC();
00095
00101 IMPORT_C static CSenXmlServiceDescription* NewL(const TDesC8& aNamespaceURI);
00102
00109 IMPORT_C static CSenXmlServiceDescription* NewLC(const TDesC8& aNamespaceURI);
00110
00122 IMPORT_C static CSenXmlServiceDescription* NewL(const TDesC8& aEndPoint,
00123 const TDesC8& aContract);
00124
00137 IMPORT_C static CSenXmlServiceDescription* NewLC(const TDesC8& aEndPoint,
00138 const TDesC8& aContract);
00139
00143 IMPORT_C virtual ~CSenXmlServiceDescription();
00144
00145
00146
00159 IMPORT_C void SetFrameworkIdL(const TDesC8& aFrameworkID);
00160
00168 IMPORT_C virtual const TDesC8& NewElementName();
00169
00176 IMPORT_C RCredentialList& Credentials();
00177
00178
00179
00180
00181 IMPORT_C virtual void SetIapIdL(TUint32 aIapId);
00182 IMPORT_C virtual TInt IapId(TUint32& aCurrentIapId);
00183 IMPORT_C virtual void SetIdentityProviderIdsL(
00184 CSenIdentityProviderIdArray8& aList);
00185 IMPORT_C TInt SetTransportPropertiesL(const TDesC8& aProperties);
00186
00187 IMPORT_C virtual TInt AddIdentityProviderIdL(TDesC8& aProviderId);
00188 IMPORT_C virtual TInt RebuildFrom(MSenProviderPolicy& aTemplate);
00189 IMPORT_C virtual const CSenIdentityProviderIdArray8&
00190 IdentityProviderIds8L();
00191 IMPORT_C TInt TransportPropertiesL(HBufC8*& aProperties);
00192
00193 IMPORT_C virtual TBool Accepts(MSenProviderPolicy& aPolicyPattern);
00194
00195
00196 IMPORT_C TDescriptionClassType DescriptionClassType();
00197 IMPORT_C TBool Matches(MSenServiceDescription& aPattern);
00198 IMPORT_C TPtrC8 Contract();
00199
00200
00208 IMPORT_C virtual TInt HasFacetL(const TDesC8& aURI, TBool& aHasFacet);
00209
00210
00211 IMPORT_C virtual TInt FacetValue(TDesC8& aURI, HBufC8*& aValueTo);
00212 IMPORT_C virtual TInt AddFacetL(const CSenFacet& aFacet);
00213 IMPORT_C virtual TInt SetFacetL(const CSenFacet& aFacet);
00214 IMPORT_C virtual TInt RemoveFacet(const TDesC8& aURI);
00215 IMPORT_C virtual TInt FacetsL(RFacetArray& aFacetArray);
00216
00217
00236 IMPORT_C virtual TInt ScoreMatchL(MSenServiceDescription& aPattern);
00237
00238
00239
00240 IMPORT_C TPtrC8 Endpoint();
00241 IMPORT_C TPtrC8 FrameworkId();
00242 IMPORT_C TPtrC8 FrameworkVersion();
00243 IMPORT_C void SetContractL(const TDesC8& aContract);
00244 IMPORT_C void SetEndPointL(const TDesC8& aEndPoint);
00245
00246
00247
00254 IMPORT_C virtual HBufC8* AsXmlL();
00255
00262 IMPORT_C virtual HBufC* AsXmlUnicodeL();
00263
00269 IMPORT_C virtual void WriteAsXMLToL(RWriteStream& aWriteStream);
00270
00271
00272
00273
00282 IMPORT_C void SetAttributesL(const RAttributeArray& aAttributes);
00283
00296 IMPORT_C void ResumeParsingFromL(const TDesC8& aNsUri,
00297 const TDesC8& aLocalName,
00298 const TDesC8& aQName);
00299
00300 protected:
00301
00306 IMPORT_C CSenXmlServiceDescription(TDescriptionClassType aType);
00307
00311 IMPORT_C void ConstructL();
00312
00319 IMPORT_C void ConstructL(const TDesC8& aNamespaceURI);
00320
00332 IMPORT_C void ConstructL(const TDesC8& aEndPoint, const TDesC8& aContract);
00333
00334
00335
00336
00337
00346 IMPORT_C virtual void StartElementL(const TDesC8& aNsUri,
00347 const TDesC8& aLocalName,
00348 const TDesC8& aQName,
00349 const RAttributeArray& aAttributes);
00350
00351
00359 IMPORT_C virtual void EndElementL(const TDesC8& aNsUri,
00360 const TDesC8& aLocalName,
00361 const TDesC8& aQName);
00362
00363 public:
00382 IMPORT_C TBool HasEqualPrimaryKeysL(MSenServiceDescription& aCandidate);
00383
00384
00385
00386
00387
00388
00389
00390
00391 IMPORT_C TBool IsLocalL();
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429 IMPORT_C TInt SetTransportCueL(const TDesC8& aTransportCue);
00430
00431
00439 IMPORT_C TPtrC8 TransportCue();
00440
00445 IMPORT_C MSenServicePolicy* ServicePolicy();
00446
00457 IMPORT_C TInt SetPolicyL(const TDesC8& aName);
00458
00471 IMPORT_C TInt SetPolicyL(const TDesC8& aName, const TDesC8& aValue);
00472
00490 IMPORT_C TInt SetPolicyL(const TDesC8& aName, const TDesC8& aValue, const TDesC8& aAttribName, const TDesC8& aAttribValue);
00491
00499 IMPORT_C TInt SetProviderIdL( const TDesC8& aProviderID );
00500
00508 IMPORT_C TPtrC8 ProviderId();
00509
00523 IMPORT_C void CSenXmlServiceDescription::SetPromptUserInfoL( TBool aPromptUserInfoMode );
00524
00534 IMPORT_C TBool PromptUserInfo();
00535
00536 public:
00541 IMPORT_C void SetSnapIdL(TUint32 aIapId);
00549 IMPORT_C TInt SnapId(TUint32& aCurrentIapId);
00550
00551 private:
00552 TInt FacetValueL(TDesC8& aURI, HBufC8*& aValueTo);
00553 TInt RemoveFacetL(const TDesC8& aURI);
00554
00555 protected:
00556
00557 const TDescriptionClassType iType;
00558
00559 private:
00560 CSenServicePolicy* iServicePolicy;
00561 CSenCredential* iCredential;
00562 RCredentialList iCredentialList;
00563
00564
00565
00566 TTime iNotOnOrAfter;
00567 CSenProviderPolicy* iProviderPolicy;
00568 };
00569
00570 #endif // SEN_XML_SERVICE_DESCRIPTION_H
00571
00572
00573
00574