24
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#ifndef CTSYSYSTEMSTATEPLUGIN_H
|
|
17 |
#define CTSYSYSTEMSTATEPLUGIN_H
|
|
18 |
|
|
19 |
#include <e32base.h>
|
|
20 |
#include "ctsysystemstatepluginhandler.h"
|
|
21 |
|
|
22 |
|
|
23 |
#include <ssm/ssmadaptationcli.h>
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
class CChangeRfForEmergencyCall;
|
|
28 |
|
|
29 |
/*
|
|
30 |
*/
|
|
31 |
class CCtsySystemStatePlugin : public CCtsySystemStatePluginService
|
|
32 |
{
|
|
33 |
friend class CChangeRfForEmergencyCall;
|
|
34 |
|
|
35 |
public:
|
|
36 |
static CCtsySystemStatePlugin* NewL();
|
|
37 |
~CCtsySystemStatePlugin();
|
|
38 |
|
|
39 |
protected: //From CCtsySystemStatePluginService
|
|
40 |
TInt Connect();
|
|
41 |
void ActivateRfForEmergencyCall(MCtsySsmPluginCallback* aSsmPluginCallback, TCtsySsmCallbackData& aCallbackData);
|
|
42 |
void DeactivateRfAfterEmergencyCall();
|
|
43 |
void Close();
|
|
44 |
|
|
45 |
protected:
|
|
46 |
CCtsySystemStatePlugin();
|
|
47 |
void ConstructL();
|
|
48 |
|
|
49 |
// Active object for do RF state changing
|
|
50 |
CChangeRfForEmergencyCall* iAoChangeRfForEmergencyCall;
|
|
51 |
RSsmEmergencyCallRfAdaptation iSsmEmergencyCallRf;
|
|
52 |
|
|
53 |
TBool iConnected;
|
|
54 |
|
|
55 |
};
|
|
56 |
|
|
57 |
/*
|
|
58 |
Active object for changing Rf State
|
|
59 |
*/
|
|
60 |
class CChangeRfForEmergencyCall : public CActive
|
|
61 |
{
|
|
62 |
public:
|
|
63 |
enum TBusyType
|
|
64 |
{
|
|
65 |
ENotBusy,
|
|
66 |
EActivateBusy,
|
|
67 |
EDeactivateBusy
|
|
68 |
};
|
|
69 |
|
|
70 |
public:
|
|
71 |
CChangeRfForEmergencyCall(CCtsySystemStatePlugin& iCtsySystemStatePlugin,
|
|
72 |
RSsmEmergencyCallRfAdaptation& aSsmEmergencyCallRf);
|
|
73 |
~CChangeRfForEmergencyCall();
|
|
74 |
|
|
75 |
void ActivateRfForEmergencyCall(MCtsySsmPluginCallback* aSsmPluginCallback, TCtsySsmCallbackData& aCallbackData);
|
|
76 |
void DeactivateRfAfterEmergencyCall();
|
|
77 |
|
|
78 |
// indicate if there is any request to CTSY
|
|
79 |
TBool Busy();
|
|
80 |
|
|
81 |
// from CActive
|
|
82 |
private:
|
|
83 |
void RunL();
|
|
84 |
void DoCancel();
|
|
85 |
|
|
86 |
private: // data
|
|
87 |
// pointer to interface to call in RunL
|
|
88 |
MCtsySsmPluginCallback* iSsmPluginCallback;
|
|
89 |
|
|
90 |
// As RSsmEmergencyCallRfAdaptation allows
|
|
91 |
//only one request is allowed to be outstanding for each connected session.
|
|
92 |
// we have to keep it in mind.
|
|
93 |
TBusyType iBusy;
|
|
94 |
|
|
95 |
CCtsySystemStatePlugin& iCtsySystemStatePlugin;
|
|
96 |
RSsmEmergencyCallRfAdaptation& iSsmEmergencyCallRf;
|
|
97 |
|
|
98 |
// data to pass into callback
|
|
99 |
TCtsySsmCallbackData iCallbackData;
|
|
100 |
};
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
#endif
|