|
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: |
|
15 * Class that does processing for Phone Engine messages that are common |
|
16 * for all VoIP states. Most of the GSM states are intressed of these |
|
17 * messages but due to the class architecture they don't have any single |
|
18 * state class to be put into. This class exists to minimize duplicate |
|
19 * code so that not every VoIP class need to implement these same handlings |
|
20 * for the same messages. |
|
21 * |
|
22 */ |
|
23 |
|
24 |
|
25 #ifndef __CPHONEVOIPERRORMESSAGESHANDLER_H |
|
26 #define __CPHONEVOIPERRORMESSAGESHANDLER_H |
|
27 |
|
28 // INCLUDES |
|
29 #include <w32std.h> |
|
30 #include "cphoneerrormessageshandler.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class MPhoneErrorMessagesHandlerRegister; |
|
34 class MPhoneViewCommandHandle; |
|
35 class CPhoneCustomizationVoip; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Class that does processing for Phone Engine error messages that are common |
|
41 * for all protocols. |
|
42 * |
|
43 */ |
|
44 NONSHARABLE_CLASS( CPhoneVoIPErrorMessagesHandler ): public CPhoneErrorMessagesHandler |
|
45 { |
|
46 public: |
|
47 /** |
|
48 * Creates the error handler instance |
|
49 * @param aPhoneState: active state |
|
50 * @param aViewCommandHandle: handle to the PhoneUIView |
|
51 * @return an instance of class CPhoneErrorMessagesHandler |
|
52 */ |
|
53 static CPhoneVoIPErrorMessagesHandler* NewL( |
|
54 MPhoneViewCommandHandle* aViewCommandHandle, |
|
55 MPhoneStateMachine* aPhoneStateMachine ); |
|
56 |
|
57 public: //From MPhoneErrorMessagesHandler |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CPhoneVoIPErrorMessagesHandler(); |
|
63 |
|
64 /** |
|
65 * Shows error specific notes, ie. error, warning and info notes |
|
66 * related to the given error. |
|
67 * @param aErrorInfo - Error info from Phone Engine |
|
68 */ |
|
69 void ShowErrorSpecificNoteL( const TPEErrorInfo& aErrorInfo ); |
|
70 |
|
71 |
|
72 public: |
|
73 |
|
74 /** |
|
75 * Shows global error note |
|
76 * @param aResourceId Text resource id for error note |
|
77 * @param aText Text to be shown in error text |
|
78 */ |
|
79 void SendGlobalErrorNoteWithTextL( TInt aResourceId, RBuf& aText ); |
|
80 |
|
81 /** |
|
82 * Gets name of specific service provider |
|
83 * @param aServiceName Contains service provider name on return |
|
84 * @param aServiceId Id of the service |
|
85 */ |
|
86 void GetServiceProviderNameL( RBuf& aServiceName, TUint32 aServiceId ); |
|
87 |
|
88 /** |
|
89 * Shows error note that contains service name |
|
90 * @param aResourceId Text resource id for error note |
|
91 * @param aServiceId Id of the service which name will be shown on note |
|
92 */ |
|
93 void ShowErrorNoteWithServiceNameL( |
|
94 TInt aResourceId, |
|
95 TUint32 aServiceId ); |
|
96 |
|
97 protected: |
|
98 |
|
99 CPhoneVoIPErrorMessagesHandler( |
|
100 MPhoneViewCommandHandle* aViewCommandHandle, |
|
101 MPhoneStateMachine* aPhoneStateMachine ); |
|
102 |
|
103 void ConstructL(); |
|
104 |
|
105 private: |
|
106 |
|
107 /** |
|
108 * Return ETrue if voip call. |
|
109 */ |
|
110 TBool IsVoIPCall( const TInt aCallId ) const; |
|
111 |
|
112 /** |
|
113 * Handle hold and resume error notes. |
|
114 */ |
|
115 void HandleHoldErrorNotesL( const TInt aCallId, TBool aHold ); |
|
116 |
|
117 /** |
|
118 * Return remote info data, if available |
|
119 * @param aCallid call id |
|
120 * @param aData the returned remote info data |
|
121 */ |
|
122 void GetRemoteInfoDataL( TInt aCallId, TDes& aData ) const; |
|
123 |
|
124 /** |
|
125 * Shows service registration specific error notes |
|
126 * @param aErrorCode - CCH error code |
|
127 */ |
|
128 void ShowRegistrationErrorNotesL( TInt aErrorCode ); |
|
129 |
|
130 /** |
|
131 * Check if Swap operation has failed |
|
132 * @ret Return ETrue if Swap has failed |
|
133 */ |
|
134 TBool HasSwapFailed() const; |
|
135 |
|
136 }; |
|
137 |
|
138 #endif // CPHONEVOIPERRORMESSAGESHANDLER_H |
|
139 |
|
140 // End of File |