1.1 --- a/epoc32/include/sipauthheaderbase.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,165 +0,0 @@
1.4 -/*
1.5 -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 -* All rights reserved.
1.7 -* This component and the accompanying materials are made available
1.8 -* 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
1.9 -* which accompanies this distribution, and is available
1.10 -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 -*
1.12 -* Initial Contributors:
1.13 -* Nokia Corporation - initial contribution.
1.14 -*
1.15 -* Contributors:
1.16 -*
1.17 -* Description:
1.18 -* Name : sipauthheaderbase.h
1.19 -* Part of : SIP Codec
1.20 -* Version : SIP/5.0
1.21 -*
1.22 -*/
1.23 -
1.24 -
1.25 -
1.26 -#ifndef CSIPAUTHHEADERBASE_H
1.27 -#define CSIPAUTHHEADERBASE_H
1.28 -
1.29 -// INCLUDES
1.30 -#include "sipheaderbase.h"
1.31 -#include "_sipcodecdefs.h"
1.32 -
1.33 -// FORWARD DECLARATIONS
1.34 -class CSIPParamContainerBase;
1.35 -
1.36 -// CLASS DECLARATION
1.37 -/**
1.38 -* @publishedAll
1.39 -* @released
1.40 -*
1.41 -* A base class for SIP Authorization-, Proxy-Authenticate-,
1.42 -* Proxy-Authorization- and WWW-Authenticate-headers
1.43 -*
1.44 -* @lib sipcodec.lib
1.45 -*/
1.46 -class CSIPAuthHeaderBase : public CSIPHeaderBase
1.47 - {
1.48 - public: // Constructors and destructor
1.49 -
1.50 - /**
1.51 - * Destructor.
1.52 - */
1.53 - IMPORT_C virtual ~CSIPAuthHeaderBase();
1.54 -
1.55 -
1.56 - public: // New functions
1.57 -
1.58 - /**
1.59 - * @return the value of the auth-scheme
1.60 - */
1.61 - IMPORT_C RStringF AuthScheme() const;
1.62 -
1.63 - /**
1.64 - * Checks if a parameter is present
1.65 - * @param aName the name of the parameter
1.66 - * @return ETrue if present, otherwise EFalse
1.67 - */
1.68 - IMPORT_C TBool HasParam(RStringF aName) const;
1.69 -
1.70 - /**
1.71 - * Gets a parameter value
1.72 - * @pre HasParam(aName) == ETrue
1.73 - * @param aName the name of the parameter
1.74 - * @return the parameter value if present,
1.75 - * otherwise a zero-length length value.
1.76 - */
1.77 - IMPORT_C RStringF ParamValue(RStringF aName) const;
1.78 -
1.79 - /**
1.80 - * Gets a parameter value stored as a descriptor
1.81 - * @pre HasParam(aName) == ETrue
1.82 - * @param aName the name of the parameter
1.83 - * @return the parameter value if present,
1.84 - * otherwise a zero-length length value.
1.85 - */
1.86 - IMPORT_C const TDesC8& DesParamValue(RStringF aName) const;
1.87 -
1.88 - /**
1.89 - * Sets a parameter with a value.
1.90 - * Takes copies of the name and value,
1.91 - * so if the RStringFs have been dynamically allocated,
1.92 - * they can be closed if necessary after the function returns.
1.93 - * @pre HasParam(aName) == EFalse
1.94 - * @param aName the name of the parameter
1.95 - * @param aValue the parameter value to set
1.96 - */
1.97 - IMPORT_C void SetParamL(RStringF aName, RStringF aValue);
1.98 -
1.99 - /**
1.100 - * Sets a parameter with a value.
1.101 - * Takes copies of the name
1.102 - * so if the RStringF have been dynamically allocated,
1.103 - * they can be closed if necessary after the function returns.
1.104 - * Stores the parameter value as a descriptor, so that the
1.105 - * case-sensitivity is not lost in RStringF-descriptor conversions.
1.106 - * @pre HasParam(aName) == EFalse
1.107 - * @param aName the name of the parameter
1.108 - * @param aValue the parameter value to set
1.109 - */
1.110 - IMPORT_C void SetDesParamL(RStringF aName, const TDesC8& aValue);
1.111 -
1.112 - /**
1.113 - * Sets a parameter with a value and adds double quotes
1.114 - * as the first and the last character in the value.
1.115 - * Takes copy of the name,
1.116 - * so if the RStringF has been dynamically allocated,
1.117 - * it can be closed if necessary after the function returns.
1.118 - * @pre HasParam(aName) == EFalse
1.119 - * @param aName the name of the parameter
1.120 - * @param aValue the parameter value
1.121 - * to which the double quotes will be added
1.122 - */
1.123 - IMPORT_C void SetParamAndAddQuotesL(RStringF aName,
1.124 - const TDesC8& aValue);
1.125 -
1.126 - /**
1.127 - * Deletes a parameter
1.128 - * @param aName the parameter name to delete
1.129 - */
1.130 - IMPORT_C void DeleteParam(RStringF aName);
1.131 -
1.132 -
1.133 - public: // From CSIPHeaderBase
1.134 -
1.135 - /**
1.136 - * From CSIPHeaderBase ExternalizeSupported
1.137 - */
1.138 - IMPORT_C virtual TBool ExternalizeSupported() const;
1.139 -
1.140 -
1.141 - public: // From CSIPHeaderBase, for internal use
1.142 -
1.143 - TBool EncodeMultipleToOneLine() const;
1.144 - TBool MoreThanOneAllowed() const;
1.145 - TPreferredPlace PreferredPlaceInMessage() const;
1.146 - virtual HBufC8* ToTextValueL() const;
1.147 -
1.148 - protected: // Constructors
1.149 -
1.150 - CSIPAuthHeaderBase();
1.151 - void ConstructL(RStringF aAuthScheme);
1.152 -
1.153 - protected: // New functions
1.154 -
1.155 - void SetAuthSchemeL(const TDesC8& aAuthScheme);
1.156 - void ParseL(const TDesC8& aValue);
1.157 - virtual const CSIPParamContainerBase& Params() const = 0;
1.158 - virtual CSIPParamContainerBase& Params() = 0;
1.159 -
1.160 - private: // Data
1.161 -
1.162 - RStringF iAuthScheme;
1.163 - TChar iSeparator;
1.164 - };
1.165 -
1.166 -#endif // CSIPAUTHHEADERBASE_H
1.167 -
1.168 -// End of File