epoc32/include/mw/sipcallidheader.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          : sipcallidheader.h
    16 * Part of       : SIP Codec
    17 * Version       : SIP/4.0 
    18 *
    19 */
    20 
    21 
    22 
    23 
    24 #ifndef CSIPCALLIDHEADER_H
    25 #define CSIPCALLIDHEADER_H
    26 
    27 //  INCLUDES
    28 #include "sipheaderbase.h"
    29 
    30 // CLASS DECLARATION
    31 /**
    32 * @publishedAll
    33 * @released
    34 *
    35 * Class for a SIP Call-ID header.
    36 *
    37 * @lib sipcodec.lib
    38 */
    39 class CSIPCallIDHeader : public CSIPHeaderBase
    40 	{
    41 	public:	// Constructors and destructor
    42 
    43 		/**
    44 		* Constructs a CSIPCallIDHeader from textual representation 
    45 		* of the header's value part.
    46 		* @param aValue a value part of a "Call-ID"-header (e.g. "ab2x@zb7y")
    47 		* @returns a new instance of CSIPCallIDHeader
    48 		*/
    49 		IMPORT_C static CSIPCallIDHeader* DecodeL(const TDesC8& aValue);
    50 
    51 		/**
    52 		* Destructor
    53 		*/
    54 		IMPORT_C ~CSIPCallIDHeader ();
    55 
    56 
    57 	public: // New functions
    58 
    59 		/**
    60 		* Compares this instance to another "Call-ID" header object
    61 		* @param aCallIDHeader a header to compare to
    62 		* @returns ETrue if "Call-ID" headers are similar
    63 		*/
    64 		IMPORT_C TBool operator==(const CSIPCallIDHeader& aCallIDHeader);
    65 		
    66 		/**
    67 		* Constructs an instance of a CSIPCallIDHeader from a RReadStream
    68 		* @param aReadStream a stream containing the value of the
    69 		*	     externalized object (header name not included). 
    70 		* @return an instance of a CSIPCallIDHeader
    71 		*/
    72 		IMPORT_C static CSIPHeaderBase* 
    73 			InternalizeValueL(RReadStream& aReadStream);		
    74 
    75 
    76 	public: // From CSIPHeaderBase
    77 
    78 		/**
    79 		* From CSIPHeaderBase CloneL
    80 		*/
    81 		IMPORT_C CSIPHeaderBase* CloneL() const;
    82 		
    83 		/**
    84 		* From CSIPHeaderBase Name
    85 		*/		
    86 		IMPORT_C RStringF Name() const;
    87 
    88 		/**
    89 		* From CSIPHeaderBase ToTextValueL
    90 		*/
    91 		IMPORT_C HBufC8* ToTextValueL() const;
    92 		
    93 
    94 	public: // From CSIPHeaderBase, for internal use
    95         
    96         /**
    97         * @internalComponent
    98         */	
    99 		TBool HasCompactName() const;
   100 
   101         /**
   102         * @internalComponent
   103         */		
   104 		RStringF CompactName() const;
   105 		
   106         /**
   107         * @internalComponent
   108         */		
   109 		TPreferredPlace PreferredPlaceInMessage() const;
   110 
   111 	public: // New functions, for internal use
   112 
   113 		static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
   114 
   115 	private: // From CSIPHeaderBase
   116 
   117 		void ExternalizeValueL (RWriteStream& aWriteStream) const;
   118 
   119 	private: // Constructors
   120 
   121 		CSIPCallIDHeader();
   122 
   123 	private: // New functions
   124 
   125 		void ParseL(const TDesC8& aValue);
   126 
   127 	private: // Data
   128 
   129 		HBufC8* iCallID;
   130 
   131 	private: // For testing purposes
   132 #ifdef CPPUNIT_TEST	
   133 		friend class CSIPCallIDHeaderTest;
   134 #endif
   135 	};
   136 
   137 
   138 #endif // end of CSIPCALLIDHEADER_H
   139 
   140 // End of File