24
|
1 |
// Copyright (c) 2005-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 __CMAINMENU_H__
|
|
17 |
#define __CMAINMENU_H__
|
|
18 |
|
|
19 |
#include <e32base.h>
|
|
20 |
#include <etel3rdparty.h>
|
|
21 |
|
|
22 |
|
|
23 |
#include "CISVAPIAsync.h"
|
|
24 |
|
|
25 |
#include "CBaseMenuAsync.h"
|
|
26 |
|
|
27 |
// Active objects
|
|
28 |
|
|
29 |
#include "CPhoneId.h"
|
|
30 |
#include "CBatteryInfo.h"
|
|
31 |
#include "CFlightModeInfo.h"
|
|
32 |
#include "CSignalInfo.h"
|
|
33 |
#include "CGetIndicator.h"
|
|
34 |
|
|
35 |
_LIT(KPhoneIdMsg, "Phone Id:\n");
|
|
36 |
_LIT(KGetIndicatorMsg, "Indicator Information:\n");
|
|
37 |
_LIT(KBatteryInfoMsg, "Battery Info:\n");
|
|
38 |
_LIT(KSignalStrengthMsg, "Signal Strength Info:\n");
|
|
39 |
_LIT(KMenuMsg, "Press E to exit\n");
|
|
40 |
|
|
41 |
/**
|
|
42 |
Provides the required functionality for the application to run correctly. Owns
|
|
43 |
the required objects to make Etel 3rd Party calls required by the application.
|
|
44 |
*/
|
|
45 |
class CMainMenu : public CBaseMenuAsync
|
|
46 |
{
|
|
47 |
|
|
48 |
// Methods
|
|
49 |
public:
|
|
50 |
static CMainMenu* NewLC(CConsoleBase& aConsole);
|
|
51 |
~CMainMenu();
|
|
52 |
|
|
53 |
void ExecComplete(TTelISVExampleType aDerivedType);
|
|
54 |
void ExecNotify(TTelISVExampleType aDerivedType);
|
|
55 |
|
|
56 |
private:
|
|
57 |
CMainMenu(CConsoleBase& aConsole);
|
|
58 |
void ConstructL();
|
|
59 |
|
|
60 |
void RunL(); // Handles Key presses
|
|
61 |
void DoCancel();
|
|
62 |
|
|
63 |
// Data
|
|
64 |
private:
|
|
65 |
// Owned active objects
|
|
66 |
/**
|
|
67 |
Active object which demonstrates the use of CTelephony::GetPhoneId()
|
|
68 |
*/
|
|
69 |
CISVAPIAsync* iPhoneId;
|
|
70 |
/**
|
|
71 |
Active object which demonstrates the use of CTelephony::GetBatteryInfo()
|
|
72 |
*/
|
|
73 |
CISVAPIAsync* iBatteryInfo;
|
|
74 |
/**
|
|
75 |
Active object which demonstrates the use of CTelephony::GetSignalStrength()
|
|
76 |
*/
|
|
77 |
CISVAPIAsync* iSignalInfo;
|
|
78 |
/**
|
|
79 |
Active object which demonstrates the use of CTelephony::GetFlightMode()
|
|
80 |
*/
|
|
81 |
CISVAPIAsync* iFlightModeInfo;
|
|
82 |
/**
|
|
83 |
Active object which demonstrates the use of CTelephony::GetIndicator()
|
|
84 |
*/
|
|
85 |
CISVAPIAsync* iGetIndicator;
|
|
86 |
|
|
87 |
};
|
|
88 |
|
|
89 |
#endif // __CMAINMENU_H__
|
|
90 |
|