|
1 /* |
|
2 * Copyright (c) 2002 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 * This class contains utility of storing and using flags |
|
16 * with message editor model |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef INC_MSGEDITORFLAGS_H |
|
23 #define INC_MSGEDITORFLAGS_H |
|
24 |
|
25 // ========== INCLUDE FILES ================================ |
|
26 |
|
27 #include <e32std.h> |
|
28 |
|
29 // ========== CONSTANTS ==================================== |
|
30 |
|
31 // ========== MACROS ======================================= |
|
32 |
|
33 // ========== DATA TYPES =================================== |
|
34 |
|
35 // ========== FUNCTION PROTOTYPES ========================== |
|
36 |
|
37 // ========== FORWARD DECLARATIONS ========================= |
|
38 |
|
39 class RWriteStream; |
|
40 class RReadStream; |
|
41 |
|
42 // ========== CLASS DECLARATION ============================ |
|
43 |
|
44 /** |
|
45 * Utility class of storing and using flags with message editor model. |
|
46 * |
|
47 */ |
|
48 class TMsgEditorFlags |
|
49 { |
|
50 |
|
51 public: // constructors |
|
52 |
|
53 /** |
|
54 * Constructor. |
|
55 */ |
|
56 IMPORT_C TMsgEditorFlags(); |
|
57 |
|
58 /** |
|
59 * Copy constructor. |
|
60 * @param aFlags |
|
61 */ |
|
62 IMPORT_C TMsgEditorFlags(const TMsgEditorFlags& aFlags); |
|
63 |
|
64 /** |
|
65 * Constructor. |
|
66 * @param aMask |
|
67 */ |
|
68 IMPORT_C TMsgEditorFlags(TUint32 aMask); |
|
69 |
|
70 /** |
|
71 * Assignment operator. |
|
72 * @param aFlags |
|
73 * @return |
|
74 */ |
|
75 IMPORT_C TMsgEditorFlags& operator=(const TMsgEditorFlags& aFlags); |
|
76 |
|
77 public: // management |
|
78 |
|
79 /** |
|
80 * Sets the given flags (several flags may be set at the same time). |
|
81 * @param aMask |
|
82 */ |
|
83 IMPORT_C void Set(TUint32 aMask); |
|
84 |
|
85 /** |
|
86 * Clears given flags. |
|
87 * @param aMask |
|
88 */ |
|
89 IMPORT_C void Clear(TUint32 aMask); |
|
90 |
|
91 /** |
|
92 * Returns ETrue, if all flags defined in aFlag parameter are set. |
|
93 * @param aMask |
|
94 * @return |
|
95 */ |
|
96 IMPORT_C TBool IsSet(TUint32 aMask) const; |
|
97 |
|
98 public: // storing and restoring |
|
99 |
|
100 /** |
|
101 * Write flags into given stream. |
|
102 * @param aStream |
|
103 */ |
|
104 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
105 |
|
106 /** |
|
107 * Read flags from given stream. |
|
108 * @param aStream |
|
109 */ |
|
110 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
111 |
|
112 private: // data |
|
113 |
|
114 TUint32 iFlags; |
|
115 |
|
116 }; |
|
117 |
|
118 #endif |
|
119 |
|
120 // End of File |