applayerpluginsandutils/httpprotocolplugins/wspinc/MWspExtendedMethods.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 MWspExtendedMethods.h
       
    18  @warning : This file contains Rose Model ID comments - please do not delete
       
    19 */
       
    20 
       
    21 #ifndef __MWSPEXTENDEDMETHODS_H__
       
    22 #define __MWSPEXTENDEDMETHODS_H__
       
    23 
       
    24 // System includes
       
    25 #include <e32base.h>
       
    26 #include <wsp/wsptypes.h>
       
    27 
       
    28 
       
    29 class MWspExtendedMethods
       
    30 /**
       
    31 @class MWspExtendedMethods
       
    32 @since			7.0
       
    33 The MWspExtendedMethods API provides an interface to a set of extended 
       
    34 methods as defined by the WSP Specification, July 2001. This capability gives
       
    35 a set of methods, beyond those defined in HTTP/1.1 to be used in the WSP 
       
    36 Session. Each method has a PDU type, which is assigned by the Client, and 
       
    37 a PDU name. The WSP Specification, July 2001, specifies for the PDU type 
       
    38 that the range 0x50-0x5F indicates a method that use a Get PDU format, and
       
    39 the range 0x70-7F indicates a method that use a Post PDU format.
       
    40 
       
    41 The interface allows the set of methods to be accessed one by one. The read 
       
    42 function provides the caller with a copy of the extend method information. 
       
    43 The set can be reset to the default value of the capability (as defined by
       
    44 the WSP Specification), which is an empty set. An extended method can be 
       
    45 added to the set, the preferred addresses should be added first.
       
    46 @publishedAll
       
    47 @deprecated
       
    48 */
       
    49 	{
       
    50 public:
       
    51 
       
    52 /** @fn				Start() const =0
       
    53 	Intended Usage	:	Ensures that the first extended method in the set is 
       
    54 						available for reading.
       
    55 	@since			7.0
       
    56 	@return			An error code. If there are no extended methods, then the 
       
    57 					value returned is KErrNotFound. If there are extended methods
       
    58 					then the value KErrNone is returned.
       
    59 	@post			The subsequent call to GetNext() is applied to the first
       
    60 					extended method in the set.
       
    61 */
       
    62 	virtual TInt Start() const =0;
       
    63 
       
    64 /** @fn				GetNext(TUint8& aPDUType, TPtrC8& aMethodName) const =0
       
    65 	Intended Usage	:	Gets the next extended method in the set. If there are 
       
    66 						no methods left then KErrNotFound error code is returned.
       
    67 	@since			7.0
       
    68 	@param			aPDUType	An output parameter reference for a byte 
       
    69 								indicating the type of the PDU. The WSP 
       
    70 								Specification, July 2001, specifies that the 
       
    71 								range 0x50-0x5F is for methods that use a Get
       
    72 								PDU format, and the range 0x70-7F is for methods
       
    73 								that use a Post PDU format.
       
    74 	@param			aMethodName	An output reference for a buffer with the name 
       
    75 								of the method.
       
    76 	@return			An error code. If there are no extended methods left, then 
       
    77 					the value returned is KErrNotFound. If there are extended 
       
    78 					methods left then the value KErrNone is returned.
       
    79 	@post			The next extended method in the set is available for reading.
       
    80 */
       
    81 	virtual TInt GetNext(TUint8& aPDUType, TPtrC8& aMethodName) const =0;
       
    82 
       
    83 /** @fn				Reset() =0
       
    84 	Intended Usage	:	Resets the capability to the default. The default is 
       
    85 						defined in the WSP Specification, July 2001, as being an
       
    86 						empty set of extended methods.
       
    87 	@since			7.0
       
    88 	@post			The set of extended methods is empty.
       
    89 */
       
    90 	virtual void Reset() =0;
       
    91 
       
    92 /** @fn				AddExtendedMethodL(TUint8 aPDUType, const TDesC8& aMethodName) =0
       
    93 	Intended Usage	:	Adds an extended method to the set.
       
    94 	@since			7.0
       
    95 	@leave			Leave code KErrNoMemory if the method cannot be added to 
       
    96 					the set.
       
    97 	@param			aPDUType	A byte indicating the type of the PDU. The WSP
       
    98 								Specification, July 2001, specifies that the
       
    99 								range 0x50-0x5F is for methods that use a Get
       
   100 								PDU format, and the range 0x70-7F is for methods
       
   101 								that use a Post PDU format.
       
   102 	@param			aMethodName	A buffer with the name of the method.
       
   103 	@post			If no error has occurred then the extended method has been 
       
   104 					added.
       
   105 */
       
   106 	virtual void AddExtendedMethodL(TUint8 aPDUType, const TDesC8& aMethodName) =0;
       
   107 
       
   108 	};
       
   109 
       
   110 #endif	// __MWSPEXTENDEDMETHODS_H__