epoc32/include/mw/sipaddressheaderbase.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
2:2fe1408b6811 3:e1b950c65cb4
       
     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        : 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 #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 SIP headers having syntax
       
    42 * ( name-addr/ addr-spec ) *(generic-param)
       
    43 *
       
    44 *  @lib sipcodec.lib
       
    45 */
       
    46 class CSIPAddressHeaderBase : public CSIPParameterHeaderBase
       
    47 	{
       
    48 	public:	// Constructors and destructor
       
    49 
       
    50 		/**
       
    51 		* Destructor, deletes the resources of CSIPAddressHeaderBase.
       
    52 		*/
       
    53         IMPORT_C virtual ~CSIPAddressHeaderBase();
       
    54 
       
    55 
       
    56 	public: // New functions
       
    57 
       
    58 		/**
       
    59 		* Sets the name-address
       
    60 		* @pre aSIPAddress != 0
       
    61 		* @param aSIPAddress a name-address to set, the ownership is transferred
       
    62 		*/
       
    63 		IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
       
    64 
       
    65 		/**
       
    66 		* Gets the name-address as const
       
    67 		* @return name-address object
       
    68 		*/
       
    69 		IMPORT_C const CSIPAddress& SIPAddress() const;
       
    70 
       
    71 		/**
       
    72 		* Gets the name-address
       
    73 		* @return name-address object
       
    74 		*/
       
    75 		IMPORT_C CSIPAddress& SIPAddress();
       
    76 
       
    77 
       
    78 	protected: // Constructors
       
    79 
       
    80 		CSIPAddressHeaderBase();
       
    81         void ConstructL();
       
    82 		void ConstructL(CSIPAddress* aSIPAddress);
       
    83         void ConstructL(const CSIPAddressHeaderBase& aHeader);
       
    84 
       
    85 	protected: // Data
       
    86 
       
    87         /**
       
    88         * @internalComponent
       
    89         */
       
    90 		CSIPAddress* iSIPAddress;
       
    91 		
       
    92         /**
       
    93         * @internalComponent
       
    94         */		
       
    95 		CSIPHeaderGenericParams* iParams;
       
    96 
       
    97 	protected: // New functions
       
    98 
       
    99 		void DoInternalizeValueL(RReadStream& aReadStream);
       
   100 
       
   101 	protected: // From CSIPHeaderBase
       
   102 
       
   103         /**
       
   104         * @internalComponent
       
   105         */
       
   106 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
       
   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 
       
   116 #endif // end of CSIPADDRESSHEADERBASE_H
       
   117 
       
   118 // End of File