2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : sipauthorizationheader.h
23 #ifndef CSIPAUTHORIZATIONHEADER_H
24 #define CSIPAUTHORIZATIONHEADER_H
27 #include "sipauthorizationheaderbase.h"
34 * Class for SIP Authorization-header manipulation.
37 class CSIPAuthorizationHeader : public CSIPAuthorizationHeaderBase
39 public: // Constructors and destructor
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
47 IMPORT_C static CSIPAuthorizationHeader*
48 DecodeL(const TDesC8& aValue);
51 * Creates a new instance of CSIPAuthorizationHeader
52 * @return a new instance of CSIPAuthorizationHeader
54 IMPORT_C static CSIPAuthorizationHeader*
55 NewL(RStringF aAuthScheme);
58 * Creates a new instance of CSIPAuthorizationHeader
59 * @return a new instance of CSIPAuthorizationHeader
61 IMPORT_C static CSIPAuthorizationHeader*
62 NewLC(RStringF aAuthScheme);
65 * Creates a deep-copy of a CSIPAuthorizationHeaderBase
66 * @param aAuthenticateHeaderBase to be copied
67 * @return a new instance of CSIPAuthorizationHeader
69 IMPORT_C static CSIPAuthorizationHeader*
70 NewL(const CSIPAuthorizationHeaderBase& aHeader);
73 * Creates a deep-copy of a CSIPAuthorizationHeaderBase
74 * @param aAuthenticateHeaderBase to be copied
75 * @return a new instance of CSIPAuthorizationHeader
77 IMPORT_C static CSIPAuthorizationHeader*
78 NewLC(const CSIPAuthorizationHeaderBase& aHeader);
83 IMPORT_C ~CSIPAuthorizationHeader();
85 public: // From CSIPHeaderBase
88 * From CSIPHeaderBase ExternalizeSupported
90 IMPORT_C TBool ExternalizeSupported() const;
93 * From CSIPHeaderBase CloneL
95 IMPORT_C CSIPHeaderBase* CloneL() const;
98 * From CSIPHeaderBase Name
100 IMPORT_C RStringF Name() const;
103 public: // New functions, for internal use
108 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
113 static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream);
115 private: // Constructors
117 CSIPAuthorizationHeader();
119 private: // From CSIPHeaderBase
121 void ExternalizeValueL(RWriteStream& aWriteStream) const;
123 private: // For testing purposes
125 friend class CSIPAuthorizationHeaderTest;
129 #endif // CSIPAUTHORIZATIONHEADER_H