epoc32/include/siprouteheaderbase.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 siprouteheaderbase.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        : siprouteheaderbase.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 CSIPROUTEHEADERBASE_H
       
    26 #define CSIPROUTEHEADERBASE_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include "sipparameterheaderbase.h"
       
    30 #include "_sipcodecdefs.h"
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CSIPAddress;
       
    34 class CSIPHeaderGenericParams;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38 * @publishedAll
       
    39 * @released
       
    40 *
       
    41 * A base class for "Route"-, "Record-Route"- and "Service-Route"-headers.
       
    42 *
       
    43 *  @lib sipcodec.lib
       
    44 */
       
    45 class CSIPRouteHeaderBase : public CSIPParameterHeaderBase
       
    46 	{
       
    47 	public:	// Constructors and destructor
       
    48 
       
    49 		/**
       
    50 		* Destructor, deletes the resources of CSIPRouteHeaderBase.
       
    51 		*/
       
    52 		IMPORT_C virtual ~CSIPRouteHeaderBase();
       
    53 
       
    54 
       
    55 	public:	// New functions
       
    56 		
       
    57 		/**
       
    58 		* Sets the name-address
       
    59 		* @pre aSIPAddress != 0
       
    60 		* @param aSIPAddress a name-address, the ownership is transferred
       
    61 		*/
       
    62 		IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
       
    63 	
       
    64 		/**
       
    65 		* Gets the name-address as const
       
    66 		* @return name-address
       
    67 		*/
       
    68 		IMPORT_C const CSIPAddress& SIPAddress() const;
       
    69 
       
    70 		/**
       
    71 		* Gets the name-address
       
    72 		* @return name-address
       
    73 		*/
       
    74 		IMPORT_C CSIPAddress& SIPAddress();
       
    75 
       
    76 
       
    77 	public: // From CSIPHeaderBase, for internal use
       
    78 
       
    79         /**
       
    80         * @internalComponent
       
    81         */	
       
    82 		TBool MoreThanOneAllowed() const;
       
    83 		
       
    84         /**
       
    85         * @internalComponent
       
    86         */		
       
    87 		TPreferredPlace PreferredPlaceInMessage() const;
       
    88 
       
    89 	protected: // Contructors
       
    90 
       
    91 		CSIPRouteHeaderBase();
       
    92 		void ConstructL();
       
    93 		void ConstructL(CSIPAddress* aSIPAddress);
       
    94 		void ConstructL(const CSIPRouteHeaderBase& aRouteHeaderBase);
       
    95 
       
    96 	protected: // Data
       
    97 
       
    98         /**
       
    99         * @internalComponent
       
   100         */
       
   101 		CSIPAddress* iSIPAddress;
       
   102 		
       
   103         /**
       
   104         * @internalComponent
       
   105         */		
       
   106 		CSIPHeaderGenericParams* iParams;
       
   107 
       
   108 	private: // From CSIPParameterHeaderBase
       
   109 
       
   110 		HBufC8* ToTextMandatoryPartLC() const;
       
   111 		void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
       
   112 		const CSIPParamContainerBase& Params() const;
       
   113 		CSIPParamContainerBase& Params();
       
   114 
       
   115 	private: // For testing purposes
       
   116 	
       
   117 		UNIT_TEST(CSIPRouteHeaderBaseTest)
       
   118 	};
       
   119 
       
   120 #endif // CSIPROUTEHEADERBASE_H
       
   121 
       
   122 // End of File