|
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 : sipprflinitstate.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 CSIPPRFLINITSTATE_H |
|
29 #define CSIPPRFLINITSTATE_H |
|
30 |
|
31 // INCLUDES |
|
32 #include "sipprflstatebase.h" |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * Reacts to events that are possible in |
|
37 * "Init" state. Profile is in this state |
|
38 * before it is going to be registered. |
|
39 */ |
|
40 class CSIPPrflInitState: public CSIPPrflStateBase |
|
41 { |
|
42 public:// Constructors and destructor |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * @param aUser user for the state machine |
|
46 */ |
|
47 IMPORT_C static CSIPPrflInitState* NewL(MSIPProfileFSMUser& aUser); |
|
48 |
|
49 /** |
|
50 * Destructor |
|
51 */ |
|
52 IMPORT_C ~CSIPPrflInitState(); |
|
53 |
|
54 public://new functions |
|
55 /** |
|
56 * Links the states |
|
57 * @param aResolvingProxiesState "Resolving Proxies" state |
|
58 * @param aRegisterRequestedState "Register Requested" state |
|
59 * @param aRegistrationInProgressState "Registration In Progress" state |
|
60 */ |
|
61 IMPORT_C void LinkStates( |
|
62 CSIPPrflStateBase& aResolvingProxiesState, |
|
63 CSIPPrflStateBase& aRegisterRequestedState, |
|
64 CSIPPrflStateBase& aRegistrationInProgressState); |
|
65 |
|
66 public://functions from base class |
|
67 |
|
68 CSIPConcreteProfile::TStatus ConcreteProfileState() const; |
|
69 |
|
70 /** |
|
71 * Registers the profile. |
|
72 * Moves profile to "Resolving Proxies" state |
|
73 * if dynamic proxy discovery has been enabled for the profile. |
|
74 * Otherwise moves profile toŽ"Register Requested" state in case |
|
75 * of suspended or inactive or init connection or to |
|
76 * "Registration In Progress" state in case of active connection. |
|
77 * according to the connection state. |
|
78 * @param aContext a profile context |
|
79 */ |
|
80 void RegisterL( |
|
81 MSIPProfileContext& aContext); |
|
82 |
|
83 /** |
|
84 * Checks if the profile is in idle state. |
|
85 * @return ETrue if conditions are met. |
|
86 */ |
|
87 TBool IsIdle( MSIPProfileContext& aContext ); |
|
88 |
|
89 private: |
|
90 /** |
|
91 * Constructor. |
|
92 */ |
|
93 CSIPPrflInitState(MSIPProfileFSMUser& aUser); |
|
94 |
|
95 private: // Data |
|
96 |
|
97 CSIPPrflStateBase* iResolvingProxies; |
|
98 CSIPPrflStateBase* iRegisterRequested; |
|
99 CSIPPrflStateBase* iRegistrationInProgress; |
|
100 }; |
|
101 |
|
102 #endif // CSIPPRFLINITSTATE_H |