|
1 /* |
|
2 * Copyright (c) 2007 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: Idle state description |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef NSPSTATEIDLE_H |
|
19 #define NSPSTATEIDLE_H |
|
20 |
|
21 #include "nspstatebase.h" |
|
22 |
|
23 /** |
|
24 * State from where state machine starts after initialization. |
|
25 * |
|
26 * Media streams are created according to initial Sdp document. |
|
27 * |
|
28 * @lib natfwsdpprovider.dll |
|
29 * @since S60 3.2 |
|
30 */ |
|
31 class CNSPStateIdle : public CNSPStateBase |
|
32 { |
|
33 public: // Constructors and destructor |
|
34 |
|
35 /** |
|
36 * A two-phase constructor. |
|
37 */ |
|
38 static CNSPStateIdle* NewL(); |
|
39 |
|
40 /** |
|
41 * A two-phase constructor. |
|
42 */ |
|
43 static CNSPStateIdle* NewLC(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CNSPStateIdle(); |
|
49 |
|
50 |
|
51 private: // Constructors and destructor |
|
52 |
|
53 CNSPStateIdle(); |
|
54 |
|
55 |
|
56 protected: // From CNSPStateBase |
|
57 |
|
58 /** |
|
59 * Called to check if individual state accepts event, i.e. |
|
60 * whether to execute DoApplyL. |
|
61 * |
|
62 * @since S60 3.2 |
|
63 * @param aEvent State machine event. |
|
64 * @return ETrue if event is accepted, EFalse otherwise. |
|
65 */ |
|
66 TBool DoAcceptL( TNSPStateMachineEvent& aEvent ); |
|
67 |
|
68 /** |
|
69 * Called when the state is entered. |
|
70 * |
|
71 * @since S60 3.2 |
|
72 * @param aEvent State machine event. |
|
73 */ |
|
74 void DoStateEntryL( TNSPStateMachineEvent& aEvent ); |
|
75 |
|
76 /** |
|
77 * Called when state entry to next state will leave, and return |
|
78 * into 'this' state must be done. |
|
79 * |
|
80 * @since S60 3.2 |
|
81 * @param aEvent State machine event. |
|
82 */ |
|
83 void DoReverse( TNSPStateMachineEvent& aEvent ); |
|
84 |
|
85 /** |
|
86 * Current state is applied with this method. |
|
87 * |
|
88 * @since S60 3.2 |
|
89 * @param aEvent State machine event. |
|
90 */ |
|
91 void DoApplyL( TNSPStateMachineEvent& aEvent ); |
|
92 |
|
93 /** |
|
94 * Current state is exited with this method. |
|
95 * |
|
96 * @since S60 3.2 |
|
97 * @param aEvent State machine event. |
|
98 */ |
|
99 void DoExitL( TNSPStateMachineEvent& aEvent ); |
|
100 |
|
101 |
|
102 private: |
|
103 |
|
104 void ApplyCreateOfferL( TNSPStateMachineEvent& aEvent ) const; |
|
105 |
|
106 void ApplyResolveL( TNSPStateMachineEvent& aEvent ) const; |
|
107 |
|
108 }; |
|
109 |
|
110 #endif // NSPSTATEIDLE_H |
|
111 |
|
112 // end of file |