|
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 * Messaging Text Info class. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MSGTEXTINFO_H |
|
22 #define __MSGTEXTINFO_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include <e32std.h> |
|
27 #include <f32file.h> |
|
28 |
|
29 #include <msgmediainfo.h> |
|
30 |
|
31 // CONSTANTS |
|
32 |
|
33 // MACROS |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 |
|
37 class RFile; |
|
38 class TDataType; |
|
39 |
|
40 // DATA TYPES |
|
41 |
|
42 // FUNCTION PROTOTYPES |
|
43 |
|
44 // CLASS DECLARATION |
|
45 |
|
46 /** |
|
47 * Messaging Text Info class. |
|
48 * |
|
49 * @lib MsgMedia.lib |
|
50 * @since 3.1 |
|
51 */ |
|
52 NONSHARABLE_CLASS( CMsgTextInfo ) : public CMsgMediaInfo |
|
53 { |
|
54 public: // New methods |
|
55 |
|
56 /** |
|
57 * Factory method that creates this object. |
|
58 * |
|
59 * @param aFile IN File handle to create info class from. |
|
60 * @param aMimeType IN Mime type of the file. |
|
61 * @param aFs IN Reference to a file server session |
|
62 * @return pointer to instance |
|
63 */ |
|
64 IMPORT_C static CMsgTextInfo* NewL( |
|
65 RFile& aFile, |
|
66 TDataType& aMimeType, |
|
67 RFs& aFs ); |
|
68 |
|
69 /** |
|
70 * Destructor |
|
71 */ |
|
72 virtual ~CMsgTextInfo(); |
|
73 |
|
74 /** |
|
75 * Get character set |
|
76 * |
|
77 * @return charset |
|
78 */ |
|
79 inline TUint CharacterSet() const; |
|
80 |
|
81 /** |
|
82 * Set character set |
|
83 * This can be used to disable automatic character set recognition. |
|
84 * |
|
85 * @param aCharSet IN Character set CharConv id |
|
86 */ |
|
87 inline void SetCharacterSet( TUint aCharSet ); |
|
88 |
|
89 protected: |
|
90 |
|
91 /** |
|
92 * From CActive |
|
93 */ |
|
94 void DoCancel(); |
|
95 |
|
96 /** |
|
97 * From CActive |
|
98 */ |
|
99 void RunL(); |
|
100 |
|
101 protected: |
|
102 |
|
103 /** |
|
104 * Constructor. |
|
105 * |
|
106 * @param aMimeType IN Mime type of the file. |
|
107 * @param aFs IN Reference to a file server session |
|
108 */ |
|
109 CMsgTextInfo( TDataType& aMimeType, RFs& aFs ); |
|
110 |
|
111 /** |
|
112 * 2nd phase constructor. |
|
113 * |
|
114 * @param aFile IN File handle to create info class from. |
|
115 */ |
|
116 void ConstructL( RFile& aFile ); |
|
117 |
|
118 /** |
|
119 * Initialize members for empty instance. |
|
120 */ |
|
121 void ConstructEmpty(); |
|
122 |
|
123 protected: // data |
|
124 |
|
125 RFs& iFs; |
|
126 TUint iCharSet; |
|
127 TBool iCharSetRecognized; |
|
128 |
|
129 }; |
|
130 |
|
131 #include <msgtextinfo.inl> |
|
132 |
|
133 #endif // __MSGTEXTINFO_H |