|
1 /* |
|
2 * Copyright (c) 2008 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: utils class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SERVICEWIDGETUTILS_H |
|
20 #define SERVICEWIDGETUTILS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 class CCoeEnv; |
|
26 |
|
27 /** |
|
28 * Utils for imwidget modules. |
|
29 * @lib imwidgetdatapublisher.dll |
|
30 * @since 5.0 |
|
31 */ |
|
32 class ServiceWidgetUtils |
|
33 { |
|
34 public: // new methods |
|
35 |
|
36 /** |
|
37 * Used for removing the domain part from the user id |
|
38 * @param aId The id to process |
|
39 * @param aDomainHiding, is list hiding. |
|
40 * @return TPtrC The id without the domain part |
|
41 */ |
|
42 static TPtrC DisplayId( const TDesC& aId, |
|
43 TBool aDomainHiding = ETrue ); |
|
44 |
|
45 /** |
|
46 * used to load the resource and |
|
47 * @param aResourceId The id to read |
|
48 * @return push onto cleanup stack HBufC* The string for given resource id |
|
49 */ |
|
50 static HBufC* LoadResourceLC( TInt aResourceId, |
|
51 CCoeEnv* aEnv = NULL ); |
|
52 |
|
53 /** |
|
54 * used to load the resource |
|
55 * @param aResourceId The id to read |
|
56 * @param aText %U string. |
|
57 * @return , push onto cleanup stack HBufC* The string for given resource id |
|
58 */ |
|
59 static HBufC* LoadResourceLC( TInt aResourceId , |
|
60 const TDesC& aText, |
|
61 CCoeEnv* aEnv = NULL ); |
|
62 |
|
63 /** |
|
64 * used to load the resource |
|
65 * @param aResourceId The id to read |
|
66 * @param aInt %N integer value to append |
|
67 * @return , push onto cleanup stack HBufC* The string for given resource id |
|
68 */ |
|
69 static HBufC* LoadResourceLC( TInt aResourceId , |
|
70 TInt aInt, |
|
71 CCoeEnv* aEnv = NULL ); |
|
72 |
|
73 /** |
|
74 * used to load the resource |
|
75 * @param aResourceId The id to read |
|
76 * @param aInts array of integer, %0N,%1N integer array. |
|
77 * @param aEnv, a pointer to enviroment |
|
78 * @return , push onto cleanup stack HBufC* The string for given resource id |
|
79 */ |
|
80 static HBufC* LoadResourceLC( TInt aResourceId , |
|
81 const CArrayFix<TInt>& aInts, |
|
82 CCoeEnv* aEnv = NULL ); |
|
83 |
|
84 }; |
|
85 |
|
86 #endif // SERVICEWIDGETUTILS_H |
|
87 |
|
88 // End of File |