epoc32/include/mw/siptokenheaderbase.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        : siptokenheaderbase.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 CSIPTOKENHEADERBASE_H
    26 #define CSIPTOKENHEADERBASE_H
    27 
    28 //  INCLUDES
    29 #include "sipheaderbase.h"
    30 
    31 // CLASS DECLARATION
    32 /**
    33 * @publishedAll
    34 * @released
    35 *
    36 * A base class for SIP headers having form "Name: token *(COMMA token)"
    37 *
    38 * @lib sipcodec.lib
    39 */
    40 class CSIPTokenHeaderBase : public CSIPHeaderBase
    41 	{
    42 	public:	// Constructors and destructor
    43 
    44 		/**
    45 		* Destructor, deletes the resources of CSIPTokenHeaderBase.
    46 		*/
    47 		IMPORT_C virtual ~CSIPTokenHeaderBase();
    48 
    49 
    50 	public: // New functions
    51 
    52 		/**
    53 		* Sets the header value as a token 
    54 		* @param aValue a value to set
    55 		*/
    56 		IMPORT_C void SetValueL(RStringF aValue);
    57 	
    58 		/**
    59 		* Gets the header value as a token 
    60 		* @return the header value
    61 		*/
    62 		IMPORT_C RStringF Value() const;
    63 
    64 
    65 	public: // From CSIPHeaderBase
    66 
    67 		/**
    68 		* From CSIPHeaderBase ToTextValueL
    69 		*/
    70 		IMPORT_C HBufC8* ToTextValueL() const;
    71 
    72 
    73 	public: // From CSIPHeaderBase, for internal use
    74 
    75         /**
    76         * @internalComponent
    77         */
    78 		virtual TBool MoreThanOneAllowed() const;
    79 
    80 	protected: // Constructors
    81 
    82 		CSIPTokenHeaderBase();
    83 	    CSIPTokenHeaderBase(const CSIPTokenHeaderBase& aHeader);
    84 		void ConstructL(const TDesC8& aValue, TBool aEmptyValueAllowed=EFalse);
    85 		void ConstructL(RStringF aValue, TBool aEmptyValueAllowed=EFalse);
    86 		
    87 	protected: // New functions		
    88 		
    89 		void DoInternalizeValueL(RReadStream& aReadStream);
    90 
    91 	protected: // Data	
    92 	
    93         /**
    94         * @internalComponent
    95         */	
    96 		RStringF iValue;
    97 
    98 	private: // From CSIPHeaderBase
    99 
   100 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
   101 
   102 	private: // New functions
   103 
   104 		void SetValueL(const TDesC8& aValue);	
   105 
   106 	private: // For testing purposes
   107 #ifdef CPPUNIT_TEST	
   108 		friend class CSIPTokenHeaderBaseTest;
   109 #endif
   110 	};
   111 
   112 #endif // CSIPTOKENHEADERBASE_H
   113 
   114 // End of File