epoc32/include/sipfromtoheaderbase.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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        : sipfromtoheaderbase.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 CSIPFROMTOHEADERBASE_H
    26 #define CSIPFROMTOHEADERBASE_H
    27 
    28 //  INCLUDES
    29 #include "sipparameterheaderbase.h"
    30 #include "_sipcodecdefs.h"
    31 
    32 // FORWARD DECLARATIONS
    33 class CSIPAddress;
    34 class CSIPFromToHeaderParams;
    35 
    36 // CLASS DECLARATION
    37 /**
    38 * @publishedAll
    39 * @released
    40 *
    41 * Class provides functions for setting and getting parameters in SIP "From"
    42 * and "To" header.
    43 *
    44 * This is an abstract class and cannot be instantiated.
    45 *
    46 * @lib sipcodec.lib
    47 */
    48 class CSIPFromToHeaderBase : public CSIPParameterHeaderBase
    49 	{
    50 	public: // Constructors and destructor
    51 
    52 		/**
    53 		* Destructor, deletes the resources of CSIPFromToHeaderBase.
    54 		*/
    55 		IMPORT_C virtual ~CSIPFromToHeaderBase();
    56 
    57 
    58 	public: // New functions
    59 
    60 		/**
    61 		* Compares this instance to another "From" or "To" header object
    62 		* @param aHeader a header to compare to
    63 		* @return ETrue, if the objects are equal otherwise EFalse
    64 		*/
    65 		IMPORT_C TBool operator==(const CSIPFromToHeaderBase& aHeader) const;
    66 
    67 		/**
    68 		* Sets the name-address
    69 		* @pre aSIPAddress != 0
    70 		* @param aSIPAddress a name-address to set, the ownership is transferred
    71 		*/
    72 		IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
    73 
    74 		/**
    75 		* Gets the name-address as const
    76 		* @return name-address object
    77 		*/
    78 		IMPORT_C const CSIPAddress& SIPAddress() const;
    79 
    80 		/**
    81 		* Gets the name-address
    82 		* @return name-address object
    83 		*/
    84 		IMPORT_C CSIPAddress& SIPAddress();
    85 
    86 
    87 	public: // From CSIPHeaderBase, for internal use
    88 
    89         /**
    90         * @internalComponent
    91         */
    92 		TBool HasCompactName() const;
    93 		
    94         /**
    95         * @internalComponent
    96         */		
    97 		TPreferredPlace PreferredPlaceInMessage() const;
    98 
    99 	protected: // Constructors
   100 
   101 		CSIPFromToHeaderBase();
   102 		void ConstructL();
   103 		void ConstructL(CSIPAddress* aSIPAddress);
   104 		void ConstructL(CSIPAddress* aSIPAddress, const TDesC8& aTag);
   105 		void ConstructL(const CSIPFromToHeaderBase& aSIPFromToHeaderBase);
   106 
   107 	protected: // New functions
   108 
   109 		void DoInternalizeValueL(RReadStream& aReadStream);
   110 
   111 	private: // From CSIPHeaderBase
   112 
   113 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
   114 
   115 	private: // From CSIPParameterHeaderBase
   116 
   117 		HBufC8* ToTextMandatoryPartLC() const;
   118 		void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
   119 		const CSIPParamContainerBase& Params() const;
   120 		CSIPParamContainerBase& Params();
   121 
   122 	private: // Data
   123 
   124 		CSIPAddress* iSIPAddress;
   125 		CSIPFromToHeaderParams* iParams;
   126 
   127 private: // For testing purposes
   128 	
   129 		UNIT_TEST(CSIPFromToHeaderTest)
   130 	};
   131 
   132 
   133 #endif // CSIPFROMTOHEADERBASE_H
   134 
   135 // End of File