28
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2009 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 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
/** @file
|
|
19 |
@internalComponent
|
|
20 |
@test
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef SIMPANCOMMAND_H
|
|
24 |
#define SIMPANCOMMAND_H
|
|
25 |
|
|
26 |
#include "commandengine.h"
|
|
27 |
#include <e32property.h>
|
|
28 |
|
|
29 |
// This is a local definition of this shared enum of P&S key values. These values should not be changed without changing
|
|
30 |
// the equivalent definition in the other IP bearer code.
|
|
31 |
enum TIPBearerCoexistenceStatus
|
|
32 |
{
|
|
33 |
ENoneIsActive,
|
|
34 |
ENcmIsActive,
|
|
35 |
EBTPanIsActive
|
|
36 |
};
|
|
37 |
|
|
38 |
// This is a local definition of this shared P&S id. This value should not be changed without changing
|
|
39 |
// the equivalent definition in the other IP bearer code.
|
|
40 |
const TInt KIPBearerCoexistenceProperty = 0x10286a95;
|
|
41 |
|
|
42 |
// This is the identifer of the shared mutex used to allow safe read / write of the coexistence P&S key.
|
|
43 |
// This can only be changed if all other existing definitions of the mutex name are also changed.
|
|
44 |
_LIT(KIPBearerCoexistenceMutex, "IPBearerCoexistenceMutex");
|
|
45 |
|
|
46 |
//static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
|
|
47 |
//static _LIT_SECURITY_POLICY_C1(KNetworkControlPolicy, ECapabilityNetworkControl);
|
|
48 |
|
|
49 |
|
|
50 |
NONSHARABLE_CLASS(CSimPANCommand) : public CNcmCommandBase
|
|
51 |
/**
|
|
52 |
Simulate PAN has an active connection or not.
|
|
53 |
It is also response for display the exclusive state on main console
|
|
54 |
*/
|
|
55 |
{
|
|
56 |
public:
|
|
57 |
static CSimPANCommand* NewL(CUsbNcmConsole& aUsb, TUint aKey);
|
|
58 |
~CSimPANCommand();
|
|
59 |
|
|
60 |
public:
|
|
61 |
//From CNcmCommandBase
|
|
62 |
void DoCommandL();
|
|
63 |
|
|
64 |
private:
|
|
65 |
CSimPANCommand(CUsbNcmConsole& aUsb, TUint aKey);
|
|
66 |
void ConstructL();
|
|
67 |
|
|
68 |
private:
|
|
69 |
//From CActive
|
|
70 |
void RunL();
|
|
71 |
void DoCancel();
|
|
72 |
TInt RunError(TInt aError);
|
|
73 |
|
|
74 |
private:
|
|
75 |
//Display the exclusive state on main screen
|
|
76 |
void DisplayExclusive(TInt aState);
|
|
77 |
//When the PAN is active, the command description should be
|
|
78 |
//changed to 'Simulate PAN disactive'
|
|
79 |
void ChangeDescription();
|
|
80 |
|
|
81 |
private:
|
|
82 |
//Indicate the PAN is active or not
|
|
83 |
TBool iSetPAN;
|
|
84 |
//The property which store the exclusive state
|
|
85 |
RProperty iNcmExclusiveProp;
|
|
86 |
};
|
|
87 |
|
|
88 |
#endif // SIMPANCOMMAND_H
|