00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __LBSREQUESTOR_H__
00022 #define __LBSREQUESTOR_H__
00023
00024 #include <e32base.h>
00025
00026
00027 class RReadStream;
00028 class RWriteStream;
00029
00030
00034 class CRequestorBase : public CBase
00035 {
00036 public:
00042 typedef TInt TRequestorType;
00043
00045 enum _TRequestorType
00046 {
00048 ERequestorUnknown,
00054 ERequestorService,
00059 ERequestorContact
00060 };
00061
00067 typedef TInt TRequestorFormat;
00068
00070 enum _TRequestorFormat
00071 {
00073 EFormatUnknown,
00078 EFormatApplication,
00083 EFormatTelephone,
00085 EFormatUrl,
00087 EFormatMail
00088 };
00089
00093 IMPORT_C ~CRequestorBase();
00094
00107 IMPORT_C void SetRequestorL(TRequestorType aType,
00108 TRequestorFormat aFormat,
00109 const TDesC& aData);
00121 IMPORT_C void GetRequestor(TRequestorType& aType,
00122 TRequestorFormat& aFormat,
00123 TPtrC& aData) const;
00124
00130 IMPORT_C TRequestorType RequestorType() const;
00131
00137 IMPORT_C TRequestorFormat RequestorFormat() const;
00138
00144 IMPORT_C TDesC& RequestorData() const;
00145
00150 IMPORT_C virtual void InternalizeL(RReadStream& aStream);
00151
00156 IMPORT_C virtual void ExternalizeL(RWriteStream& aStream) const;
00157
00158 protected:
00162 IMPORT_C CRequestorBase();
00163
00167 IMPORT_C void ConstructL(TRequestorType aType,
00168 TRequestorFormat aFormat,
00169 const TDesC& aData);
00170
00171
00172 IMPORT_C virtual TAny* ExtendedInterface(TInt aFunctionNumber, TAny* aPtr1, TAny* aPtr2);
00173
00174 protected:
00176 TRequestorType iRequestorType;
00178 TRequestorFormat iFormat;
00179 private:
00181 HBufC* iData;
00183 TAny* iBaseReservedPtr;
00184 };
00185
00186
00196 class CRequestor : public CRequestorBase
00197 {
00198 public:
00214 IMPORT_C static CRequestor* New(TRequestorType aType,
00215 TRequestorFormat aFormat,
00216 const TDesC& aData);
00217
00232 IMPORT_C static CRequestor* NewL(TRequestorType aType,
00233 TRequestorFormat aFormat,
00234 const TDesC& aData);
00235
00251 IMPORT_C static CRequestor* NewLC(TRequestorType aType,
00252 TRequestorFormat aFormat,
00253 const TDesC& aData);
00254
00266 IMPORT_C static CRequestor* NewL(RReadStream& aStream);
00267
00271 ~CRequestor();
00272
00273 private:
00274 CRequestor();
00275 };
00276
00290 class RRequestorStack : public RPointerArray<CRequestor>
00291 {
00292 public:
00297 IMPORT_C void InternalizeL(RReadStream& aStream);
00298
00303 IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
00304
00305 private:
00309 static void CleanupResetAndDestroy(TAny* aArray);
00310
00311 private:
00313 TUint8 iReserved[8];
00314 };
00315
00316
00317 #endif