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
00038
00039 class CSenCredential;
00040 class CSenProviderPolicy;
00041
00042
00043 typedef RPointerArray<CSenCredential> RCredentialList;
00044
00045
00046
00065 class CSenXmlServiceDescription : public CSenDomFragment,
00066 public MSenServiceDescription,
00067 public MSenProviderPolicy
00068 {
00069 public:
00070
00075 IMPORT_C static CSenXmlServiceDescription* NewL();
00076
00082 IMPORT_C static CSenXmlServiceDescription* NewLC();
00083
00089 IMPORT_C static CSenXmlServiceDescription* NewL(const TDesC8& aNamespaceURI);
00090
00097 IMPORT_C static CSenXmlServiceDescription* NewLC(const TDesC8& aNamespaceURI);
00098
00110 IMPORT_C static CSenXmlServiceDescription* NewL(const TDesC8& aEndPoint,
00111 const TDesC8& aContract);
00112
00125 IMPORT_C static CSenXmlServiceDescription* NewLC(const TDesC8& aEndPoint,
00126 const TDesC8& aContract);
00127
00131 IMPORT_C virtual ~CSenXmlServiceDescription();
00132
00133
00134
00147 IMPORT_C void SetFrameworkIdL(const TDesC8& aFrameworkID);
00148
00156 IMPORT_C virtual const TDesC8& NewElementName();
00157
00164 IMPORT_C RCredentialList& Credentials();
00165
00166
00167
00168
00169 IMPORT_C virtual void SetIapIdL(TUint32 aIapId);
00170 IMPORT_C virtual TInt IapId(TUint32& aCurrentIapId);
00171 IMPORT_C virtual void SetIdentityProviderIdsL(
00172 CSenIdentityProviderIdArray8& aList);
00173
00174 IMPORT_C virtual TInt AddIdentityProviderIdL(TDesC8& aProviderId);
00175 IMPORT_C virtual TInt RebuildFrom(MSenProviderPolicy& aTemplate);
00176 IMPORT_C virtual const CSenIdentityProviderIdArray8&
00177 IdentityProviderIds8L();
00178
00179 IMPORT_C virtual TBool Accepts(MSenProviderPolicy& aPolicyPattern);
00180
00181
00182 IMPORT_C TDescriptionClassType DescriptionClassType();
00183 IMPORT_C TBool Matches(MSenServiceDescription& aPattern);
00184 IMPORT_C TPtrC8 Contract();
00185 IMPORT_C virtual TInt HasFacetL(const TDesC8& aURI, TBool& aHasFacet);
00186 IMPORT_C virtual TInt FacetValue(TDesC8& aURI, HBufC8*& aValueTo);
00187 IMPORT_C virtual TInt AddFacetL(const CSenFacet& aFacet);
00188 IMPORT_C virtual TInt SetFacetL(const CSenFacet& aFacet);
00189 IMPORT_C virtual TInt RemoveFacet(const TDesC8& aURI);
00190 IMPORT_C virtual TInt FacetsL(RFacetArray& aFacetArray);
00191 IMPORT_C virtual TInt ScoreMatchL(MSenServiceDescription& aPattern);
00192 IMPORT_C TPtrC8 Endpoint();
00193 IMPORT_C TPtrC8 FrameworkId();
00194 IMPORT_C TPtrC8 FrameworkVersion();
00195 IMPORT_C void SetContractL(const TDesC8& aContract);
00196 IMPORT_C void SetEndPointL(const TDesC8& aEndPoint);
00197
00198
00199
00206 IMPORT_C virtual HBufC8* AsXmlL();
00207
00214 IMPORT_C virtual HBufC* AsXmlUnicodeL();
00215
00221 IMPORT_C virtual void WriteAsXMLToL(RWriteStream& aWriteStream);
00222
00223
00224
00225
00234 IMPORT_C void SetAttributesL(const RAttributeArray& aAttributes);
00235
00248 IMPORT_C void ResumeParsingFromL(const TDesC8& aNsUri,
00249 const TDesC8& aLocalName,
00250 const TDesC8& aQName);
00251
00252 protected:
00253
00258 IMPORT_C CSenXmlServiceDescription(TDescriptionClassType aType);
00259
00263 IMPORT_C void ConstructL();
00264
00271 IMPORT_C void ConstructL(const TDesC8& aNamespaceURI);
00272
00284 IMPORT_C void ConstructL(const TDesC8& aEndPoint, const TDesC8& aContract);
00285
00286
00287
00288
00289
00298 IMPORT_C virtual void StartElementL(const TDesC8& aNsUri,
00299 const TDesC8& aLocalName,
00300 const TDesC8& aQName,
00301 const RAttributeArray& aAttributes);
00302
00303
00311 IMPORT_C virtual void EndElementL(const TDesC8& aNsUri,
00312 const TDesC8& aLocalName,
00313 const TDesC8& aQName);
00314
00315 private:
00316 TInt FacetValueL(TDesC8& aURI, HBufC8*& aValueTo);
00317 TInt RemoveFacetL(const TDesC8& aURI);
00318
00319 protected:
00320
00321 const TDescriptionClassType iType;
00322
00323 private:
00324 HBufC8* iFrameworkId;
00325 CSenCredential* iCredential;
00326 RCredentialList iCredentialList;
00327
00328
00329
00330 TTime iNotOnOrAfter;
00331 CSenProviderPolicy* iProviderPolicy;
00332 };
00333
00334
00335 #endif
00336
00337
00338
00339