SenTransportProperties.h

Go to the documentation of this file.
00001 /*
00002 * =========================================================================
00003 *  Name     : SenTransportProperties.h
00004 *  Part of  : Web Services Framework
00005 *  Created  : 2005-09-26 by Nokia
00006 *  Descr.   :
00007 *   
00008 *  Copyright © 2002-2005 Nokia. All rights reserved.
00009 *  This material, including documentation and any related 
00010 *  computer programs, is protected by copyright controlled by 
00011 *  Nokia. All rights are reserved. Copying, including 
00012 *  reproducing, storing, adapting or translating, any 
00013 *  or all of this material requires the prior written consent of 
00014 *  Nokia. This material also contains confidential 
00015 *  information which may not be disclosed to others without the 
00016 *  prior written consent of Nokia.
00017 * ==============================================================================
00018 */
00019 
00020 
00021 #ifndef SEN_TRANSPORT_PROPERTIES_H
00022 #define SEN_TRANSPORT_PROPERTIES_H
00023 
00024 #include <SenXmlProperties.h>
00025 #include <SenSoapEnvelope.h>
00026 
00027 // CONSTANTS
00028 _LIT8( KIapIdLocalName,              "IapId"            );
00029 _LIT8( KSnapIdLocalName,              "SnapId"            );
00030 _LIT8( KProxyHostLocalName,          "ProxyHost"        );
00031 _LIT8( KProxyPortLocalName,          "ProxyPort"        );
00032 _LIT8( KProxyUsageLocalName,         "ProxyUsage"       );
00033 _LIT8( KSecureDialogLocalName,       "SecureDialog"     );
00034 _LIT8( KDeviceIDLocalName,           "DeviceID"         );
00035 _LIT8( KSoapActionLocalName,         "SOAPAction"       );
00036 _LIT8( KUserAgentLocalName,          "User-Agent"       );
00037 _LIT8( KDownloadFolderLocalName,     "DownloadFolder"   );
00038 _LIT8( KFileAttachmentsLocalName,    "FileAttachments"  );
00039 _LIT8( KMwsNamespaceLocalName,       "MwsNamespace"     );
00040 _LIT8( KSenClientGeneratedMessageId, "MessageID"        );
00041 _LIT8( KSenOnewayMessageOnOff,       "OneWayMessage"    );
00042 
00043 _LIT8( KSenConnectionHeartbeat,      "Heartbeat"        );
00044 _LIT8( KSenConnectionHeartbeatMaxTTL,"MaxTTL"           );
00045 _LIT8( KSenConnectionHeartbeatMinTTL,"MinTTL"           );
00046 _LIT8( KSenEndpointResource,         "EndpointResource" );
00047 
00048 _LIT8( KNCIMConsumerKeyId,      "ConsumerKeyId"         );
00049 _LIT8( KNCIMConsumerSecret,     "ConsumerSecret"        );
00050 _LIT8( KNCIMConsumerServiceId,  "ConsumerServiceId"     );
00051 _LIT8( KNCIMEndpoint,                           "NCIMEndpoint"     );
00052 _LIT8( KNCIMCountry,                            "mcc"     );
00053 
00054 
00055 /*
00056 * Use Bool property to hold value. You can use convenient methods SetBoolPropertyL/BoolPropertyL.
00057 * Value ETrue  - means NO dialog. If any problem occurs, then just an error is returned to the application. 
00058 * Value EFalse - system IAP dialog is shown if any problem occurs
00059 */
00060 _LIT8( KSenIAPDoNotPrompt,           "IAPDoNotPrompt"   );
00061 _LIT8( KSenSNAPDoNotPrompt,           "SNAPDoNotPrompt"   );
00062 
00063 // Property type attribute's name for HTTP headers:
00064 _LIT8( KHttpHeaderType,              "HttpHeader"       );
00065 _LIT8( KAttachmentFileType,          "FileAttachment"   );
00066 
00067 class CSenTransportProperties : public CSenXmlProperties
00068     {
00069     public:
00074         IMPORT_C static CSenTransportProperties* NewL();
00079         IMPORT_C static CSenTransportProperties* NewLC();
00080 
00087         IMPORT_C static CSenTransportProperties* NewL(const TDesC8& aXmlUtf8,
00088                                                           CSenXmlReader& aParser);
00095         IMPORT_C static CSenTransportProperties* NewLC(const TDesC8& aXmlUtf8,
00096                                                            CSenXmlReader& aParser);
00097 
00103         IMPORT_C static CSenTransportProperties* NewL(const CSenElement& aElement);
00109         IMPORT_C static CSenTransportProperties* NewLC(const CSenElement& aElement);
00110     
00111         // From MSenProperties
00112         IMPORT_C virtual void SetReader(CSenXmlReader& aReader);
00113         IMPORT_C virtual TSenPropertiesClassType PropertiesClassType();
00114         IMPORT_C virtual void WriteToL(RWriteStream& aWriteStream);
00115         IMPORT_C virtual void ReadFromL(const TDesC8& aBuffer);
00116         IMPORT_C virtual HBufC8* AsUtf8L();
00117         IMPORT_C virtual HBufC8* AsUtf8LC();
00118         IMPORT_C virtual TInt SetPropertyL(const TDesC8& aName,
00119                                            const TDesC8& aValue);
00120         IMPORT_C virtual TInt PropertyL(const TDesC8& aName, TPtrC8& aValue);
00121         IMPORT_C virtual TInt SetIntPropertyL(const TDesC8& aName,
00122                                               const TInt aValue);
00123         IMPORT_C virtual TInt IntPropertyL(const TDesC8& aName,
00124                                            TInt& aValue);
00125         IMPORT_C virtual TInt SetBoolPropertyL(const TDesC8& aName,
00126                                                const TBool aValue);        
00127         IMPORT_C virtual TInt BoolPropertyL(const TDesC8& aName,
00128                                                 TBool& aValue);
00129         IMPORT_C virtual TInt SetOmittedL(const TDesC8& aName, TBool aValue);
00130         IMPORT_C virtual TInt RemovePropertyL(const TDesC8& aName);
00131         IMPORT_C virtual TBool IsSafeToCast(TSenPropertiesClassType aClass);
00132         IMPORT_C virtual MSenProperties* CloneL() const;
00133         IMPORT_C virtual MSenProperties* Clone(TInt& aOkOrError) const;
00134 
00138         IMPORT_C virtual ~CSenTransportProperties();
00139         
00140         IMPORT_C virtual TInt SetPropertyL(const TDesC8& aName,
00141                                            const TDesC8& aValue,
00142                                            const TDesC8& aType);
00143 
00144         IMPORT_C virtual TInt PropertyL(const TDesC8& aName,
00145                                         TPtrC8& aValue,
00146                                         TPtrC8& aType);
00147                                         
00164         IMPORT_C virtual TInt HeartbeatL(TInt& aDelta);
00165 
00197         IMPORT_C virtual TInt SetHeartbeatL(TInt aDelta);
00198         
00206         IMPORT_C virtual TInt IapIdL(TUint32& aCurrentIapId);
00207 
00212         IMPORT_C virtual void SetIapIdL(TUint32 aIapId);
00213 
00221         IMPORT_C virtual TInt ProxyPortL(TInt& aProxyPort);
00222 
00227         IMPORT_C virtual void SetProxyPortL(TInt aProxyPort);
00228 
00236         IMPORT_C virtual TInt ProxyHostL(TPtrC8& aProxyHost);
00237 
00242         IMPORT_C virtual void SetProxyHostL(const TDesC8& aProxyHost);
00243         
00251         IMPORT_C virtual TInt ProxyUsageL(TBool& aProxyUsage);
00252 
00257         IMPORT_C virtual void SetProxyUsageL(TBool aProxyUsage);
00258 
00266         IMPORT_C virtual TInt SecureDialogL(TBool& aSecureDialog);
00267 
00272         IMPORT_C virtual void SetSecureDialogL(TBool aSecureDialog);
00273         
00281 //        IMPORT_C virtual TInt IAPDialogL(TBool& aIAPDialog);
00282 
00287 //        IMPORT_C virtual void SetIAPDialogL(TBool aIAPDialog);
00288 
00296         IMPORT_C virtual TInt UserAgentL(TPtrC8& aUserAgent);
00297         
00302         IMPORT_C virtual void SetUserAgentL(const TDesC8& aUserAgent);
00303         
00311         IMPORT_C virtual TInt DeviceIDL(TPtrC8& aDeviceID);
00312 
00317         IMPORT_C virtual void SetDeviceIDL(const TDesC8& aDeviceID);
00318         
00326         IMPORT_C virtual TInt SoapActionL(TPtrC8& aAction);
00327         
00332         IMPORT_C virtual void SetSoapActionL(const TDesC8& aAction);
00333         
00338         IMPORT_C virtual void ApplyBindingL(TSOAPVersion aSoapVersion);
00339 
00348         IMPORT_C virtual TInt DownloadFolderL(TPtrC8& aDownloadFolder);
00349         
00354         IMPORT_C virtual void SetDownloadFolderL(const TDesC8& aDownloadFolder);
00355         
00363         IMPORT_C virtual TInt FileAttachmentL(const TDesC8& aCid, HBufC8*& aFileName);
00364         
00372         IMPORT_C virtual TInt SetFileAttachmentL(const TDesC8& aCid, const TDesC8& aFileName);
00373 
00380         IMPORT_C virtual TInt MwsNamespaceL(TPtrC8& aMwsNamespace);
00381         
00388         IMPORT_C virtual void SetMwsNamespaceL(const TDesC8& aMwsNamespace);
00389 
00390 
00397         IMPORT_C virtual TInt MessageIdL(TPtrC8& aMessageId);
00398 
00406         IMPORT_C virtual void SetMessageIdL(const TDesC8& aMessageId);
00407 
00415         IMPORT_C virtual TInt OnewayMessageOnOffL(TBool& aOnewayMessageOnOff);
00416 
00440         IMPORT_C virtual void SetOnewayMessageOnOffL(TBool aOnewayMessageOnOff);
00441 
00452         IMPORT_C virtual TInt SetMaxTimeToLiveL(TInt aMaxTTL);
00453         
00466         IMPORT_C virtual TInt MaxTimeToLiveL(TInt& aMaxTTL);
00467 
00478         IMPORT_C virtual TInt SetMinTimeToLiveL(TInt aMinTTL);
00479 
00491         IMPORT_C virtual TInt MinTimeToLiveL(TInt& aMinTTL);
00492 
00493 
00494 
00504         IMPORT_C virtual TInt SetEndpointResourceL(const TDesC8& aEndpointResource);
00505 
00516         IMPORT_C virtual TInt EndpointResourceL(TPtrC8& aEndpointResource);
00517 
00518 
00519     protected: // base class functions
00520 
00521         IMPORT_C virtual void BaseConstructL(const TDesC8& aLocalname, 
00522                                     const TDesC8& aXml,
00523                                     CSenXmlReader* aParser = NULL);
00524 
00525         IMPORT_C virtual void BaseConstructL(const TDesC8& aNamespace, 
00526                                     const TDesC8& aLocalname, 
00527                                     const TDesC8& aXml,
00528                                     CSenXmlReader* aParser = NULL);
00529 
00530         IMPORT_C virtual void BaseConstructL(const TDesC8& aNamespace, 
00531                                     const TDesC8& aLocalname, 
00532                                     const TDesC8& aQualifiedName, 
00533                                     const TDesC8& aXml,
00534                                     CSenXmlReader* aParser = NULL);
00535 
00536         IMPORT_C virtual void BaseConstructL(const CSenElement& aElement);
00537         
00538         public:
00543         IMPORT_C void SetSnapIdL(TUint32 aSnapId); 
00544 
00552         IMPORT_C TInt SnapIdL(TUint32& aCurrentSnapId); 
00553     protected:
00557         IMPORT_C CSenTransportProperties();
00558         
00559     private:
00560         TInt iFileAttachmentNum;        
00561     };
00562 
00563 #endif // SEN_TRANSPORT_PROPERTIES_H

Copyright © Nokia Corporation 2001-2007
Back to top