realtimenetprots/sipfw/SIP/Codec/api/sipaddressheaderbase.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     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        : sipaddressheaderbase.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 CSIPADDRESSHEADERBASE_H
       
    26 #define CSIPADDRESSHEADERBASE_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 SIP headers having syntax
       
    41 * ( name-addr/ addr-spec ) *(generic-param)
       
    42 *
       
    43 *  @lib sipcodec.lib
       
    44 */
       
    45 class CSIPAddressHeaderBase : public CSIPParameterHeaderBase
       
    46 	{
       
    47 	public:	// Constructors and destructor
       
    48 
       
    49 		/**
       
    50 		* Destructor, deletes the resources of CSIPAddressHeaderBase.
       
    51 		*/
       
    52         IMPORT_C virtual ~CSIPAddressHeaderBase();
       
    53 
       
    54 
       
    55 	public: // New functions
       
    56 
       
    57 		/**
       
    58 		* Sets the name-address
       
    59 		* @pre aSIPAddress != 0
       
    60 		* @param aSIPAddress a name-address to set, 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 object
       
    67 		*/
       
    68 		IMPORT_C const CSIPAddress& SIPAddress() const;
       
    69 
       
    70 		/**
       
    71 		* Gets the name-address
       
    72 		* @return name-address object
       
    73 		*/
       
    74 		IMPORT_C CSIPAddress& SIPAddress();
       
    75 
       
    76 
       
    77 	protected: // Constructors
       
    78 
       
    79 		CSIPAddressHeaderBase();
       
    80         void ConstructL();
       
    81 		void ConstructL(CSIPAddress* aSIPAddress);
       
    82         void ConstructL(const CSIPAddressHeaderBase& aHeader);
       
    83 
       
    84 	protected: // Data
       
    85 
       
    86         /**
       
    87         * @internalComponent
       
    88         */
       
    89 		CSIPAddress* iSIPAddress;
       
    90 		
       
    91         /**
       
    92         * @internalComponent
       
    93         */		
       
    94 		CSIPHeaderGenericParams* iParams;
       
    95 
       
    96 	protected: // New functions
       
    97 
       
    98 		void DoInternalizeValueL(RReadStream& aReadStream);
       
    99 
       
   100 	protected: // From CSIPHeaderBase
       
   101 
       
   102         /**
       
   103         * @internalComponent
       
   104         */
       
   105 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
       
   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 
       
   115 #endif // end of CSIPADDRESSHEADERBASE_H
       
   116 
       
   117 // End of File