epoc32/include/mw/sipsecurityheaderbase.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        : sipsecurityheaderbase.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 CSIPSECURITYHEADERBASE_H
    26 #define CSIPSECURITYHEADERBASE_H
    27 
    28 //  INCLUDES
    29 #include "sipparameterheaderbase.h"
    30 
    31 // FORWARD DECLARATIONS
    32 class CSIPSecurityHeaderBaseParams;
    33 
    34 // CLASS DECLARATION
    35 /**
    36 * @publishedAll
    37 * @released
    38 *
    39 * A base class for Security-Client, Security-Server and Security-Verify.
    40 *
    41 *  @lib sipcodec.lib
    42 */
    43 class CSIPSecurityHeaderBase : public CSIPParameterHeaderBase
    44 	{
    45 	public:	// Constructors and destructor
    46 
    47 		/**
    48 		* Destructor, deletes the resources of CSIPSecurityHeaderBase.
    49 		*/
    50 		IMPORT_C virtual ~CSIPSecurityHeaderBase();
    51 
    52 	public: // New functions
    53 
    54 		/**
    55 		* Gets the value of "q"-parameter
    56 		* @return the "q"-parameter value, zero if not present 
    57 		*/
    58 		IMPORT_C TReal PreferenceParam() const;
    59 
    60 		/**
    61 		* Sets the "q"-parameter value
    62 		* @param aPreferenceValue a "q"-parameter value to set
    63 		*/
    64 		IMPORT_C void SetPreferenceParamL(TReal aPreferenceValue);
    65 
    66 		/**
    67 		* Gets the Mechanism-Name from the Security header
    68 		* @return a Mechanism-Name
    69 		*/
    70 		IMPORT_C const TDesC8& MechanismName() const;
    71 
    72 		/**
    73 		* Sets the Mechanism-Name in the Security header
    74 		* @param aMechanismName a Mechanism-Name
    75 		*/
    76 		IMPORT_C void SetMechanismNameL(const TDesC8& aMechanismName);
    77 
    78 	public: // From CSIPHeaderBase, for internal use
    79 
    80         /**
    81         * @internalComponent
    82         */
    83 		TBool MoreThanOneAllowed() const;
    84 		
    85         /**
    86         * @internalComponent
    87         */		
    88 		TPreferredPlace PreferredPlaceInMessage() const;
    89 
    90 	protected: // Constructors
    91 
    92 		CSIPSecurityHeaderBase();
    93 		void ConstructL();
    94 		void ConstructL(const TDesC8& aMechanismName);
    95 		void ConstructL(const CSIPSecurityHeaderBase& aSecurityHeaderBase);
    96 	
    97 	protected: // New functions	
    98 		
    99 		void DoInternalizeValueL(RReadStream& aReadStream);
   100 
   101 	private: // From CSIPHeaderBase
   102 
   103 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
   104 
   105 	private: // From CSIPParameterHeaderBase
   106 
   107 		HBufC8* ToTextMandatoryPartLC() const;
   108 		void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
   109 		const CSIPParamContainerBase& Params() const;
   110 		CSIPParamContainerBase& Params();
   111 
   112 	private: // Data
   113 
   114 		HBufC8* iMechanismName;
   115 		CSIPSecurityHeaderBaseParams* iParams;
   116 
   117 	private: // For testing purposes
   118 #ifdef CPPUNIT_TEST	
   119 		friend class CSIPSecurityHeaderBaseTest;
   120 #endif
   121 	};
   122 
   123 #endif // CSIPSECURITYHEADERBASE_H
   124 
   125 // End of File