epoc32/include/siprouteheader.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 siprouteheader.h
     1 /*
       
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     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
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name        : siprouteheader.h
       
    16 * Part of     : SIP Codec
       
    17 * Interface   : SDK API, SIP Codec API
       
    18 * Version     : SIP/4.0 
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef CSIPROUTEHEADER_H
       
    26 #define CSIPROUTEHEADER_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include "siprouteheaderbase.h"
       
    30 #include "_sipcodecdefs.h"
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34 * @publishedAll
       
    35 * @released
       
    36 *
       
    37 * Class for SIP "Route"-header manipulation.
       
    38 *
       
    39 *  @lib sipcodec.lib
       
    40 */
       
    41 class CSIPRouteHeader : public CSIPRouteHeaderBase
       
    42 	{
       
    43 	public:	// Constructors and destructor
       
    44 
       
    45 		/**
       
    46 		* Constructs a CSIPRouteHeader from textual representation 
       
    47 		* of the header's value part.
       
    48 		* @param aValue a value part of a "Route"-header
       
    49 		* @return an array containing one to many instances of CSIPRouteHeader
       
    50 		*/
       
    51 		IMPORT_C static RPointerArray<CSIPRouteHeader> 
       
    52 			DecodeL(const TDesC8& aValue);
       
    53 
       
    54 		/**
       
    55 		* Creates a new instance of CSIPRouteHeader
       
    56 		* @pre aSIPAddress != 0
       
    57 		* @param aSIPAddress a name-address, the ownership is transferred 
       
    58 		* @return a new instance of CSIPRouteHeader
       
    59 		*/
       
    60 		IMPORT_C static CSIPRouteHeader* NewL(CSIPAddress* aSIPAddress);
       
    61 
       
    62 		/**
       
    63 		* Creates a new instance of CSIPRouteHeader and puts it to CleanupStack
       
    64 		* @pre aSIPAddress != 0
       
    65 		* @pre aSIPAddress->Address().HostPort().HasHost() == ETrue
       
    66 		* @param aSIPAddress a name-address, the ownership is transferred 
       
    67 		* @return a new instance of CSIPRouteHeader
       
    68 		*/
       
    69 		IMPORT_C static CSIPRouteHeader* NewLC(CSIPAddress* aSIPAddress);
       
    70 
       
    71 		/**
       
    72 		* Destructor, deletes the resources of CSIPRouteHeader.
       
    73 		*/
       
    74 		IMPORT_C ~CSIPRouteHeader();
       
    75 
       
    76 
       
    77 	public: // New functions
       
    78 
       
    79 		/**
       
    80 		* Constructs an instance of a CCSIPRouteHeader from a RReadStream
       
    81 		* @param aReadStream a stream containing the value of the
       
    82 		*        externalized object (header name not included). 
       
    83 		* @return an instance of a CSIPRouteHeader
       
    84 		*/
       
    85 		IMPORT_C static CSIPHeaderBase* 
       
    86 			InternalizeValueL(RReadStream& aReadStream);
       
    87 
       
    88 
       
    89 	public: // From CSIPHeaderBase
       
    90 		
       
    91 		/**
       
    92 		* From CSIPHeaderBase CloneL
       
    93 		*/
       
    94 		IMPORT_C CSIPHeaderBase* CloneL() const;
       
    95 
       
    96 		/**
       
    97 		* From CSIPHeaderBase Name
       
    98 		*/
       
    99 		IMPORT_C RStringF Name() const;
       
   100 
       
   101 
       
   102 	public: // New functions, for internal use
       
   103 
       
   104 		static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
       
   105 		static CSIPRouteHeader* NewL(const CSIPRouteHeaderBase& aHeader);		
       
   106 
       
   107 	private: // From CSIPHeaderbase
       
   108 
       
   109 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
       
   110 
       
   111 	private: // Constructors
       
   112 
       
   113 		CSIPRouteHeader();
       
   114 
       
   115 	private: // New functions
       
   116 
       
   117 		void DoInternalizeValueL(RReadStream& aReadStream);
       
   118 	};
       
   119 
       
   120 #endif // CSIPROUTEHEADER_H
       
   121 
       
   122 // End of File