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