|
1 /* |
|
2 * Copyright (c) 2005 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 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef TMCETRANSACTIONDATACONTAINER_H |
|
22 #define TMCETRANSACTIONDATACONTAINER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <badesca.h> |
|
27 #include <mcedefs.h> |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Container class to hold detailed data of a transaction. |
|
33 * |
|
34 * It is assumed, that user has only one instance of this class. |
|
35 * The same instance is passed between MCE and user, but the data |
|
36 * inside of this container is just updated for each event. |
|
37 * |
|
38 * The data inside the container is valid only during the execution |
|
39 * of the callback function. After this the remaining data in container |
|
40 * is deleted. |
|
41 * |
|
42 * @lib mceclient.lib |
|
43 */ |
|
44 class TMceTransactionDataContainer |
|
45 { |
|
46 public: |
|
47 |
|
48 /** |
|
49 * Default constructor |
|
50 */ |
|
51 IMPORT_C TMceTransactionDataContainer(); |
|
52 |
|
53 /** |
|
54 * Gets status code |
|
55 * @returns status code of transaction, if any |
|
56 */ |
|
57 IMPORT_C TInt GetStatusCode(); |
|
58 |
|
59 /** |
|
60 * Gets reason phrase. |
|
61 * @returns reason phrase of transaction, if any; |
|
62 * ownership is transferred |
|
63 */ |
|
64 IMPORT_C HBufC8* GetReasonPhrase(); |
|
65 |
|
66 /** |
|
67 * Gets headers. |
|
68 * @returns headers of transaction, if any; |
|
69 * ownership is transferred |
|
70 */ |
|
71 IMPORT_C CDesC8Array* GetHeaders(); |
|
72 |
|
73 /** |
|
74 * Gets content type. |
|
75 * @returns content type of transaction, if any; |
|
76 * ownership is transferred |
|
77 */ |
|
78 IMPORT_C HBufC8* GetContentType(); |
|
79 |
|
80 /** |
|
81 * Gets content headers. |
|
82 * @returns headers of content, if any; |
|
83 * ownership is transferred |
|
84 */ |
|
85 IMPORT_C CDesC8Array* GetContentHeaders(); |
|
86 |
|
87 /** |
|
88 * Gets content. |
|
89 * @returns content of transaction, if any; |
|
90 * ownership is transferred |
|
91 */ |
|
92 IMPORT_C HBufC8* GetContent(); |
|
93 |
|
94 public: |
|
95 |
|
96 void SetStatusCode( TInt aStatusCode ); |
|
97 |
|
98 void SetReasonPhrase( HBufC8* aReasonPhrase ); |
|
99 |
|
100 void SetHeaders( CDesC8Array* aHeaders ); |
|
101 |
|
102 void SetContentType( HBufC8* aContentType ); |
|
103 |
|
104 void SetContent( HBufC8* aContent ); |
|
105 |
|
106 void SetContentHeaders( CDesC8Array* aHeaders ); |
|
107 |
|
108 void Clear(); |
|
109 |
|
110 private: |
|
111 |
|
112 TUint32 iStatusCode; |
|
113 |
|
114 HBufC8* iReasonPhrase; |
|
115 |
|
116 CDesC8Array* iHeaders; |
|
117 |
|
118 HBufC8* iContentType; |
|
119 |
|
120 CDesC8Array* iContentHeaders; |
|
121 |
|
122 HBufC8* iContent; |
|
123 |
|
124 private: // Reserved for future use |
|
125 |
|
126 TAny* iReserved; |
|
127 |
|
128 MCE_UNIT_TEST_DEFS |
|
129 }; |
|
130 |
|
131 #endif |