|
1 /* |
|
2 * Copyright (c) 2007-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 * Name : sipprflderegistrationinprogressstate.h |
|
16 * Part of : sip profile fsm |
|
17 * Version : %version: 2.1.1 % |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 #ifndef CSIPPRFLDEREGISTERATIONINPROGRESSSTATE_H |
|
29 #define CSIPPRFLDEREGISTERATIONINPROGRESSSTATE_H |
|
30 |
|
31 // INCLUDES |
|
32 #include "sipprflstatebase.h" |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CSIPConcreteProfile; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 /** |
|
39 * Reacts to events that are possible in |
|
40 * "Deregistration in Progress" state. Profile is in this |
|
41 * state if (de)REGISTER was successfully sent to the |
|
42 * remote SIP server. |
|
43 */ |
|
44 class CSIPPrflDeregistrationInProgressState: public CSIPPrflStateBase |
|
45 { |
|
46 public:// Constructors and destructor |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @param aUser user for the state machine |
|
50 */ |
|
51 IMPORT_C static CSIPPrflDeregistrationInProgressState* NewL( |
|
52 MSIPProfileFSMUser& aUser); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 IMPORT_C ~CSIPPrflDeregistrationInProgressState(); |
|
58 |
|
59 public://new functions |
|
60 /** |
|
61 * Links states |
|
62 * @param aInitState "Init" state |
|
63 */ |
|
64 IMPORT_C void LinkStates( |
|
65 CSIPPrflStateBase& aInitState); |
|
66 |
|
67 public://functions from base class |
|
68 |
|
69 CSIPConcreteProfile::TStatus ConcreteProfileState() const; |
|
70 |
|
71 /** |
|
72 * A SIP response creating a registration binding or an error response |
|
73 * that is related to an refreshed registration binding |
|
74 * has been received from the network. |
|
75 * Moves profile to "Init" state. |
|
76 * @param aContext a profile context |
|
77 * @param aTransaction contains response elements. |
|
78 */ |
|
79 void ResponseReceived( |
|
80 MSIPProfileContext& aContext, |
|
81 CSIPClientTransaction& aTransaction); |
|
82 |
|
83 /** |
|
84 * An asynchronous error has occurred in the stack related |
|
85 * to the request indicated by the given transaction. |
|
86 * Moves profile to "Init" state. |
|
87 * @param aContext a profile context |
|
88 * @param aError error code |
|
89 */ |
|
90 void ErrorOccured( |
|
91 MSIPProfileContext& aContext, |
|
92 TInt aError); |
|
93 |
|
94 /** |
|
95 * Connection state has changed; connection can change to |
|
96 * "inactive" state. |
|
97 * Moves profile to "Init" state or |
|
98 * In case of UnAvailable connection report error to client and move profile to "Init" state |
|
99 * @param aContext a profile context |
|
100 * @param aState indicates the current connection state |
|
101 */ |
|
102 void ConnectionStateChanged( |
|
103 MSIPProfileContext& aContext, |
|
104 CSIPConnection::TState aState); |
|
105 |
|
106 /** |
|
107 * In this state register is always pending. |
|
108 * @returns ETrue |
|
109 */ |
|
110 TBool IsRegisterPending() const; |
|
111 |
|
112 private: |
|
113 /** |
|
114 * Constructor. |
|
115 */ |
|
116 CSIPPrflDeregistrationInProgressState(MSIPProfileFSMUser& aUser); |
|
117 |
|
118 private: // Data |
|
119 |
|
120 CSIPPrflStateBase* iInitState; |
|
121 CSIPPrflStateBase* iDeregisterRequestedState; |
|
122 }; |
|
123 |
|
124 #endif // CSIPPRFLDEREGISTERATIONINPROGRESSSTATE_H |
|
125 |