epoc32/include/sipacceptcontactheader.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        : sipacceptcontactheader.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 CSIPACCEPTCONTACTHEADER_H
    26 #define CSIPACCEPTCONTACTHEADER_H
    27 
    28 //  INCLUDES
    29 #include "sipparameterheaderbase.h"
    30 #include "_sipcodecdefs.h"
    31 
    32 // FORWARD DECLARATIONS
    33 class CSIPAcceptContactHeaderParams;
    34 
    35 // CLASS DECLARATION
    36 /**
    37 * @publishedAll
    38 * @released
    39 *
    40 * Class provides functions for setting and getting parameters in SIP 
    41 * "Accept-Contact" header.
    42 *
    43 *  @lib sipcodec.lib
    44 */
    45 class CSIPAcceptContactHeader : public CSIPParameterHeaderBase
    46 	{
    47 	public:	// Constructors and destructor
    48 
    49 		/**
    50 		* Constructs a CSIPAcceptContactHeader from textual representation 
    51 		* of the header's value part.
    52 		* @param aValue a value part of a "Accept-Contact"-header 
    53 		*        (e.g. "*;param=value")
    54 		* @return an array containing one to many instances 
    55         *         of CSIPAcceptContactHeader   
    56 		*/
    57 		IMPORT_C static RPointerArray<CSIPAcceptContactHeader>
    58             DecodeL(const TDesC8& aValue);
    59 
    60 		/**
    61 		* Creates a new instance of CSIPAcceptContactHeader
    62 		* @return a new instance of CSIPAcceptContactHeader
    63 		*/
    64         IMPORT_C static CSIPAcceptContactHeader* NewL();
    65 
    66 		/**
    67 		* Creates a new instance of CSIPAcceptContactHeader
    68         * On return the new instance has left to the CleanupStack.
    69 		* @return a new instance of CSIPAcceptContactHeader
    70 		*/
    71         IMPORT_C static CSIPAcceptContactHeader* NewLC();
    72 
    73         /**
    74 		* Destructor, deletes the resources of CSIPAcceptContactHeader.
    75 		*/
    76 		IMPORT_C virtual ~CSIPAcceptContactHeader();
    77 
    78 
    79 	public: // New functions
    80 
    81 		/**
    82 		* Compares this instance to another "Accept-Contact" header object.
    83 		* Two Accept-Contact-headers are equal, 
    84 		* if both contain exactly the same parameters. 
    85 		* The order of the parameters is not sufficient.
    86 		* @param aHeader a header to compare to
    87 		* @return ETrue, if the objects are equal otherwise EFalse
    88 		*/
    89 		IMPORT_C TBool operator==(const CSIPAcceptContactHeader& aHeader) const;
    90 
    91         /**
    92 		* Constructs an instance of a CSIPAcceptContactHeader from a RReadStream
    93 		* @param aReadStream a stream containing the value of the
    94 		*        externalized object (header name not included). 
    95 		* @return an instance of a CSIPAcceptContactHeader
    96 		*/
    97 		IMPORT_C static CSIPHeaderBase* 
    98             InternalizeValueL(RReadStream& aReadStream);
    99         
   100 
   101 	public: // From CSIPHeaderBase
   102 
   103 		/**
   104 		* From CSIPHeaderBase CloneL
   105 		*/
   106 		IMPORT_C CSIPHeaderBase* CloneL() const;
   107 
   108 		/**
   109 		* From CSIPHeaderBase Name
   110 		*/
   111 		IMPORT_C RStringF Name() const;
   112 
   113 
   114 	public: // From CSIPHeaderBase, for internal use
   115 
   116         /**
   117 		* @internalComponent
   118 		*/
   119         TBool HasCompactName() const;
   120         
   121         /**
   122 		* @internalComponent
   123 		*/        
   124         RStringF CompactName() const;
   125         
   126         /**
   127 		* @internalComponent
   128 		*/        
   129         TBool MoreThanOneAllowed() const;
   130         
   131         /**
   132 		* @internalComponent
   133 		*/        
   134 		TPreferredPlace PreferredPlaceInMessage() const;
   135 
   136 	public: // New functions, for internal use
   137 
   138 		static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
   139 
   140 	private: // From CSIPHeaderBase
   141 
   142 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
   143 
   144 	private: // From CSIPParameterHeaderBase
   145 
   146 		HBufC8* ToTextMandatoryPartLC() const;
   147 		void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
   148 		const CSIPParamContainerBase& Params() const;
   149 		CSIPParamContainerBase& Params();
   150 
   151 	private: // Constructors
   152 
   153         CSIPAcceptContactHeader();
   154         void ConstructL();
   155 		void ConstructL(const CSIPAcceptContactHeader& aAcceptContactHeader);
   156 
   157 	private: // New functions
   158 
   159 		void DoInternalizeValueL(RReadStream& aReadStream);
   160 
   161 	private: // Data
   162 
   163 		CSIPAcceptContactHeaderParams* iParams;
   164 
   165 	private: // For testing purposes
   166 	
   167 		UNIT_TEST(CSIPAcceptContactHeaderTest)
   168 	};
   169 
   170 #endif // CSIPACCEPTCONTACTHEADER_H
   171 
   172 // End of File