applayerpluginsandutils/httpprotocolplugins/wspinc/MWspCapabilitySetter.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file MWspCapabilitySetter.h
       
    18  @warning : This file contains Rose Model ID comments - please do not delete
       
    19 */
       
    20 
       
    21 #ifndef __MWSPCAPABILITYSETTER_H__
       
    22 #define __MWSPCAPABILITYSETTER_H__
       
    23 
       
    24 // System includes
       
    25 #include <e32base.h>
       
    26 #include <wsp/wsptypes.h>
       
    27 
       
    28 // Types used for arguments in this file (e.g. TWspBearer) are from the Wap namespace
       
    29 using namespace Wap;
       
    30 
       
    31 class MWspCapabilitySetter
       
    32 /** 
       
    33 @class MWspCapabilitySetter
       
    34 @since			7.0
       
    35 The MWspCapabilitySetter API provides an interface to set the values for a 
       
    36 set of capabilities as defined by the WSP Specification, July 2001.
       
    37 @publishedAll
       
    38 @deprecated
       
    39 */
       
    40 	{
       
    41 public:	// Methods
       
    42 
       
    43 /**
       
    44 	@fn				Reset(TWspCapability aCapability = EAllCapabilities) =0
       
    45 	Intended Usage	:	Resets the capability specified by the aCapability. The 
       
    46 						value to which the capability is reset is the default
       
    47 						value defined in the WSP Specification, July 2001. In 
       
    48 						the case of set capabilities (e.g. Alias Address), the 
       
    49 						default is to have none.
       
    50 	@since			7.0
       
    51 	@param			aCapability	A enum specifying which capability to reset. The
       
    52 								default value is EAllCapabilities.
       
    53 	@post			The specified capability is reset to its default value.
       
    54  */
       
    55 	virtual void Reset(TWspCapability aCapability = EAllCapabilities) =0;
       
    56 
       
    57 /**
       
    58 	@fn				AddAliasAddressL(TWspBearer aBearer, TUint16 aPort, const TDesC8& aAddress) =0
       
    59 	Intended Usage	:	Adds an alias address to the set. This capability indicates
       
    60 						alternate addresses that can be used to access the same
       
    61 						entity instance in this current session. The addresses
       
    62 						are listed in preferential order, with the most preferred
       
    63 						at the start.
       
    64 	@since			7.0
       
    65 	@leave			Leave code KErrNoMemory if the capability cannot be added to 
       
    66 					the set.
       
    67 	@param			aBearer		The type of bearer network which this address 
       
    68 								should be used with.
       
    69 	@param			aPort		The destination port number. A value of zero
       
    70 								indicates that no port number has been specified.
       
    71 	@param			aAddress	A buffer with the bearer address to be used. The
       
    72 								format of the address is bearer dependent.
       
    73 	@post			The alias address has been added to the set.
       
    74  */
       
    75 	virtual void AddAliasAddressL(TWspBearer aBearer, TUint16 aPort, const TDesC8& aAddress) =0;
       
    76 
       
    77 /**
       
    78 	@fn				AddExtendedMethodL(TUint8 aPDUType, const TDesC8& aMethodName) =0
       
    79 	Intended Usage	:		Adds an extended method to the set. This capability 
       
    80 							gives a set of methods, beyond those defined in 
       
    81 							HTTP/1.1. 
       
    82 	@since			7.0
       
    83 	@leave			Leave code KErrNoMemory if the capability cannot be added to 
       
    84 					the set.
       
    85 	@param			aPDUType	A byte indicating the type of the PDU. The WSP
       
    86 								Specification, July 2001, specifies that the
       
    87 								range 0x50-0x5F is for methods that use a Get
       
    88 								PDU format, and the range 0x70-7F is for methods
       
    89 								that use a Post PDU format.
       
    90 	@param			aMethodName	A buffer with the name of the method.
       
    91 	@post			The extended method has been added to the set.
       
    92  */
       
    93 	virtual void AddExtendedMethodL(TUint8 aPDUType, const TDesC8& aMethodName) =0;
       
    94 
       
    95 /**
       
    96 	@fn				AddHeaderCodePageL(TUint8 aPageCode, const TDesC8& aPageName) =0
       
    97 	Intended Usage	:	Adds an extension header code page to the set.
       
    98 	@since			7.0
       
    99 	@leave			Leave code KErrNoMemory if the capability cannot be added to 
       
   100 					the set.
       
   101 	@param			aPageCode	A byte with the extension code page number.
       
   102 	@param			aPageName	A buffer with the name of the header code page.
       
   103 	@post			The Header Code Page has been added to the set.
       
   104  */
       
   105 	virtual void AddHeaderCodePageL(TUint8 aPageCode, const TDesC8& aPageName) =0;
       
   106 
       
   107 /**
       
   108 	@fn				SetMethodMOR(TUint8 aMOR) =0
       
   109 	Intended Usage	:	Set the Method MOR. The Method MOR defines the number of
       
   110 						active/outstanding method invocations at one time during 
       
   111 						the session.
       
   112 	@since			7.0
       
   113 	@param			aMOR	The Method MOR as an 8-bit positive number.
       
   114 	@post			The Method MOR has been set to the given value.
       
   115  */
       
   116 	virtual void SetMethodMOR(TUint8 aMOR) =0;
       
   117 
       
   118 /**
       
   119 	@fn				SetPushMOR(TUint8 aMOR) =0
       
   120 	Intended Usage	:	Set the Push MOR. The Push MOR defines the number of
       
   121 						active/outstanding push invocations at one time during 
       
   122 						the session.
       
   123 	@since			7.0
       
   124 	@param			aMOR	The Push MOR as an 8-bit positive number.
       
   125 	@post			The Push MOR has been set to the given value.
       
   126  */
       
   127 	virtual void SetPushMOR(TUint8 aMOR) =0;
       
   128 
       
   129 /**
       
   130 	@fn				SetProtocolOptions(TUint8 aProtocolOptions) =0
       
   131 	Intended Usage	:	Set the protocol options. The Protocol Options capability
       
   132 						defines the optional service facilities and features for
       
   133 						the session. The presence of an element indicates that 
       
   134 						the use of the specified facility or feature is enabled. 
       
   135 						The features and facilities described in the WSP 
       
   136 						Specification, July 2001, are specified by flags in a 
       
   137 						single byte. Additional flags will be specified in 
       
   138 						subsequent bytes, but this is not supported currently.
       
   139 	@since			7.0
       
   140 	@leave			Leave code KErrNoMemory if the capability cannot be set.
       
   141 	@param			aProtocolOptions	A byte containing the Protocol Options.
       
   142 	@post			The Protocol Options have been set to the given value.
       
   143  */
       
   144 	virtual void SetProtocolOptions(TUint8 aProtocolOptions) =0;
       
   145 
       
   146 /**
       
   147 	@fn				SetClientSDUSize(TUint32 aSize) =0
       
   148 	Intended Usage	:	Set the Client SDU size. The Client SDU size is the size
       
   149 						of the largest service data unit that may be sent to the
       
   150 						Client during the session. A value of zero indicates that
       
   151 						there is no limit to the SDU size.
       
   152 	@since			7.0
       
   153 	@param			aSize	The SDU size, in bytes, as a 32-bit positive number.
       
   154 	@post			The Client SDU size has been set to the given value.
       
   155  */
       
   156 	virtual void SetClientSDUSize(TUint32 aSize) =0;
       
   157 
       
   158 /**
       
   159 	@fn				SetServerSDUSize(TUint32 aSize) =0
       
   160 	Intended Usage	:	Set the Server SDU size. The Server SDU size is the size
       
   161 						of the largest service data unit that may be sent to the
       
   162 						Server during the session. A value of zero indicates that
       
   163 						there is no limit to the SDU size.
       
   164 	@since			7.0
       
   165 	@param			aSize	The SDU size, in bytes, as a 32-bit positive number.
       
   166 	@post			The Server SDU size has been set to the given value.
       
   167  */
       
   168 	virtual void SetServerSDUSize(TUint32 aSize) =0;
       
   169 
       
   170 /**
       
   171 	@fn				SetClientMessageSize(TUint32 aSize) =0
       
   172 	Intended Usage	:	Set the Client Message size. The Client Message size is
       
   173 						the size of the largest message that may be sent to the
       
   174 						Client during the session. A message may consist of 
       
   175 						multiple SDUs. A value of zero indicates that there is 
       
   176 						no limit to the Message size.
       
   177 	@since			7.0
       
   178 	@param			aSize	The message size, in bytes, as a 32-bit positive number.
       
   179 	@post			The Client Message size has been set to the given value.
       
   180  */
       
   181 	virtual void SetClientMessageSize(TUint32 aSize) =0;
       
   182 
       
   183 /**
       
   184 	@fn				SetServerMessageSize(TUint32 aSize) =0
       
   185 	Intended Usage	:	Set the Server Message size. The Server Message size is
       
   186 						the size of the largest message that may be sent to the
       
   187 						Server during the session. A message may consist of 
       
   188 						multiple SDUs. A value of zero indicates that there is 
       
   189 						no limit to the Message size.
       
   190 	@since			7.0
       
   191 	@param			aSize	The message size, in bytes, as a 32-bit positive number.
       
   192 	@post			The Server Message size has been set to the given value.
       
   193  */
       
   194 	virtual void SetServerMessageSize(TUint32 aSize) =0;
       
   195 
       
   196 /**
       
   197 	@fn				AddUnknownCapabilityL(const TDesC8& aIdentifier, const TDesC8& aValue) =0
       
   198 	Intended Usage	:	Adds an unknown capability to the set. This is a 
       
   199 						capability not defined by the WSP Specification, July 
       
   200 						2001. The Identifier is encoded in the same way as the
       
   201 						header field name - it uses the BNF rule for Field-Name, 
       
   202 						as shown in 8.4.2.6. Well-known capabilities have their
       
   203 						identifier encoded using a short-integer, and unknown 
       
   204 						capabilities encode their identifier using a Null-
       
   205 						terminated string. Any extra capabilities must be defined
       
   206 						in such a way that an empty parameter value is illegal. 
       
   207 						This allows the unknown capability to be rejected.
       
   208 	@since			7.0
       
   209 	@leave			Leave code KErrNoMemory if the capability cannot be added to 
       
   210 					the set.
       
   211 	@param			aIdentifier	A buffer with the identifier for the unknown
       
   212 								capability.
       
   213 	@param			aValue		A buffer with the parameters for the capability.
       
   214 	@post			The unknown capability has been added to the set.
       
   215  */
       
   216 	virtual void AddUnknownCapabilityL(const TDesC8& aIdentifier, const TDesC8& aValue) =0;
       
   217 
       
   218 	};
       
   219 
       
   220 #endif	// __MWSPCAPABILITYSETTER_H__