|
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 : sipprofilestateregistred.h |
|
16 * Part of : Sip Profile Server |
|
17 * Interface : private |
|
18 * Class provides functionality for registration state automation |
|
19 * Version : 1.0 |
|
20 * |
|
21 */ |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 /** |
|
27 @internalComponent |
|
28 */ |
|
29 |
|
30 #ifndef CSIPPROFILERESTATEREGISTERED_H |
|
31 #define CSIPPROFILERESTATEREGISTERED_H |
|
32 |
|
33 // INCLUDES |
|
34 #include "SipProfileState.h" |
|
35 #include <e32base.h> |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * Class provides functionality for profile state automation |
|
43 * Registered state. |
|
44 * @lib |
|
45 */ |
|
46 |
|
47 class CSIPProfileStateRegistered: public CSIPProfileState |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 static CSIPProfileStateRegistered* NewL(CSIPPluginDirector& aDirector); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 virtual ~CSIPProfileStateRegistered(); |
|
60 |
|
61 public: // From CSIPProfileState |
|
62 |
|
63 CSIPConcreteProfile::TStatus Name() const; |
|
64 |
|
65 void EnterL(CSIPProfileCacheItem& aItem, |
|
66 TBool aMaySendRegStatusEvent, |
|
67 CSIPProfileServerCore& aServerCore); |
|
68 |
|
69 void UpdateRegistrationL( |
|
70 CSIPProfileCacheItem& aItem, |
|
71 const MSIPExtendedConcreteProfileObserver& aObserver); |
|
72 |
|
73 void EnableL( |
|
74 CSIPProfileCacheItem& aItem, |
|
75 const MSIPExtendedConcreteProfileObserver& aObserver); |
|
76 |
|
77 void EnableSnapInUseL( |
|
78 CSIPProfileCacheItem& aItem, |
|
79 const MSIPExtendedConcreteProfileObserver& aObserver, |
|
80 TUint32 aSnapId); |
|
81 |
|
82 void DisableL( |
|
83 CSIPProfileCacheItem& aItem, |
|
84 const MSIPExtendedConcreteProfileObserver& aObserver); |
|
85 |
|
86 void RemoveL(CSIPProfileCacheItem& aItem); |
|
87 |
|
88 void RegistrationStatusEventL( |
|
89 CSIPProfileCacheItem& aItem, |
|
90 CSIPConcreteProfile::TStatus aStatus); |
|
91 |
|
92 TBool ErrorOccurred(CSIPProfileCacheItem& aItem, TInt aError); |
|
93 |
|
94 void IapAvailableL(CSIPProfileCacheItem& aItem, |
|
95 TUint32 aSnapId, |
|
96 TUint32 aNewIapId); |
|
97 |
|
98 TBool ShouldRefreshIAPs(CSIPProfileCacheItem& aItem) const; |
|
99 |
|
100 void ShutdownInitiated(CSIPProfileCacheItem& aItem); |
|
101 |
|
102 public: // New functions |
|
103 |
|
104 /** |
|
105 * Sets next automaton states. |
|
106 * @param aUnregInProg unregistering in progress state |
|
107 * @param aUnregistered unregistred state |
|
108 * @param aRegInProg Registering in progress state |
|
109 * @param aWaitForPermission Wait for IAP migration permission state |
|
110 */ |
|
111 void SetNeighbourStates(CSIPProfileState& aUnregInProg, |
|
112 CSIPProfileState& aUnregistered, |
|
113 CSIPProfileState& aRegInProg, |
|
114 CSIPProfileState& aWaitForPermission); |
|
115 |
|
116 private: |
|
117 |
|
118 /** |
|
119 * Constructor. |
|
120 */ |
|
121 CSIPProfileStateRegistered(CSIPPluginDirector& aDirector); |
|
122 |
|
123 private: // Data |
|
124 |
|
125 // Neighbour states, not owned |
|
126 CSIPProfileState* iUnregInProg; |
|
127 CSIPProfileState* iUnregistered; |
|
128 CSIPProfileState* iRegInProg; |
|
129 CSIPProfileState* iWaitForPermission; |
|
130 }; |
|
131 |
|
132 #endif // CSIPPROFILERESTATEREGISTERED_H |