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 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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : sipauthorizationheader.h
23 #ifndef CSIPAUTHORIZATIONHEADER_H
24 #define CSIPAUTHORIZATIONHEADER_H
27 #include "sipauthorizationheaderbase.h"
28 #include "_sipcodecdefs.h"
35 * Class for SIP Authorization-header manipulation.
38 class CSIPAuthorizationHeader : public CSIPAuthorizationHeaderBase
40 public: // Constructors and destructor
43 * Constructs a CSIPAuthorizationHeader
44 * from textual representation of the header's value part.
45 * @param aValue a value part of a "Proxy-Authenticate"-header
46 * @return a new instance of CSIPAuthorizationHeader
48 IMPORT_C static CSIPAuthorizationHeader*
49 DecodeL(const TDesC8& aValue);
52 * Creates a new instance of CSIPAuthorizationHeader
53 * @return a new instance of CSIPAuthorizationHeader
55 IMPORT_C static CSIPAuthorizationHeader*
56 NewL(RStringF aAuthScheme);
59 * Creates a new instance of CSIPAuthorizationHeader
60 * @return a new instance of CSIPAuthorizationHeader
62 IMPORT_C static CSIPAuthorizationHeader*
63 NewLC(RStringF aAuthScheme);
66 * Creates a deep-copy of a CSIPAuthorizationHeaderBase
67 * @param aAuthenticateHeaderBase to be copied
68 * @return a new instance of CSIPAuthorizationHeader
70 IMPORT_C static CSIPAuthorizationHeader*
71 NewL(const CSIPAuthorizationHeaderBase& aHeader);
74 * Creates a deep-copy of a CSIPAuthorizationHeaderBase
75 * @param aAuthenticateHeaderBase to be copied
76 * @return a new instance of CSIPAuthorizationHeader
78 IMPORT_C static CSIPAuthorizationHeader*
79 NewLC(const CSIPAuthorizationHeaderBase& aHeader);
84 IMPORT_C ~CSIPAuthorizationHeader();
86 public: // From CSIPHeaderBase
89 * From CSIPHeaderBase ExternalizeSupported
91 IMPORT_C TBool ExternalizeSupported() const;
94 * From CSIPHeaderBase CloneL
96 IMPORT_C CSIPHeaderBase* CloneL() const;
99 * From CSIPHeaderBase Name
101 IMPORT_C RStringF Name() const;
104 public: // New functions, for internal use
109 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
114 static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream);
116 private: // Constructors
118 CSIPAuthorizationHeader();
120 private: // From CSIPHeaderBase
122 void ExternalizeValueL(RWriteStream& aWriteStream) const;
124 private: // For testing purposes
126 UNIT_TEST(CSIPAuthorizationHeaderTest)
129 #endif // CSIPAUTHORIZATIONHEADER_H