|
1 /* |
|
2 * Copyright (c) 2004 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: Defines concrete non-CDMA class CNcnModel. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NCNMODEL_H |
|
20 #define NCNMODEL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "NcnModelBase.h" |
|
24 #include "MNcnUI.h" |
|
25 #include "MNcnNotifier.h" |
|
26 #include <msatrefreshobserver.h> |
|
27 |
|
28 // CLASS DECLARATION |
|
29 class RSatSession; |
|
30 class RSatRefresh; |
|
31 |
|
32 /** |
|
33 * The main Ncn subsystem class |
|
34 */ |
|
35 class CNcnModel : public CNcnModelBase, public MSatRefreshObserver |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 */ |
|
42 static CNcnModelBase* NewL(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CNcnModel(); |
|
48 |
|
49 private: |
|
50 |
|
51 /** |
|
52 * C++ default constructor. |
|
53 */ |
|
54 CNcnModel(); |
|
55 |
|
56 /** |
|
57 * By default Symbian OS constructor is private. |
|
58 */ |
|
59 void ConstructL(); |
|
60 |
|
61 private: //From base class |
|
62 |
|
63 /** |
|
64 * Create Central repository connection |
|
65 * @since Series60 3.0 |
|
66 */ |
|
67 void CreateCRConnectionL(); |
|
68 |
|
69 public: // From base class |
|
70 |
|
71 /** |
|
72 * From CNcnModelBase. Sim changed status is given by this method |
|
73 * @since Series60 2.6 |
|
74 */ |
|
75 void SetSimChanged( const TBool aSimChanged ); |
|
76 |
|
77 /** |
|
78 * From CNcnModelBase. Sets the current SMS initialisation phase. |
|
79 * @since Series60 2.6 |
|
80 */ |
|
81 void SetSmsInitialisationState( const TInt aSmsInitialisationPhase ); |
|
82 |
|
83 /** |
|
84 * From CNcnModelBase. This method performs the SMSC fetching operation. |
|
85 * @since Series60 2.6 |
|
86 */ |
|
87 void PerformSimServiceCentreFetching(); |
|
88 |
|
89 /** |
|
90 * From CNcnModelBase. This method forces the SMSC fetching operation. |
|
91 * @since Series60 2.6 |
|
92 */ |
|
93 void ForceToPerformSimServiceCentreFetching(); |
|
94 |
|
95 /** |
|
96 * From CNcnModelBase. This method checks if the SMSC fetching is needed |
|
97 * @since Series60 2.6 |
|
98 */ |
|
99 void CheckIfSimSCOperationRequired(); |
|
100 |
|
101 public: //From MSatRefreshObserver |
|
102 |
|
103 /** |
|
104 * Refresh query. Client should determine whether it allow the |
|
105 * refresh to happen. In this method the client should not close or |
|
106 * cancel the RSatRefresh subsession. |
|
107 * @since 3.0 |
|
108 * @param aType Refresh type. |
|
109 * @param aFiles Elementary files which are to be changed. |
|
110 * May be zero length. |
|
111 * @return ETrue to allow refresh, EFalse to decline refresh. |
|
112 */ |
|
113 TBool AllowRefresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ); |
|
114 |
|
115 /** |
|
116 * Notification of refresh. In this method the client should not close |
|
117 * or cancel the RSatRefresh subsession. |
|
118 * @since 3.0 |
|
119 * @param aType Type of refresh which has happened. |
|
120 * @param aFiles List of elementary files which has been changed. |
|
121 * May be zero length. |
|
122 */ |
|
123 void Refresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ); |
|
124 |
|
125 private: // Data |
|
126 |
|
127 /** |
|
128 * Enumeration for SMS initialisation phases. |
|
129 */ |
|
130 enum TSMSInitialisationPhase |
|
131 { |
|
132 ESMSInitNone = 0, |
|
133 ESMSInitInProgress = 1, |
|
134 ESMSInitComplete = 2, |
|
135 ESMSInitReadServiceCentre = 3 |
|
136 }; |
|
137 |
|
138 // Sat session connection. |
|
139 RSatSession* iSatSession; |
|
140 |
|
141 // Sat refresh connection |
|
142 RSatRefresh* iSatRefresh; |
|
143 }; |
|
144 |
|
145 #endif // NCNMODEL_H |
|
146 |
|
147 // End of File |