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 : sipproxyauthorizationheader.h
23 #ifndef CSIPPROXYAUTHORIZATIONHEADER_H
24 #define CSIPPROXYAUTHORIZATIONHEADER_H
27 #include "sipauthorizationheaderbase.h"
34 * Class for SIP Proxy-Authorization-header manipulation.
38 class CSIPProxyAuthorizationHeader : public CSIPAuthorizationHeaderBase
40 public: // Constructors and destructor
43 * Constructs a CSIPProxyAuthorizationHeader
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 CSIPProxyAuthorizationHeader
48 IMPORT_C static CSIPProxyAuthorizationHeader*
49 DecodeL(const TDesC8& aValue);
52 * Creates a new instance of CSIPProxyAuthorizationHeader
53 * @return a new instance of CSIPProxyAuthorizationHeader
55 IMPORT_C static CSIPProxyAuthorizationHeader*
56 NewL(RStringF aAuthScheme);
59 * Creates a new instance of CSIPProxyAuthorizationHeader
60 * @return a new instance of CSIPProxyAuthorizationHeader
62 IMPORT_C static CSIPProxyAuthorizationHeader*
63 NewLC(RStringF aAuthScheme);
66 * Creates a deep-copy of a CSIPAuthorizationHeaderBase
67 * @param aAuthenticateHeaderBase to be copied
68 * @return a new instance of CSIPProxyAuthorizationHeader
70 IMPORT_C static CSIPProxyAuthorizationHeader*
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 CSIPProxyAuthorizationHeader
78 IMPORT_C static CSIPProxyAuthorizationHeader*
79 NewLC(const CSIPAuthorizationHeaderBase& aHeader);
84 IMPORT_C ~CSIPProxyAuthorizationHeader();
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;
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 CSIPProxyAuthorizationHeader();
119 private: // From CSIPHeaderBase
121 void ExternalizeValueL(RWriteStream& aWriteStream) const;
123 private: // For testing purposes
125 friend class CSIPProxyAuthorizationHeaderTest;
129 #endif // CSIPPROXYAUTHORIZATIONHEADER_H