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