epoc32/include/mw/siprouteheaderbase.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.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 
    31 // FORWARD DECLARATIONS
    32 class CSIPAddress;
    33 class CSIPHeaderGenericParams;
    34 
    35 // CLASS DECLARATION
    36 /**
    37 * @publishedAll
    38 * @released
    39 *
    40 * A base class for "Route"-, "Record-Route"- and "Service-Route"-headers.
    41 *
    42 *  @lib sipcodec.lib
    43 */
    44 class CSIPRouteHeaderBase : public CSIPParameterHeaderBase
    45 	{
    46 	public:	// Constructors and destructor
    47 
    48 		/**
    49 		* Destructor, deletes the resources of CSIPRouteHeaderBase.
    50 		*/
    51 		IMPORT_C virtual ~CSIPRouteHeaderBase();
    52 
    53 
    54 	public:	// New functions
    55 		
    56 		/**
    57 		* Sets the name-address
    58 		* @pre aSIPAddress != 0
    59 		* @param aSIPAddress a name-address, the ownership is transferred
    60 		*/
    61 		IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
    62 	
    63 		/**
    64 		* Gets the name-address as const
    65 		* @return name-address
    66 		*/
    67 		IMPORT_C const CSIPAddress& SIPAddress() const;
    68 
    69 		/**
    70 		* Gets the name-address
    71 		* @return name-address
    72 		*/
    73 		IMPORT_C CSIPAddress& SIPAddress();
    74 
    75 
    76 	public: // From CSIPHeaderBase, for internal use
    77 
    78         /**
    79         * @internalComponent
    80         */	
    81 		TBool MoreThanOneAllowed() const;
    82 		
    83         /**
    84         * @internalComponent
    85         */		
    86 		TPreferredPlace PreferredPlaceInMessage() const;
    87 
    88 	protected: // Contructors
    89 
    90 		CSIPRouteHeaderBase();
    91 		void ConstructL();
    92 		void ConstructL(CSIPAddress* aSIPAddress);
    93 		void ConstructL(const CSIPRouteHeaderBase& aRouteHeaderBase);
    94 
    95 	protected: // Data
    96 
    97         /**
    98         * @internalComponent
    99         */
   100 		CSIPAddress* iSIPAddress;
   101 		
   102         /**
   103         * @internalComponent
   104         */		
   105 		CSIPHeaderGenericParams* iParams;
   106 
   107 	private: // From CSIPParameterHeaderBase
   108 
   109 		HBufC8* ToTextMandatoryPartLC() const;
   110 		void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
   111 		const CSIPParamContainerBase& Params() const;
   112 		CSIPParamContainerBase& Params();
   113 
   114 	private: // For testing purposes
   115 #ifdef CPPUNIT_TEST	
   116 		friend class CSIPRouteHeaderBaseTest;
   117 #endif
   118 	};
   119 
   120 #endif // CSIPROUTEHEADERBASE_H
   121 
   122 // End of File