|
1 /* |
|
2 * Copyright (c) 2009-2010 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 * Initial Contributors: |
|
9 * Nokia Corporation - initial contribution. |
|
10 * Contributors: |
|
11 * |
|
12 * Description: |
|
13 * MSRP Implementation |
|
14 * |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef CMSRPHEADERBASE_H |
|
19 #define CMSRPHEADERBASE_H |
|
20 |
|
21 // EXTERNAL INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <s32mem.h> |
|
24 #include <stringpool.h> |
|
25 |
|
26 // CONSTANTS |
|
27 _LIT8( KColonAndSpace, ": " ); |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * @publishedAll |
|
32 * |
|
33 * Class provides a generic interface for all the MSRP headers. |
|
34 * |
|
35 * @lib msrpclient.lib |
|
36 */ |
|
37 class CMSRPHeaderBase : public CBase |
|
38 { |
|
39 public: // Constructors and destructors |
|
40 |
|
41 /** |
|
42 * Destructor, deletes the resources of CMSRPHeaderBase. |
|
43 */ |
|
44 IMPORT_C virtual ~CMSRPHeaderBase(); |
|
45 |
|
46 public: // New functions |
|
47 |
|
48 |
|
49 /** |
|
50 * Encodes the header (name and value) into its textual representation. |
|
51 * @return a textual representation of the complete header, |
|
52 * the ownership is transferred |
|
53 */ |
|
54 IMPORT_C HBufC8* ToTextL() const; |
|
55 |
|
56 /** |
|
57 * Encodes the header (name and value) into its textual representation |
|
58 * and pushes it to the CleanupStack. |
|
59 * @return a textual representation of the complete header, |
|
60 * the ownership is transferred |
|
61 */ |
|
62 IMPORT_C HBufC8* ToTextLC() const; |
|
63 |
|
64 /** |
|
65 * Encodes the header's value into its textual representation |
|
66 * and pushes it to the CleanupStack. |
|
67 * @return a textual representation of the header's value, |
|
68 * the ownership is transferred |
|
69 */ |
|
70 IMPORT_C HBufC8* ToTextValueLC() const; |
|
71 |
|
72 protected: // pure virtuals |
|
73 |
|
74 /** |
|
75 * Gets the full name of the header |
|
76 * The function is implemented in each of the sub-classes. |
|
77 * @return the full name of the header for example "From-Path" |
|
78 */ |
|
79 virtual RStringF Name() const = 0; |
|
80 |
|
81 /** |
|
82 * Encodes the header's value into its textual representation. |
|
83 * @return a textual representation of the header's value, |
|
84 * the ownership is transferred |
|
85 */ |
|
86 virtual HBufC8* ToTextValueL() const = 0; |
|
87 |
|
88 protected: // Constructors |
|
89 |
|
90 CMSRPHeaderBase(); |
|
91 }; |
|
92 |
|
93 #endif // CMSRPHEADERBASE_H |
|
94 |
|
95 // End of File |