epoc32/include/mw/sentransportproperties.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@4
     2
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@4
    14
* Description:     Transport properties class declaration     
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@4
    18
williamr@4
    19
williamr@4
    20
williamr@2
    21
#ifndef SEN_TRANSPORT_PROPERTIES_H
williamr@2
    22
#define SEN_TRANSPORT_PROPERTIES_H
williamr@2
    23
williamr@2
    24
#include <SenXmlProperties.h>
williamr@2
    25
#include <SenSoapEnvelope.h>
williamr@2
    26
williamr@2
    27
// CONSTANTS
williamr@2
    28
_LIT8( KIapIdLocalName,              "IapId"            );
williamr@2
    29
_LIT8( KSnapIdLocalName,              "SnapId"            );
williamr@2
    30
_LIT8( KProxyHostLocalName,          "ProxyHost"        );
williamr@2
    31
_LIT8( KProxyPortLocalName,          "ProxyPort"        );
williamr@2
    32
_LIT8( KProxyUsageLocalName,         "ProxyUsage"       );
williamr@2
    33
_LIT8( KSecureDialogLocalName,       "SecureDialog"     );
williamr@2
    34
_LIT8( KDeviceIDLocalName,           "DeviceID"         );
williamr@2
    35
_LIT8( KSoapActionLocalName,         "SOAPAction"       );
williamr@2
    36
_LIT8( KUserAgentLocalName,          "User-Agent"       );
williamr@2
    37
_LIT8( KDownloadFolderLocalName,     "DownloadFolder"   );
williamr@2
    38
_LIT8( KFileAttachmentsLocalName,    "FileAttachments"  );
williamr@2
    39
_LIT8( KMwsNamespaceLocalName,       "MwsNamespace"     );
williamr@2
    40
_LIT8( KSenClientGeneratedMessageId, "MessageID"        );
williamr@2
    41
_LIT8( KSenOnewayMessageOnOff,       "OneWayMessage"    );
williamr@2
    42
williamr@2
    43
_LIT8( KSenConnectionHeartbeat,      "Heartbeat"        );
williamr@2
    44
_LIT8( KSenConnectionHeartbeatMaxTTL,"MaxTTL"           );
williamr@2
    45
_LIT8( KSenConnectionHeartbeatMinTTL,"MinTTL"           );
williamr@2
    46
_LIT8( KSenEndpointResource,         "EndpointResource" );
williamr@4
    47
_LIT8( KSenConnectionProxyUrl,"ProxyUrl"           );
williamr@2
    48
williamr@2
    49
_LIT8( KNCIMConsumerKeyId,      "ConsumerKeyId"         );
williamr@2
    50
_LIT8( KNCIMConsumerSecret,     "ConsumerSecret"        );
williamr@2
    51
_LIT8( KNCIMConsumerServiceId,  "ConsumerServiceId"     );
williamr@2
    52
_LIT8( KNCIMEndpoint,				"NCIMEndpoint"     );
williamr@4
    53
_LIT8( KSenConnectionRetryDelta,     "RetryDelta" );
williamr@4
    54
_LIT8( KSenConnectionRetryMaxTTL,    "RetryMaxTTL");
williamr@4
    55
_LIT8( KSenConnectionRetryMinTTL,    "RetryMinTTL");
williamr@2
    56
_LIT8( KNCIMCountry,				"mcc"     );
williamr@2
    57
williamr@2
    58
williamr@2
    59
/*
williamr@2
    60
* Use Bool property to hold value. You can use convenient methods SetBoolPropertyL/BoolPropertyL.
williamr@2
    61
* Value ETrue  - means NO dialog. If any problem occurs, then just an error is returned to the application. 
williamr@2
    62
* Value EFalse - system IAP dialog is shown if any problem occurs
williamr@2
    63
*/
williamr@2
    64
_LIT8( KSenIAPDoNotPrompt,           "IAPDoNotPrompt"   );
williamr@2
    65
_LIT8( KSenSNAPDoNotPrompt,           "SNAPDoNotPrompt"   );
williamr@2
    66
williamr@2
    67
// Property type attribute's name for HTTP headers:
williamr@2
    68
_LIT8( KHttpHeaderType,              "HttpHeader"       );
williamr@2
    69
_LIT8( KAttachmentFileType,          "FileAttachment"   );
williamr@2
    70
williamr@4
    71
/* Property type attribute's name for Deflate Filters:
williamr@4
    72
   Set this http transport property for the enabling of
williamr@4
    73
   http compression.Http data Compression works from 
williamr@4
    74
   server to client side.
williamr@4
    75
 */
williamr@4
    76
_LIT8( KWsPropertyValueHttpFilterDeflate, "HttpFilterDeflate"     );
williamr@4
    77
williamr@2
    78
class CSenTransportProperties : public CSenXmlProperties
williamr@2
    79
    {
williamr@2
    80
    public:
williamr@2
    81
        /**
williamr@2
    82
        * Basic constructor.
williamr@2
    83
        * @return a pointer to new CSenTransportProperties class instance.
williamr@2
    84
        */
williamr@2
    85
        IMPORT_C static CSenTransportProperties* NewL();
williamr@2
    86
        /**
williamr@2
    87
        * Basic constructor.
williamr@2
    88
        * @return a pointer to new CSenTransportProperties class instance.
williamr@2
    89
        */
williamr@2
    90
        IMPORT_C static CSenTransportProperties* NewLC();
williamr@2
    91
williamr@2
    92
        /**
williamr@2
    93
        * Basic constructor.
williamr@2
    94
		* @param aXmlUtf8 
williamr@2
    95
    	* @param aParser It is a XML reader        
williamr@2
    96
        * @return a pointer to new CSenTransportProperties class instance.
williamr@2
    97
        */
williamr@2
    98
        IMPORT_C static CSenTransportProperties* NewL(const TDesC8& aXmlUtf8,
williamr@2
    99
                                                          CSenXmlReader& aParser);
williamr@2
   100
        /**
williamr@2
   101
        * Basic constructor.
williamr@2
   102
		* @param aXmlUtf8 
williamr@2
   103
    	* @param aParser It is a XML reader        
williamr@2
   104
        * @return a pointer to new CSenTransportProperties class instance.
williamr@2
   105
        */
williamr@2
   106
        IMPORT_C static CSenTransportProperties* NewLC(const TDesC8& aXmlUtf8,
williamr@2
   107
                                                           CSenXmlReader& aParser);
williamr@2
   108
williamr@2
   109
        /**
williamr@2
   110
        * Basic constructor.
williamr@2
   111
		* @param aElement
williamr@2
   112
        * @return a pointer to new CSenTransportProperties class instance.
williamr@2
   113
        */
williamr@2
   114
        IMPORT_C static CSenTransportProperties* NewL(const CSenElement& aElement);
williamr@2
   115
        /**
williamr@2
   116
        * Basic constructor.
williamr@2
   117
		* @param aElement
williamr@2
   118
        * @return a pointer to new CSenTransportProperties class instance.
williamr@2
   119
        */
williamr@2
   120
        IMPORT_C static CSenTransportProperties* NewLC(const CSenElement& aElement);
williamr@2
   121
    
williamr@2
   122
        // From MSenProperties
williamr@2
   123
        IMPORT_C virtual void SetReader(CSenXmlReader& aReader);
williamr@2
   124
        IMPORT_C virtual TSenPropertiesClassType PropertiesClassType();
williamr@2
   125
        IMPORT_C virtual void WriteToL(RWriteStream& aWriteStream);
williamr@2
   126
        IMPORT_C virtual void ReadFromL(const TDesC8& aBuffer);
williamr@2
   127
        IMPORT_C virtual HBufC8* AsUtf8L();
williamr@2
   128
        IMPORT_C virtual HBufC8* AsUtf8LC();
williamr@2
   129
        IMPORT_C virtual TInt SetPropertyL(const TDesC8& aName,
williamr@2
   130
                                           const TDesC8& aValue);
williamr@2
   131
        IMPORT_C virtual TInt PropertyL(const TDesC8& aName, TPtrC8& aValue);
williamr@2
   132
        IMPORT_C virtual TInt SetIntPropertyL(const TDesC8& aName,
williamr@2
   133
                                              const TInt aValue);
williamr@2
   134
        IMPORT_C virtual TInt IntPropertyL(const TDesC8& aName,
williamr@2
   135
                                           TInt& aValue);
williamr@2
   136
        IMPORT_C virtual TInt SetBoolPropertyL(const TDesC8& aName,
williamr@2
   137
                                               const TBool aValue);        
williamr@2
   138
        IMPORT_C virtual TInt BoolPropertyL(const TDesC8& aName,
williamr@2
   139
                                                TBool& aValue);
williamr@2
   140
        IMPORT_C virtual TInt SetOmittedL(const TDesC8& aName, TBool aValue);
williamr@2
   141
        IMPORT_C virtual TInt RemovePropertyL(const TDesC8& aName);
williamr@2
   142
        IMPORT_C virtual TBool IsSafeToCast(TSenPropertiesClassType aClass);
williamr@2
   143
        IMPORT_C virtual MSenProperties* CloneL() const;
williamr@2
   144
        IMPORT_C virtual MSenProperties* Clone(TInt& aOkOrError) const;
williamr@2
   145
williamr@2
   146
       /**
williamr@2
   147
        * Destructor.
williamr@2
   148
        */
williamr@2
   149
        IMPORT_C virtual ~CSenTransportProperties();
williamr@2
   150
        
williamr@2
   151
        IMPORT_C virtual TInt SetPropertyL(const TDesC8& aName,
williamr@2
   152
                                           const TDesC8& aValue,
williamr@2
   153
                                           const TDesC8& aType);
williamr@2
   154
williamr@2
   155
        IMPORT_C virtual TInt PropertyL(const TDesC8& aName,
williamr@2
   156
                                        TPtrC8& aValue,
williamr@2
   157
                                        TPtrC8& aType);
williamr@2
   158
                                        
williamr@2
   159
        /**
williamr@2
   160
        * Gets the (connection) heartbeat property value as int.
williamr@2
   161
        * @param aDelta     A TInt reference to be filled in with the
williamr@2
   162
        *                       value of the heartbeat (in seconds).
williamr@2
   163
        *                       Positive value means that a heartbeat
williamr@2
   164
        *                       messages are sent to backend, keeping
williamr@2
   165
        *                       the socket connection open (longlived
williamr@2
   166
        *                       connection). Keeping heartbeat may be
williamr@2
   167
        *                       costy, but increases performance in
williamr@2
   168
        *                       scenarios, where multiple network
williamr@2
   169
        *                       transactions take place within short
williamr@2
   170
        *                       period (time window).
williamr@2
   171
        * @return             KErrNone if no error, or some of the system
williamr@2
   172
        *                       wide error codes.
williamr@2
   173
        *                     KErrNotFound if shortlive connection defined
williamr@2
   174
        */
williamr@2
   175
        IMPORT_C virtual TInt HeartbeatL(TInt& aDelta);
williamr@2
   176
williamr@2
   177
        /**
williamr@2
   178
        * Sets the (connection) heartbeat property value as int.
williamr@2
   179
        * Note, that with some transports, like vTCP, the heartbeat
williamr@2
   180
        * can also be used to control connection modes (longlive
williamr@2
   181
        * vs. shortlive connection). 
williamr@2
   182
        * Hertbeat value is called also as delta.
williamr@2
   183
        * 
williamr@2
   184
        * Together with delta You can also set parameters Min & Max TTL
williamr@2
   185
        * Long and short connection is set in different way, below guider.
williamr@2
   186
        *
williamr@2
   187
        * To setup longlive connection:
williamr@2
   188
        *   delta   : user defined
williamr@2
   189
        *   min TTL : If not specified then the default value of 90 sec will be used
williamr@2
   190
        *   max TTL : If not specified then the default value 1800 sec will be used
williamr@2
   191
        *
williamr@2
   192
        * To setup shortlive connection:
williamr@2
   193
        *   delta   : -1
williamr@2
   194
        *   min TTL : If not specified then the default value of 90 sec will be used
williamr@2
   195
        *   max TTL : ignored
williamr@2
   196
        *
williamr@2
   197
        * So, providing a negative value
williamr@2
   198
        * (-1) can be utilized to disable heartbeat and to switch
williamr@2
   199
        * the connection mode to a short lived state. With vTCP
williamr@2
   200
        * transport, if heartbeat of -1 is set, the socket will be
williamr@2
   201
        * kept open only for effective timeout value (shortlived), 
williamr@2
   202
        * 
williamr@2
   203
        * @param aDelta    TInt reference to be filled in with 
williamr@2
   204
        *                      the value of the heartbeat (in seconds)
williamr@2
   205
        * @return              KErrNone if no error, or some of the system
williamr@2
   206
        *                      wide error codes.
williamr@2
   207
        */
williamr@2
   208
        IMPORT_C virtual TInt SetHeartbeatL(TInt aDelta);
williamr@2
   209
        
williamr@2
   210
        /**
williamr@2
   211
        * Gets the IAP ID.
williamr@2
   212
        * @param aCurrentIapId  A TUint32 reference to be filled in with the
williamr@2
   213
        *                       value of the IAP ID.
williamr@2
   214
        * @return               KErrNone if no error, or some of the system
williamr@2
   215
        *                       wide error codes.
williamr@2
   216
        */
williamr@2
   217
        IMPORT_C virtual TInt IapIdL(TUint32& aCurrentIapId);
williamr@2
   218
williamr@2
   219
        /**
williamr@2
   220
        * Sets the IAP ID.
williamr@2
   221
        * @param aIapId is the new IAP ID.
williamr@2
   222
        */
williamr@2
   223
        IMPORT_C virtual void SetIapIdL(TUint32 aIapId);
williamr@2
   224
williamr@2
   225
        /**
williamr@2
   226
        * Gets the Proxy Port.
williamr@2
   227
        * @param aProxyPort  A TInt reference to be filled in with the
williamr@2
   228
        *                    value of the Proxy Port.
williamr@2
   229
        * @return            KErrNone if no error, or some of the system
williamr@2
   230
        *                    wide error codes.
williamr@2
   231
        */
williamr@2
   232
        IMPORT_C virtual TInt ProxyPortL(TInt& aProxyPort);
williamr@2
   233
williamr@2
   234
        /**
williamr@2
   235
        * Sets the Proxy Port.
williamr@2
   236
        * @param aProxyPort is the new Proxy Port.
williamr@2
   237
        */
williamr@2
   238
        IMPORT_C virtual void SetProxyPortL(TInt aProxyPort);
williamr@2
   239
williamr@2
   240
        /**
williamr@2
   241
        * Gets the Proxy Host.
williamr@2
   242
        * @param aProxyHost  A TPtrC8 reference to be filled in with the
williamr@2
   243
        *                    value of the Proxy Host.
williamr@2
   244
        * @return            KErrNone if no error, or some of the system
williamr@2
   245
        *                    wide error codes.
williamr@2
   246
        */
williamr@2
   247
        IMPORT_C virtual TInt ProxyHostL(TPtrC8& aProxyHost);
williamr@2
   248
williamr@2
   249
        /**
williamr@2
   250
        * Sets the Proxy Host.
williamr@2
   251
        * @param aProxyHost is the new Proxy Host.
williamr@2
   252
        */
williamr@2
   253
        IMPORT_C virtual void SetProxyHostL(const TDesC8& aProxyHost);
williamr@2
   254
        
williamr@2
   255
        /**
williamr@2
   256
        * Gets the Proxy Usage flag.
williamr@2
   257
        * @param aProxyUsage A TBool reference to be filled in with the
williamr@2
   258
        *                    value of the Proxy Usage.
williamr@2
   259
        * @return            KErrNone if no error, or some of the system
williamr@2
   260
        *                    wide error codes.
williamr@2
   261
        */
williamr@2
   262
        IMPORT_C virtual TInt ProxyUsageL(TBool& aProxyUsage);
williamr@2
   263
williamr@2
   264
        /**
williamr@2
   265
        * Sets the Proxy Usage flag.
williamr@2
   266
        * @param aProxyUsage is the new value for Proxy Usage.
williamr@2
   267
        */
williamr@2
   268
        IMPORT_C virtual void SetProxyUsageL(TBool aProxyUsage);
williamr@2
   269
williamr@2
   270
        /**
williamr@2
   271
        * Gets the information if SecureDialog is shown or not.
williamr@2
   272
        * @param aProxyUsage A TBool reference to be filled in with the
williamr@2
   273
        *                    value of the SecureDialog flag.
williamr@2
   274
        * @return            KErrNone if no error, or some of the system
williamr@2
   275
        *                    wide error codes.
williamr@2
   276
        */
williamr@2
   277
        IMPORT_C virtual TInt SecureDialogL(TBool& aSecureDialog);
williamr@2
   278
williamr@2
   279
        /**
williamr@2
   280
        * Sets the flag which controls showing of SecureDialog.
williamr@2
   281
        * @param aSecureDialog is the new value for SecureDialog flag.
williamr@2
   282
        */
williamr@2
   283
        IMPORT_C virtual void SetSecureDialogL(TBool aSecureDialog);
williamr@2
   284
        
williamr@2
   285
        /**
williamr@2
   286
        * Gets the information if IAPDialog is shown or not.
williamr@2
   287
        * @param aIAPDialog A TBool reference to be filled in with the
williamr@2
   288
        *                   value of the SecureDialog flag.
williamr@2
   289
        * @return           KErrNone if no error, or some of the system
williamr@2
   290
        *                   wide error codes.
williamr@2
   291
        */
williamr@2
   292
//        IMPORT_C virtual TInt IAPDialogL(TBool& aIAPDialog);
williamr@2
   293
williamr@2
   294
        /**
williamr@2
   295
        * Sets the flag which controls showing of IAPDialog.
williamr@2
   296
        * @param aIAPDialog is the new value for IAPDialog flag.
williamr@2
   297
        */
williamr@2
   298
//        IMPORT_C virtual void SetIAPDialogL(TBool aIAPDialog);
williamr@2
   299
williamr@2
   300
        /**
williamr@2
   301
        * Gets the UserAgent.
williamr@2
   302
        * @param aUserAgent  A TPtrC8 reference to be filled in with the
williamr@2
   303
        *                    value of the UserAgent.
williamr@2
   304
        * @return            KErrNone if no error, or some of the system
williamr@2
   305
        *                    wide error codes.
williamr@2
   306
        */
williamr@2
   307
        IMPORT_C virtual TInt UserAgentL(TPtrC8& aUserAgent);
williamr@2
   308
        
williamr@2
   309
        /**
williamr@2
   310
        * Sets the UserAgent.
williamr@2
   311
        * @param aUserAgent is the new User Agent.
williamr@2
   312
        */
williamr@2
   313
        IMPORT_C virtual void SetUserAgentL(const TDesC8& aUserAgent);
williamr@2
   314
        
williamr@2
   315
        /**
williamr@2
   316
        * Gets the device ID
williamr@2
   317
        * @param aDeviceID  A TPtrC8 reference to be filled in with the
williamr@2
   318
        *                    value of the Device ID.
williamr@2
   319
        * @return            KErrNone if no error, or some of the system
williamr@2
   320
        *                    wide error codes.
williamr@2
   321
        */
williamr@2
   322
        IMPORT_C virtual TInt DeviceIDL(TPtrC8& aDeviceID);
williamr@2
   323
williamr@2
   324
        /**
williamr@2
   325
        * Sets the Device ID.
williamr@2
   326
        * @param aDeviceID is the new Device ID.
williamr@2
   327
        */
williamr@2
   328
        IMPORT_C virtual void SetDeviceIDL(const TDesC8& aDeviceID);
williamr@2
   329
        
williamr@2
   330
        /**
williamr@2
   331
        * Gets the Action of message
williamr@2
   332
        * @param aAction A TPtrC8 reference to be filled in with the
williamr@2
   333
        *                    value of the Action.
williamr@2
   334
        * @return            KErrNone if no error, or some of the system
williamr@2
   335
        *                    wide error codes.
williamr@2
   336
        */
williamr@2
   337
        IMPORT_C virtual TInt SoapActionL(TPtrC8& aAction);
williamr@2
   338
        
williamr@2
   339
        /**
williamr@2
   340
        * Sets the Action.
williamr@2
   341
        * @param aAction is the new Soap Action.
williamr@2
   342
        */
williamr@2
   343
        IMPORT_C virtual void SetSoapActionL(const TDesC8& aAction);
williamr@2
   344
        
williamr@2
   345
        /**
williamr@2
   346
        * Apply binding.
williamr@2
   347
        * @param aSoapVersion is the version of Soap (1.1 or 1.2).
williamr@2
   348
        */
williamr@2
   349
        IMPORT_C virtual void ApplyBindingL(TSOAPVersion aSoapVersion);
williamr@2
   350
williamr@2
   351
        /**
williamr@2
   352
        * Gets download folder for incoming BLOB (binary large objects)
williamr@2
   353
        * @param aDownloadFolder - A TPtrC8 reference to be filled in with the
williamr@2
   354
        *                    value of the shared, public folder for downloaded 
williamr@2
   355
        *                    content
williamr@2
   356
        * @return            KErrNone if no error, or some of the system
williamr@2
   357
        *                    wide error codes.
williamr@2
   358
        */
williamr@2
   359
        IMPORT_C virtual TInt DownloadFolderL(TPtrC8& aDownloadFolder);
williamr@2
   360
        
williamr@2
   361
        /**
williamr@2
   362
        * Sets download folder for incoming BLOB (binary large objects)
williamr@2
   363
        * @param aDownloadFolder shared, public folder for downloaded content
williamr@2
   364
        */
williamr@2
   365
        IMPORT_C virtual void SetDownloadFolderL(const TDesC8& aDownloadFolder);
williamr@2
   366
        
williamr@2
   367
        /**
williamr@2
   368
        * Gets filename of file attachment
williamr@2
   369
        * @param aCid - cid for filename
williamr@2
   370
        * @param aFileName - filename of file attachment with current cid
williamr@2
   371
        * @return            KErrNone if no error, or some of the system
williamr@2
   372
        *                    wide error codes.
williamr@2
   373
        */
williamr@2
   374
        IMPORT_C virtual TInt FileAttachmentL(const TDesC8& aCid, HBufC8*& aFileName);
williamr@2
   375
        
williamr@2
   376
        /**
williamr@2
   377
        * Sets filename of file attachment
williamr@2
   378
        * @param aCid - cid for filename
williamr@2
   379
        * @param aFileName - filename of file attachment with current cid
williamr@2
   380
        * @return            KErrNone if no error, or some of the system
williamr@2
   381
        *                    wide error codes.
williamr@2
   382
        */
williamr@2
   383
        IMPORT_C virtual TInt SetFileAttachmentL(const TDesC8& aCid, const TDesC8& aFileName);
williamr@2
   384
williamr@2
   385
        /**
williamr@2
   386
        * Gets namespace of Microsoft schema
williamr@2
   387
        * @param aMwsNamespace - namespace
williamr@2
   388
        * @return            KErrNone if no error, or some of the system
williamr@2
   389
        *                    wide error codes.
williamr@2
   390
        */
williamr@2
   391
        IMPORT_C virtual TInt MwsNamespaceL(TPtrC8& aMwsNamespace);
williamr@2
   392
        
williamr@2
   393
        /**
williamr@2
   394
        * Sets namespace of Microsoft schema
williamr@2
   395
        * @param aMwsNamespace - namespace
williamr@2
   396
        * @return            KErrNone if no error, or some of the system
williamr@2
   397
        *                    wide error codes.
williamr@2
   398
        */
williamr@2
   399
        IMPORT_C virtual void SetMwsNamespaceL(const TDesC8& aMwsNamespace);
williamr@2
   400
williamr@2
   401
williamr@2
   402
        /**
williamr@2
   403
        * Gets message ID
williamr@2
   404
        * @param aMessageId - is the id of the message
williamr@2
   405
        * @return            KErrNone if no error, or some of the system
williamr@2
   406
        *                    wide error codes.
williamr@2
   407
        */
williamr@2
   408
        IMPORT_C virtual TInt MessageIdL(TPtrC8& aMessageId);
williamr@2
   409
williamr@2
   410
        /**
williamr@2
   411
        * Sets message ID. Typically, this property is set per each message, instead of
williamr@2
   412
        * applying the same message ID for whole consumer session (service connection)
williamr@2
   413
        * @param aMessageID - is the ID of the message
williamr@2
   414
        * @return            KErrNone if no error, or some of the system
williamr@2
   415
        *                    wide error codes.
williamr@2
   416
        */
williamr@2
   417
        IMPORT_C virtual void SetMessageIdL(const TDesC8& aMessageId);
williamr@2
   418
williamr@2
   419
        /**
williamr@2
   420
        * Gets one-way message mode.
williamr@2
   421
        * @param aOnewayMsgOnOff A TBool reference to be filled in with the
williamr@2
   422
        *                    value of the one-way message mode.
williamr@2
   423
        * @return            KErrNone if no error, or some of the system
williamr@2
   424
        *                    wide error codes.
williamr@2
   425
        */
williamr@2
   426
        IMPORT_C virtual TInt OnewayMessageOnOffL(TBool& aOnewayMessageOnOff);
williamr@2
   427
williamr@2
   428
        /**
williamr@2
   429
        * Sets the one-way message mode on/off. Typically, one-way
williamr@2
   430
        * messages are rarely used by default: instead, a request-
williamr@2
   431
        * response pair (consumer[request]<->[response]provider)
williamr@2
   432
        * transaction takes place.
williamr@2
   433
        * However, if one-way message mode is enabled, sending such
williamr@2
   434
        * message will typically result immediate callback from
williamr@2
   435
        * the transport (plug-in) itself. This means, that the
williamr@2
   436
        * actual service response from the provider is not being
williamr@2
   437
        * waited. 
williamr@2
   438
        * Common use case to enable one-way message is when service
williamr@2
   439
        * connection is used in transmitting *responses* to notification
williamr@2
   440
        * request(s) that some remote consumer (from outside device) has 
williamr@2
   441
        * sent earlier.
williamr@2
   442
        * Such notification requests may thus be received via hostlet 
williamr@2
   443
        * connection (hc), and by enabling one-way message, once can reply
williamr@2
   444
        * via service connection, instead of calling hc->RespondL method.
williamr@2
   445
        * Furthermore, application might wish to enable one-way message
williamr@2
   446
        * mode to hostlet connection, if it is not interested of replying
williamr@2
   447
        * to these two-way notifications via hostlet connection, but wishes
williamr@2
   448
        * to use service connection instead.
williamr@2
   449
        * @param aOnewayMessageOnOff is the new value of one-way message mode.
williamr@2
   450
        */
williamr@2
   451
        IMPORT_C virtual void SetOnewayMessageOnOffL(TBool aOnewayMessageOnOff);
williamr@2
   452
williamr@2
   453
        /**
williamr@2
   454
        * Sets the (connection) Max TTL for longlive connection.
williamr@2
   455
        *
williamr@2
   456
        * @see SetHeartbeatL(TInt aDelta)
williamr@2
   457
        *
williamr@2
   458
        * @param aMaxTTL      TInt reference to be filled in with 
williamr@2
   459
        *                      the value of the max TTL (in seconds)
williamr@2
   460
        * @return              KErrNone if no error, or some of the system
williamr@2
   461
        *                       wide error codes.
williamr@2
   462
        */
williamr@2
   463
        IMPORT_C virtual TInt SetMaxTimeToLiveL(TInt aMaxTTL);
williamr@2
   464
        
williamr@2
   465
        /**
williamr@2
   466
        * Gets the (connection) max TTL property value as int.
williamr@2
   467
        *
williamr@2
   468
        * @see SetHeartbeatL(TInt aDelta)
williamr@2
   469
        *
williamr@2
   470
        * @param aMaxTTL       A TInt reference to be filled in with the
williamr@2
   471
        *                       value of the max TTL (in seconds).
williamr@2
   472
        *
williamr@2
   473
        * @return           KErrNotFound if shortlive connection defined
williamr@2
   474
        *                   KErrNone if no error, or some of the system
williamr@2
   475
        *                       wide error codes.
williamr@2
   476
        */
williamr@2
   477
        IMPORT_C virtual TInt MaxTimeToLiveL(TInt& aMaxTTL);
williamr@2
   478
williamr@2
   479
        /**
williamr@2
   480
        * Sets the (connection) Min TTL
williamr@2
   481
        *
williamr@2
   482
        * @see SetHeartbeatL(TInt aDelta)
williamr@2
   483
        *
williamr@2
   484
        * @param aMaxTTL      TInt reference to be filled in with 
williamr@2
   485
        *                      the value of the min TTL (in seconds)
williamr@2
   486
        * @return              KErrNone if no error, or some of the system
williamr@2
   487
        *                       wide error codes.
williamr@2
   488
        */
williamr@2
   489
        IMPORT_C virtual TInt SetMinTimeToLiveL(TInt aMinTTL);
williamr@2
   490
williamr@2
   491
        /**
williamr@2
   492
        * Gets the (connection) min TTL property value as int.
williamr@2
   493
        *
williamr@2
   494
        * @see SetHeartbeatL(TInt aDelta)
williamr@2
   495
        *
williamr@2
   496
        * @param aMinTTL     A TInt reference to be filled in with the
williamr@2
   497
        *                       value of the min TTL (in seconds).
williamr@2
   498
        *
williamr@2
   499
        * @return           KErrNone if no error, or some of the system
williamr@2
   500
        *                       wide error codes.
williamr@2
   501
        */
williamr@2
   502
        IMPORT_C virtual TInt MinTimeToLiveL(TInt& aMinTTL);
williamr@2
   503
williamr@2
   504
williamr@2
   505
williamr@2
   506
        /**
williamr@2
   507
        * Sets resource property value  for endpoint
williamr@2
   508
        *
williamr@2
   509
        *
williamr@2
   510
        * @param aEndpointResource - is the suffix for endpoint
williamr@2
   511
        *                      
williamr@2
   512
        * @return              KErrNone if no error, or some of the system
williamr@2
   513
        *                       wide error codes.
williamr@2
   514
        */
williamr@2
   515
        IMPORT_C virtual TInt SetEndpointResourceL(const TDesC8& aEndpointResource);
williamr@2
   516
williamr@2
   517
        /**
williamr@2
   518
        * Gets resource property value for endpoint
williamr@2
   519
        *
williamr@2
   520
        *
williamr@2
   521
        * @param aEndpointResource - is the suffix for endpoint
williamr@2
   522
        *                      
williamr@2
   523
        *
williamr@2
   524
        * @return           KErrNone if no error, or some of the system
williamr@2
   525
        *                       wide error codes.
williamr@2
   526
        */
williamr@2
   527
        IMPORT_C virtual TInt EndpointResourceL(TPtrC8& aEndpointResource);
williamr@2
   528
williamr@2
   529
williamr@2
   530
    protected: // base class functions
williamr@2
   531
williamr@2
   532
        IMPORT_C virtual void BaseConstructL(const TDesC8& aLocalname, 
williamr@2
   533
                                    const TDesC8& aXml,
williamr@2
   534
                                    CSenXmlReader* aParser = NULL);
williamr@2
   535
williamr@2
   536
        IMPORT_C virtual void BaseConstructL(const TDesC8& aNamespace, 
williamr@2
   537
                                    const TDesC8& aLocalname, 
williamr@2
   538
                                    const TDesC8& aXml,
williamr@2
   539
                                    CSenXmlReader* aParser = NULL);
williamr@2
   540
williamr@2
   541
        IMPORT_C virtual void BaseConstructL(const TDesC8& aNamespace, 
williamr@2
   542
                                    const TDesC8& aLocalname, 
williamr@2
   543
                                    const TDesC8& aQualifiedName, 
williamr@2
   544
                                    const TDesC8& aXml,
williamr@2
   545
                                    CSenXmlReader* aParser = NULL);
williamr@2
   546
williamr@2
   547
        IMPORT_C virtual void BaseConstructL(const CSenElement& aElement);
williamr@2
   548
        
williamr@2
   549
	public:
williamr@2
   550
        /**
williamr@2
   551
        * Sets the SNAP ID.
williamr@2
   552
        * @param aSnapId is the new SNAP ID.
williamr@2
   553
        */
williamr@2
   554
        IMPORT_C void SetSnapIdL(TUint32 aSnapId); 
williamr@2
   555
williamr@2
   556
        /**
williamr@2
   557
        * Gets the SNAP ID.
williamr@2
   558
        * @param aCurrentSnapId  A TUint32 reference to be filled in with the
williamr@2
   559
        *                       value of the SNAP ID.
williamr@2
   560
        * @return               KErrNone if no error, or some of the system
williamr@2
   561
        *                       wide error codes.
williamr@2
   562
        */
williamr@2
   563
        IMPORT_C TInt SnapIdL(TUint32& aCurrentSnapId); 
williamr@2
   564
    protected:
williamr@2
   565
        /**
williamr@2
   566
        * Constructor.
williamr@2
   567
        */
williamr@2
   568
        IMPORT_C CSenTransportProperties();
williamr@2
   569
        
williamr@2
   570
    private:
williamr@2
   571
        TInt iFileAttachmentNum;        
williamr@2
   572
    };
williamr@2
   573
williamr@2
   574
#endif // SEN_TRANSPORT_PROPERTIES_H