|
1 /* |
|
2 * Copyright (c) 2006 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: General utitity services for IM UI |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCAUINGUTILS_H |
|
21 #define CCAUINGUTILS_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <badesca.h> |
|
25 #include "impsbuilddefinitions.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MCAPresence; |
|
29 class CEikMenuPane; |
|
30 class CGulIcon; |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * General utitity services for IM UI |
|
35 */ |
|
36 // This is not a C-class although it begins with a CA |
|
37 // Note: CodeScanner Warning to be ignored. |
|
38 class CCAUINGUtils |
|
39 { |
|
40 public: |
|
41 |
|
42 enum TChatContactListCreationType |
|
43 { |
|
44 EChatNoContactList = -1, |
|
45 EChatContactListExists = 1, |
|
46 EChatContactListWasCreated = 2 |
|
47 }; |
|
48 public: |
|
49 |
|
50 |
|
51 /** |
|
52 * Tries to create a new contact list. |
|
53 * Asks a name of the list from user and shows |
|
54 * appropriate notes if an error occurs |
|
55 * @param aIndex ,index of reference of newly added contact list |
|
56 * @return KErrNone if successfull, otherwise an error code. |
|
57 */ |
|
58 static TInt NewContactListL( TInt& aIndex ); |
|
59 |
|
60 /** |
|
61 * Verifies the we have at least one contact list |
|
62 * else tries to create one |
|
63 * @return EChatNoContactList if there was no contact lists, and |
|
64 * creation failed. |
|
65 * EChatContactListExists if there was at least one contact |
|
66 * list. |
|
67 * EChatContactListWasCreated if there was none and a new list |
|
68 * was created |
|
69 */ |
|
70 static TChatContactListCreationType VerifyContactlistL(); |
|
71 |
|
72 /** |
|
73 * Sets title-text and updates navi-group |
|
74 * @since 2.1 |
|
75 * @param aResourceId Resource id for title text |
|
76 * @param aViewId View id for updating navi-group |
|
77 */ |
|
78 static void SetTitleL( TInt aResourceId, const TUid aViewId ); |
|
79 |
|
80 /** |
|
81 * Handles given error. With partial success, errornote will be |
|
82 * displayed. Otherwise leaves with aError. |
|
83 * @since 2.1 |
|
84 * @param aError Errorcode |
|
85 */ |
|
86 static void HandleErrorL( TInt aError ); |
|
87 |
|
88 /** |
|
89 * Handles partial successful errors |
|
90 * @since 2.1 |
|
91 */ |
|
92 static void HandlePartialSuccessL(); |
|
93 |
|
94 /** |
|
95 * Displays error-note |
|
96 * @since 2.1 |
|
97 * @param aResourceId Resource id for note text. |
|
98 */ |
|
99 static void DisplayErrorNoteL( TInt aResourceId ); |
|
100 |
|
101 }; |
|
102 |
|
103 #endif // CCAUINGUTILS_H |
|
104 |
|
105 // End of File |