24
|
1 |
// Copyright (c) 2004-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 |
// PDP FSM states header
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalComponent
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef TPDPSTATES_H
|
|
24 |
#define TPDPSTATES_H
|
|
25 |
|
|
26 |
#include "tpdpstate.h"
|
|
27 |
#include "spudfsmdebuglogger.h"
|
|
28 |
|
|
29 |
class CPdpFsm;
|
|
30 |
|
|
31 |
#if _DEBUG
|
|
32 |
#define DEFINE_TPDPSTATE_CLASS(state) _LIT(KName##state, #state); \
|
|
33 |
NONSHARABLE_CLASS(TPdpState##state) : public TPdpState \
|
|
34 |
{ \
|
|
35 |
public: \
|
|
36 |
TPdpState##state (CPdpFsmFactory * aPdpFsmFactory) \
|
|
37 |
{ \
|
|
38 |
SPUDFSMVERBOSE_FNLOG("TPdpState" L ## #state L"::TPdpState" L ## #state L"()"); \
|
|
39 |
iName = KName##state; \
|
|
40 |
iPdpFsmFactory = aPdpFsmFactory; \
|
|
41 |
} \
|
|
42 |
TInt Input (CPdpFsm& aFsm, const TInt aOperation, const TInt aParam); \
|
|
43 |
private: \
|
|
44 |
TInt iErrorCode; \
|
|
45 |
};
|
|
46 |
#else
|
|
47 |
#define DEFINE_TPDPSTATE_CLASS(state) NONSHARABLE_CLASS(TPdpState##state) : public TPdpState \
|
|
48 |
{ \
|
|
49 |
public: \
|
|
50 |
TPdpState##state (CPdpFsmFactory * aPdpFsmFactory) \
|
|
51 |
{ \
|
|
52 |
SPUDFSMVERBOSE_FNLOG("TPdpState" L ## #state L"::TPdpState" L ## #state L"()"); \
|
|
53 |
iPdpFsmFactory = aPdpFsmFactory; \
|
|
54 |
} \
|
|
55 |
TInt Input (CPdpFsm& aFsm, TInt aOperation, TInt aErrorCode); \
|
|
56 |
private: \
|
|
57 |
TInt iErrorCode; \
|
|
58 |
};
|
|
59 |
#endif
|
|
60 |
|
|
61 |
DEFINE_TPDPSTATE_CLASS(Initialised)
|
|
62 |
DEFINE_TPDPSTATE_CLASS(OpeningPhone)
|
|
63 |
DEFINE_TPDPSTATE_CLASS(CreatingPrimary)
|
|
64 |
DEFINE_TPDPSTATE_CLASS(ActivatingPrimary)
|
|
65 |
DEFINE_TPDPSTATE_CLASS(CreatingSecondary)
|
|
66 |
DEFINE_TPDPSTATE_CLASS(CreatedSecondary)
|
|
67 |
DEFINE_TPDPSTATE_CLASS(SettingQoS)
|
|
68 |
DEFINE_TPDPSTATE_CLASS(SettingTFT)
|
|
69 |
DEFINE_TPDPSTATE_CLASS(ActivatingSecondary)
|
|
70 |
DEFINE_TPDPSTATE_CLASS(Open)
|
|
71 |
DEFINE_TPDPSTATE_CLASS(ChangingQoS)
|
|
72 |
DEFINE_TPDPSTATE_CLASS(ChangingTFT)
|
|
73 |
DEFINE_TPDPSTATE_CLASS(ModifyingActive)
|
|
74 |
DEFINE_TPDPSTATE_CLASS(Suspended)
|
|
75 |
DEFINE_TPDPSTATE_CLASS(Closing)
|
|
76 |
DEFINE_TPDPSTATE_CLASS(Stopping)
|
|
77 |
|
|
78 |
|
|
79 |
#endif // TPDPSTATES_H
|