|
1 /* |
|
2 * Copyright (c) 2007 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: Definition of static utility functions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MENUUTIL_H__ |
|
20 #define __MENUUTIL_H__ |
|
21 |
|
22 #include "mcsmenuitem.h" |
|
23 #include <e32base.h> |
|
24 |
|
25 class RWriteStream; |
|
26 class RReadStream; |
|
27 |
|
28 /** |
|
29 * Static utility functions. |
|
30 */ |
|
31 NONSHARABLE_CLASS( MenuUtil ) |
|
32 { |
|
33 |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Externalize integer array into a stream. |
|
38 * @param aArray Array to externalize. |
|
39 * @param aStream The stream to externalize to. |
|
40 */ |
|
41 static void ExternalizeL |
|
42 ( const RArray<TInt>& aArray, RWriteStream& aStream ); |
|
43 |
|
44 /** |
|
45 * Internalize integer array from a stream. Existing data is kept, |
|
46 * new ones appended. |
|
47 * @param aArray Array to internalize. |
|
48 * @param aStream The stream to externalize from. |
|
49 */ |
|
50 static void InternalizeL |
|
51 ( RArray<TInt>& aArray, RReadStream& aStream ); |
|
52 |
|
53 /** |
|
54 * Externalize uid array into a stream. |
|
55 * @param aArray Array to externalize. |
|
56 * @param aStream The stream to externalize to. |
|
57 */ |
|
58 static void ExternalizeL |
|
59 ( const RArray<TUid>& aArray, RWriteStream& aStream ); |
|
60 |
|
61 /** |
|
62 * Internalize uid array from a stream. Existing data is kept, |
|
63 * new ones appended. |
|
64 * @param aArray Array to internalize. |
|
65 * @param aStream The stream to externalize from. |
|
66 */ |
|
67 static void InternalizeL |
|
68 ( RArray<TUid>& aArray, RReadStream& aStream ); |
|
69 |
|
70 /** |
|
71 * Externalize header array into a stream. |
|
72 * @param aArray Array to externalize. |
|
73 * @param aStream The stream to externalize to. |
|
74 */ |
|
75 static void ExternalizeL |
|
76 ( const RArray<TMenuItem>& aArray, RWriteStream& aStream ); |
|
77 |
|
78 /** |
|
79 * Internalize header array from a stream. Existing data is kept, |
|
80 * new ones appended. |
|
81 * @param aArray Array to internalize. |
|
82 * @param aStream The stream to externalize from. |
|
83 */ |
|
84 static void InternalizeL |
|
85 ( RArray<TMenuItem>& aArray, RReadStream& aStream ); |
|
86 |
|
87 /** |
|
88 * Check if backup operation is in progress. |
|
89 * @return ETrue if backup is in progress. |
|
90 */ |
|
91 static TBool BackupInProgressL(); |
|
92 |
|
93 }; |
|
94 |
|
95 #endif // __MENUUTIL_H__ |