2 * Copyright (c) 2004-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 : sipsecurityclientheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPSECURITYCLIENTHEADER_H
26 #define CSIPSECURITYCLIENTHEADER_H
29 #include "sipsecurityheaderbase.h"
36 * Class provides functions for setting and getting SIP "Security-Client"
41 class CSIPSecurityClientHeader : public CSIPSecurityHeaderBase
43 public: // Constructors and destructor
46 * Constructs a CSIPSecurityClientHeader from textual representation
47 * of the header's value part.
48 * @param aValue a value part of a "Security-Client"-header
49 * @return an array containing 1..n instances of CSIPSecurityClientHeader
51 IMPORT_C static RPointerArray<CSIPSecurityClientHeader>
52 DecodeL(const TDesC8& aValue);
55 * Creates a new instance of CSIPSecurityClientHeader
56 * @param aMechanism a Mechanism-Name parameter
57 * in the "Security-Client" header
58 * @return a new instance of CSIPSecurityClientHeader
60 IMPORT_C static CSIPSecurityClientHeader*
61 NewL(const TDesC8& aMechanism);
64 * Creates a new instance of CSIPSecurityClientHeader
65 * and puts it to CleanupStack
66 * @param aMechanism a Mechanism-Name parameter
67 * in the "Security-Client" header
68 * @return a new instance of CSIPSecurityClientHeader
70 IMPORT_C static CSIPSecurityClientHeader*
71 NewLC(const TDesC8& aMechanism);
74 * Destructor, deletes the resources of CSIPSecurityClientHeader.
76 IMPORT_C ~CSIPSecurityClientHeader();
79 public: // New functions
82 * Constructs an instance of a CSIPSecurityClientHeader
84 * @param aReadStream a stream containing the value of the
85 * externalized object (header name not included).
86 * @return an instance of a CSIPSecurityClientHeader
89 IMPORT_C static CSIPHeaderBase*
90 InternalizeValueL(RReadStream& aReadStream);
93 public: // From CSIPHeaderBase
96 * From CSIPHeaderBase CloneL
98 IMPORT_C CSIPHeaderBase* CloneL() const;
101 * From CSIPHeaderBase Name
103 IMPORT_C RStringF Name() const;
106 public: // New functions, for internal use
108 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
110 private: // New functions
112 CSIPSecurityClientHeader() ;
114 private: // For testing purposes
116 friend class CSIPSecurityHeaderBaseTest;
120 #endif // CSIPSECURITYCLIENTHEADER_H