37
|
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:
|
|
15 |
* Class that does processing for Phone Engine messages that are common
|
|
16 |
* for all GSM 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 GSM class need to implement these same handlings
|
|
20 |
* for the same messages.
|
|
21 |
*
|
|
22 |
*/
|
|
23 |
|
|
24 |
|
|
25 |
#ifndef CPHONEGENERALGSMMESSAGESHANDLER_H
|
|
26 |
#define CPHONEGENERALGSMMESSAGESHANDLER_H
|
|
27 |
|
|
28 |
// INCLUDES
|
|
29 |
#include <w32std.h>
|
|
30 |
|
|
31 |
// FORWARD DECLARATIONS
|
|
32 |
class MPhoneStateMachine;
|
|
33 |
class MPhoneViewCommandHandle;
|
|
34 |
class MPhoneState;
|
|
35 |
|
|
36 |
// CLASS DECLARATION
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Class that does processing for Phone Engine messages that are common
|
|
40 |
* for all GSM states. Most of the GSM states are intressed of these
|
|
41 |
* messages but due to the class architecture they don't have any single
|
|
42 |
* state class to be put into. This class exists to minimize duplicate
|
|
43 |
* code so that not every GSM class need to implement these same handlings
|
|
44 |
* for the same messages.
|
|
45 |
*
|
|
46 |
*/
|
|
47 |
class CPhoneGeneralGsmMessagesHandler : public CBase
|
|
48 |
{
|
|
49 |
public:
|
|
50 |
|
|
51 |
/**
|
|
52 |
* Creates the General GSM Messages Handler instance
|
|
53 |
* @param aPhoneState: active state
|
|
54 |
* @param aViewCommandHandle: handle to the PhoneUIView
|
|
55 |
* @return an instance of class CPhoneGeneralGsmMessagesHandler
|
|
56 |
*/
|
|
57 |
static CPhoneGeneralGsmMessagesHandler* NewL(
|
|
58 |
MPhoneStateMachine& aStateMachine,
|
|
59 |
MPhoneViewCommandHandle& aViewCommandHandle,
|
|
60 |
MPhoneState& aActiveState );
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Destructor.
|
|
64 |
*/
|
|
65 |
virtual ~CPhoneGeneralGsmMessagesHandler();
|
|
66 |
|
|
67 |
/**
|
|
68 |
* A message handling function for Phone Engine messages
|
|
69 |
* @param aMessage Message from Phone Engine
|
|
70 |
* @param aCallId Call id the message concerns
|
|
71 |
*/
|
|
72 |
void HandlePhoneEngineMessageL(
|
|
73 |
const TInt aMessage,
|
|
74 |
TInt aCallId );
|
|
75 |
|
|
76 |
|
|
77 |
private:
|
|
78 |
|
|
79 |
/**
|
|
80 |
* By default EPOC constructor is private.
|
|
81 |
*/
|
|
82 |
CPhoneGeneralGsmMessagesHandler(
|
|
83 |
MPhoneStateMachine& aStateMachine,
|
|
84 |
MPhoneViewCommandHandle& aViewCommandHandle,
|
|
85 |
MPhoneState& aActiveState );
|
|
86 |
|
|
87 |
|
|
88 |
private:
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Show global InfoNote
|
|
92 |
* @param aResourceId resource id to be resolved
|
|
93 |
*/
|
|
94 |
void SendGlobalInfoNoteL( TInt aResourceId );
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Shows divert indication or sets internal divert flag
|
|
98 |
* depending in which order we receive Incoming and
|
|
99 |
* CallForwarded messages.
|
|
100 |
*/
|
|
101 |
void HandleIncomingCallForwardedL();
|
|
102 |
|
|
103 |
/**
|
|
104 |
* Shows software version note
|
|
105 |
*/
|
|
106 |
void HandleShowVersionL();
|
|
107 |
|
|
108 |
/**
|
|
109 |
* Show global ErrorNote
|
|
110 |
* @param aResourceId resource id to be resolved
|
|
111 |
*/
|
|
112 |
void SendGlobalErrorNoteL( TInt aResourceId );
|
|
113 |
|
|
114 |
|
|
115 |
private:
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Currently active state.
|
|
119 |
*/
|
|
120 |
MPhoneStateMachine& iStateMachine;
|
|
121 |
|
|
122 |
/**
|
|
123 |
* Handle for sending view commands.
|
|
124 |
*/
|
|
125 |
MPhoneViewCommandHandle& iViewCommandHandle;
|
|
126 |
|
|
127 |
/**
|
|
128 |
* Currently active state object.
|
|
129 |
*/
|
|
130 |
MPhoneState& iActiveState;
|
|
131 |
|
|
132 |
};
|
|
133 |
|
|
134 |
#endif // CPHONEGENERALGSMMESSAGESHANDLER_H
|
|
135 |
|
|
136 |
// End of File
|