williamr@2
|
1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// 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
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
|
williamr@2
|
17 |
|
williamr@2
|
18 |
/**
|
williamr@2
|
19 |
@file RHTTPConnectionInfo.h
|
williamr@2
|
20 |
@warning : This file contains Rose Model ID comments - please do not delete
|
williamr@2
|
21 |
*/
|
williamr@2
|
22 |
|
williamr@2
|
23 |
#ifndef __RHTTPCONNECTIONINFO_H__
|
williamr@2
|
24 |
#define __RHTTPCONNECTIONINFO_H__
|
williamr@2
|
25 |
|
williamr@2
|
26 |
// System includes
|
williamr@2
|
27 |
#include <e32std.h>
|
williamr@2
|
28 |
#include <stringpool.h>
|
williamr@2
|
29 |
#include <http/rhttppropertyset.h>
|
williamr@2
|
30 |
|
williamr@2
|
31 |
//##ModelId=3C4C187A01CA
|
williamr@2
|
32 |
class RHTTPConnectionInfo : public RHTTPPropertySet
|
williamr@2
|
33 |
/**
|
williamr@2
|
34 |
The RHTTPConnectionInfo is used for setting/getting
|
williamr@2
|
35 |
values used for setting up a connection over a protocol. All methods are inherited
|
williamr@2
|
36 |
directly from RHTTPPropertySet.
|
williamr@2
|
37 |
|
williamr@2
|
38 |
To lookup/change any of the following properties, use
|
williamr@2
|
39 |
RHTTPPropertySet::Property(...) and RHTTPPropertySet::SetPropertyL(...)
|
williamr@2
|
40 |
|
williamr@2
|
41 |
To remove properties, use RHTTPPropertySet::RemoveProperty(...) for a named property,
|
williamr@2
|
42 |
or RHTTPPropertySet::RemoveAllProperties() for all.
|
williamr@2
|
43 |
|
williamr@2
|
44 |
The following values are currently defined. Note that new values
|
williamr@2
|
45 |
could be added by individual filters. In general, properties
|
williamr@2
|
46 |
should be defined before the first transaction is created; filters
|
williamr@2
|
47 |
are not obliged to check with the connection info if the values
|
williamr@2
|
48 |
have changed after this point.
|
williamr@2
|
49 |
|
williamr@2
|
50 |
HTTP::EProxyUsage (default HTTP::EDoNotUseProxy) (HTTP::EDoNotUseProxy | HTTP::EUseProxy)
|
williamr@2
|
51 |
|
williamr@2
|
52 |
HTTP::EProxyAddress (A Uri for the Proxy server. Should include the port number
|
williamr@2
|
53 |
if it is not the default of 8080)
|
williamr@2
|
54 |
|
williamr@2
|
55 |
HTTP::EMaxNumTransportHandlers (default 4)
|
williamr@2
|
56 |
|
williamr@2
|
57 |
HTTP::EMaxNumTransPerTranspHndlr (default 5)
|
williamr@2
|
58 |
|
williamr@2
|
59 |
HTTP::EHTTPVersion (default HTTP::EHttp11) (HTTP::EHttp11 | HTTP::EHttp10)
|
williamr@2
|
60 |
|
williamr@2
|
61 |
HTTP::EProtocol (default, and currently only defined value is HTTP::EHTTP)
|
williamr@2
|
62 |
|
williamr@2
|
63 |
HTTP::EHttpBatching (default HTTP::EDoNotEnableBatching) (HTTP::EDoNotEnableBatching | HTTP::EEnableBatching)
|
williamr@2
|
64 |
|
williamr@2
|
65 |
HTTP::EBatchingBufferSize (default 1400)
|
williamr@2
|
66 |
|
williamr@2
|
67 |
HTTP Client can create a connection and set its own preferences, instead of using the
|
williamr@2
|
68 |
default connection preferences specified in COMMS Database. In such cases, the client
|
williamr@2
|
69 |
is responsible for creating the RSocketServ session and RConnection using
|
williamr@2
|
70 |
RSocketServ::Connect(..) and RConnection::Open(..).
|
williamr@2
|
71 |
Client must also start the connection using RConnection::Start(..) and pass the
|
williamr@2
|
72 |
connection preferences to the function using TConnPref.
|
williamr@2
|
73 |
The following session properties should then be set by the client.
|
williamr@2
|
74 |
|
williamr@2
|
75 |
HTTP::EHttpSocketServ (Handle to RSocketServ session, which is the value obtained
|
williamr@2
|
76 |
by calling RSocketServ::Handle())
|
williamr@2
|
77 |
|
williamr@2
|
78 |
HTTP::EHttpSocketConnection (Reference to the RConnection object, obtained from
|
williamr@2
|
79 |
reinterpret_cast(TInt, &connection))
|
williamr@2
|
80 |
|
williamr@2
|
81 |
The HTTP Client can also specify what action should be take if during a secure
|
williamr@2
|
82 |
handshakes the server cert cannot be trusted. The choice is for the handshake
|
williamr@2
|
83 |
to automatically cancelled or for a dialog to be raised and the user given the
|
williamr@2
|
84 |
option of continuing with the handshake or cancelling it. The following session
|
williamr@2
|
85 |
property should be used to specify the behaviour.
|
williamr@2
|
86 |
|
williamr@2
|
87 |
HTTP::ESecureDialog (default HTTP::EDialogPrompt) (HTTP::EDialogPrompt | EDialogNoPrompt)
|
williamr@2
|
88 |
|
williamr@2
|
89 |
The HTTP Client can specify the socket shutdown mode when the session is closing. At the time
|
williamr@2
|
90 |
of closing the session, any outstanding transactions on open sockets can specify that the
|
williamr@2
|
91 |
socket shutdown mode be set to immediate. The following property can be used to enable this
|
williamr@2
|
92 |
behaviour.
|
williamr@2
|
93 |
|
williamr@2
|
94 |
HTTP::ESocketShutdownMode (default HTTP::ESocketShutdownNormal) (HTTP::ESocketShutdownNormal | HTTP::ESocketShutdownImmediate
|
williamr@2
|
95 |
|
williamr@2
|
96 |
The HTTP Client can limit the number of transactions that it will send down one connection when
|
williamr@2
|
97 |
using pipelining. The following value should be set to an integer. When set any outstanding transaction
|
williamr@2
|
98 |
that exceed this number will either be sent separately down a different connection or will
|
williamr@2
|
99 |
be queued until a space becomes available.
|
williamr@2
|
100 |
|
williamr@2
|
101 |
HTTP::EMaxNumTransactionsToPipeline (default KMaxTInt) (Integer)
|
williamr@2
|
102 |
|
williamr@2
|
103 |
The session ID is an optional non-negative integer which is attached to the session and any sockets
|
williamr@2
|
104 |
it creates. The session ID will be set on any sockets created by using RSocket::SetOpt() with
|
williamr@2
|
105 |
the level KSOLHttpSessionInfo and the name KSOHttpSessionId (defined in httpsocketconstants.h).
|
williamr@2
|
106 |
The session ID can be retrieved in a Flow Hook by implementing MIp6Hook::SetFlowOption() to
|
williamr@2
|
107 |
look for the aforementioned option level and name.
|
williamr@2
|
108 |
@see MIp6Hook
|
williamr@2
|
109 |
|
williamr@2
|
110 |
HTTP::ESessionId (no default) (Integer)
|
williamr@2
|
111 |
|
williamr@2
|
112 |
|
williamr@2
|
113 |
@publishedAll
|
williamr@2
|
114 |
@released
|
williamr@2
|
115 |
*/
|
williamr@2
|
116 |
{
|
williamr@2
|
117 |
};
|
williamr@2
|
118 |
|
williamr@2
|
119 |
#endif // __RHTTPCONNECTIONINFO_H__
|