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