|
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 : sipprofilestatewaitforiap.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 CSIPPROFILERESTATEWAITFORIAP_H |
|
31 #define CSIPPROFILERESTATEWAITFORIAP_H |
|
32 |
|
33 // INCLUDES |
|
34 #include "sip.h" |
|
35 #include "SipProfileState.h" |
|
36 #include "sipconcreteprofile.h" |
|
37 #include <e32base.h> |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * Class provides functionality for profile state automation |
|
45 * "Wait for IAP" state. |
|
46 * @lib |
|
47 */ |
|
48 class CSIPProfileStateWaitForIAP: public CSIPProfileState |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 */ |
|
55 static CSIPProfileStateWaitForIAP* NewL(CSIPPluginDirector& aDirector); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CSIPProfileStateWaitForIAP(); |
|
61 |
|
62 public: // From CSIPProfileState |
|
63 |
|
64 CSIPConcreteProfile::TStatus Name() const; |
|
65 |
|
66 void EnableL(CSIPProfileCacheItem& aItem, |
|
67 const MSIPExtendedConcreteProfileObserver& aObserver); |
|
68 |
|
69 void EnableSnapInUseL(CSIPProfileCacheItem& aItem, |
|
70 const MSIPExtendedConcreteProfileObserver& aObserver, |
|
71 TUint32 aSnapId); |
|
72 |
|
73 void DisableL(CSIPProfileCacheItem& aItem, |
|
74 const MSIPExtendedConcreteProfileObserver& aObserver); |
|
75 |
|
76 void RegistrationStatusEventL( |
|
77 CSIPProfileCacheItem& aItem, |
|
78 CSIPConcreteProfile::TStatus aStatus); |
|
79 |
|
80 TBool ErrorOccurred(CSIPProfileCacheItem& aItem, TInt aError); |
|
81 |
|
82 void IapAvailableL(CSIPProfileCacheItem& aItem, |
|
83 TUint32 aSnapId, |
|
84 TUint32 aNewIapId); |
|
85 |
|
86 TBool ShouldRefreshIAPs(CSIPProfileCacheItem& aItem) const; |
|
87 |
|
88 TBool IsAlrState() const; |
|
89 |
|
90 void NoNewIapAvailable(CSIPProfileCacheItem& aItem); |
|
91 |
|
92 TBool CanBePermanentlyRemoved(const CSIPProfileCacheItem& aItem) const; |
|
93 |
|
94 public: // New functions |
|
95 |
|
96 /** |
|
97 * Sets next automaton states, ownership is not transferred |
|
98 * @param aWaitForPermission Wait for IAP migration permission state |
|
99 * @param aRegInProg Registration in progress state |
|
100 * @param aUnregInProg Unregistration in progress state |
|
101 * @param aUnregistered Unregistred state |
|
102 */ |
|
103 void SetNeighbourStates(CSIPProfileState& aWaitForPermission, |
|
104 CSIPProfileState& aRegInProg, |
|
105 CSIPProfileState& aUnregInProg, |
|
106 CSIPProfileState& aUnregistered); |
|
107 |
|
108 private: |
|
109 |
|
110 /** |
|
111 * Constructor |
|
112 */ |
|
113 CSIPProfileStateWaitForIAP(CSIPPluginDirector& aDirector); |
|
114 |
|
115 private: // Data |
|
116 |
|
117 // Neighbour states, not owned |
|
118 CSIPProfileState* iWaitForPermission; |
|
119 CSIPProfileState* iRegInProg; |
|
120 CSIPProfileState* iUnregInProg; |
|
121 CSIPProfileState* iUnregistered; |
|
122 }; |
|
123 |
|
124 #endif // CSIPPROFILERESTATEWAITFORIAP_H |