applayerpluginsandutils/httpprotocolplugins/WspProtocolHandler/CAliasAddress.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 #ifndef __CALIASADDRESS_H__
       
    17 #define __CALIASADDRESS_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <wsp/wsptypes.h>
       
    21 
       
    22 // Types used for arguments in this file (e.g. TWspBearer) are from the Wap namespace
       
    23 using namespace Wap;
       
    24 
       
    25 /**	The CAliasAddress class represents the Alias Address capability as defined
       
    26 	by the WSP Specification, July 2001.
       
    27 */
       
    28 //##ModelId=3C4C41B2035E
       
    29 class CAliasAddress : public CBase
       
    30 	{
       
    31 public:	// Methods
       
    32 
       
    33 /**	
       
    34 	Static factory constructor.
       
    35 	@since			7.0
       
    36 	@leave		This function will leave if the object cannot be constructed.
       
    37 	@param			aBearer		The bearer type.
       
    38 	@param			aPort		The port number.
       
    39 	@param			aAddress	A reference to a buffer with the address.
       
    40 */
       
    41 	//##ModelId=3C4C41B203BA
       
    42 	static CAliasAddress* NewL(TWspBearer aBearer, TUint16 aPort, const TDesC8& aAddress);
       
    43 
       
    44 /**	
       
    45 	Standard destructor.
       
    46 	@since			7.0
       
    47 */
       
    48 	//##ModelId=3C4C41B203B9
       
    49 	~CAliasAddress();
       
    50 
       
    51 /**	
       
    52 	Returns the bearer type.
       
    53 	@since			7.0
       
    54 	@return			The bearer type.
       
    55 */
       
    56 	//##ModelId=3C4C41B203B8
       
    57 	inline TWspBearer GetBearer() const;
       
    58 
       
    59 /**	
       
    60 	Returns the port number. If the port number is zero, then the port number is
       
    61 	invalid.
       
    62 	@since			7.0
       
    63 	@return			The port number. A port number of value zero is invalid.
       
    64 */
       
    65 	//##ModelId=3C4C41B203B0
       
    66 	inline TUint16 GetPort() const;
       
    67 
       
    68 /**	
       
    69 	Returns the address.
       
    70 	@since			7.0
       
    71 	@return			A const reference to the buffer containg the address.
       
    72 */
       
    73 	//##ModelId=3C4C41B203AF
       
    74 	inline const TDesC8& GetAddress() const;
       
    75 
       
    76 private:	// Methods
       
    77 
       
    78 /**	
       
    79 	First phase constuctor.
       
    80 	@since			7.0
       
    81 	@param			aBearer		The bearer type.
       
    82 	@param			aPort		The port number.
       
    83 */
       
    84 	//##ModelId=3C4C41B203A4
       
    85 	CAliasAddress(TWspBearer aBearer, TUint16 aPort);
       
    86 
       
    87 /**	
       
    88 	Second phase constructor. Does any necessary allocations.
       
    89 	@since			7.0
       
    90 	@param			aAddress	A reference to a buffer with the address.
       
    91 */
       
    92 	//##ModelId=3C4C41B2039A
       
    93 	void ConstructL(const TDesC8& aAddress);
       
    94 
       
    95 private:	// Attributes
       
    96 
       
    97 	/** The bearer type.
       
    98 	*/
       
    99 	//##ModelId=3C4C41B20392
       
   100 	TWspBearer		iBearer;
       
   101 
       
   102 	/** The port number.
       
   103 	*/
       
   104 	//##ModelId=3C4C41B20386
       
   105 	TUint16			iPort;
       
   106 
       
   107 	/** A buffer containing the address.
       
   108 	*/
       
   109 	//##ModelId=3C4C41B20375
       
   110 	HBufC8*			iAddress;
       
   111 
       
   112 	};
       
   113 
       
   114 #include "CAliasAddress.inl"
       
   115 
       
   116 #endif	// __CALIASADDRESS_H__