realtimenetprots/sipfw/SIP/Codec/api/sipauthorizationheader.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2007-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          : sipauthorizationheader.h
       
    16 * Part of       : SIP Codec
       
    17 * Version       : SIP/6.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 #ifndef CSIPAUTHORIZATIONHEADER_H
       
    24 #define CSIPAUTHORIZATIONHEADER_H
       
    25 
       
    26 //  INCLUDES
       
    27 #include "sipauthorizationheaderbase.h"
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31 * @publishedAll
       
    32 * @released
       
    33 *
       
    34 * Class for SIP Authorization-header manipulation.
       
    35 * @lib sipcodec.lib
       
    36 */
       
    37 class CSIPAuthorizationHeader : public CSIPAuthorizationHeaderBase
       
    38 	{
       
    39 	public:	// Constructors and destructor
       
    40 
       
    41 		/**
       
    42 		* Constructs a CSIPAuthorizationHeader 
       
    43 		* from textual representation of the header's value part.
       
    44 		* @param aValue a value part of a "Proxy-Authenticate"-header 
       
    45 		* @return a new instance of CSIPAuthorizationHeader
       
    46 		*/
       
    47 		IMPORT_C static CSIPAuthorizationHeader* 
       
    48 			DecodeL(const TDesC8& aValue);
       
    49 
       
    50 		/**
       
    51 		* Creates a new instance of CSIPAuthorizationHeader
       
    52 		* @return a new instance of CSIPAuthorizationHeader
       
    53 		*/
       
    54 		IMPORT_C static CSIPAuthorizationHeader* 
       
    55 			NewL(RStringF aAuthScheme);
       
    56 
       
    57 		/**
       
    58 		* Creates a new instance of CSIPAuthorizationHeader
       
    59 		* @return a new instance of CSIPAuthorizationHeader
       
    60 		*/
       
    61 		IMPORT_C static CSIPAuthorizationHeader* 
       
    62 			NewLC(RStringF aAuthScheme);
       
    63 
       
    64 		/**
       
    65 		* Creates a deep-copy of a CSIPAuthorizationHeaderBase
       
    66 		* @param aAuthenticateHeaderBase to be copied
       
    67 		* @return a new instance of CSIPAuthorizationHeader
       
    68 		*/
       
    69 		IMPORT_C static CSIPAuthorizationHeader* 
       
    70 			NewL(const CSIPAuthorizationHeaderBase& aHeader);
       
    71 
       
    72 		/**
       
    73 		* Creates a deep-copy of a CSIPAuthorizationHeaderBase
       
    74 		* @param aAuthenticateHeaderBase to be copied
       
    75 		* @return a new instance of CSIPAuthorizationHeader
       
    76 		*/
       
    77 		IMPORT_C static CSIPAuthorizationHeader* 
       
    78 			NewLC(const CSIPAuthorizationHeaderBase& aHeader);
       
    79 
       
    80 		/**
       
    81 		* Destructor
       
    82 		*/
       
    83 		IMPORT_C ~CSIPAuthorizationHeader();
       
    84 
       
    85 	public: // From CSIPHeaderBase
       
    86 
       
    87 		/**
       
    88 		* From CSIPHeaderBase ExternalizeSupported
       
    89 		*/
       
    90 		IMPORT_C TBool ExternalizeSupported() const;
       
    91 
       
    92 		/**
       
    93 		* From CSIPHeaderBase CloneL
       
    94 		*/
       
    95 		IMPORT_C CSIPHeaderBase* CloneL() const;
       
    96 		
       
    97 		/**
       
    98 		* From CSIPHeaderBase Name
       
    99 		*/		
       
   100 		IMPORT_C RStringF Name() const;
       
   101 
       
   102 
       
   103 	public: // New functions, for internal use
       
   104 
       
   105         /**
       
   106         * @internalComponent
       
   107         */
       
   108 		static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
       
   109 		
       
   110         /**
       
   111         * @internalComponent
       
   112         */		
       
   113 		static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream);
       
   114 
       
   115 	private: // Constructors
       
   116 
       
   117 		CSIPAuthorizationHeader();
       
   118 
       
   119 	private: // From CSIPHeaderBase
       
   120 
       
   121 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
       
   122 
       
   123     private: // For testing purposes
       
   124 #ifdef CPPUNIT_TEST
       
   125         friend class CSIPAuthorizationHeaderTest;
       
   126 #endif
       
   127 	};
       
   128 
       
   129 #endif // CSIPAUTHORIZATIONHEADER_H
       
   130 
       
   131 // End of File