23 |
23 |
24 #include <QObject> |
24 #include <QObject> |
25 #include <QMap> |
25 #include <QMap> |
26 #include <smfglobal.h> |
26 #include <smfglobal.h> |
27 #include <smfcredmgrclientglobal.h> |
27 #include <smfcredmgrclientglobal.h> |
28 #ifdef CLIENT_SERVER_TEST |
|
29 #include <QTimer> |
|
30 #include <QTextStream> |
|
31 #endif |
|
32 |
28 |
33 #include "smfserverglobal.h" |
29 #include "smfserverglobal.h" |
34 |
30 |
35 // Forward declarations(Other components of the SMF) |
31 // Forward declarations(Other components of the SMF) |
36 class SmfTransportManager; |
32 class SmfTransportManager; |
134 */ |
130 */ |
135 SmfError sendToDSM ( QByteArray qtdataForDSM, SmfRequestTypeID opcode, |
131 SmfError sendToDSM ( QByteArray qtdataForDSM, SmfRequestTypeID opcode, |
136 QByteArray& qtdataFromDSM ); |
132 QByteArray& qtdataFromDSM ); |
137 |
133 |
138 public slots: |
134 public slots: |
|
135 |
|
136 #ifdef Q_FOR_FUTURE |
139 /** |
137 /** |
140 * This slot is called when Credential Manager is done with the autherizing |
138 * This slot is called when Credential Manager is done with the autherizing |
141 * the client for the first time. See isClientAuthorized() and authorizeClient(). |
139 * the client for the first time. See isClientAuthorized() and authorizeClient(). |
142 * success specifies the success of the authorization, authID is the authentication |
140 * success specifies the success of the authorization, authID is the authentication |
143 * ID in case its not same as SID of the client. |
141 * ID in case its not same as SID of the client. |
144 */ |
142 */ |
145 void clientAuthorizationFinished ( bool success, SmfClientAuthID authID ); |
143 void clientAuthorizationFinished ( bool success, SmfClientAuthID authID ); |
|
144 #endif |
146 |
145 |
147 /** |
146 /** |
148 * This slot is called as a result of trigger from Plugin manager when the |
147 * This slot is called as a result of trigger from Plugin manager when the |
149 * parsed data is available. |
148 * parsed data is available. |
150 * @param requestID The request ID for which result is available |
149 * @param requestID The request ID for which result is available |
151 * @param parsedData Serialized data |
150 * @param parsedData Serialized data |
152 */ |
151 */ |
153 void resultsAvailable ( int requestID, QByteArray* parsedData, SmfError error ); |
152 void resultsAvailable ( int requestID, QByteArray* parsedData, SmfError error ); |
154 |
153 |
155 #ifdef CLIENT_SERVER_TEST |
|
156 /** |
|
157 * Services the client request by sending the requested data. |
|
158 * Note:- This will be handled by private implementation. |
|
159 */ |
|
160 /* void serviceClient ( QByteArray* parsedData );*/ |
|
161 |
|
162 /** |
|
163 * This slot is called for every cleanup timer expiry, in this slot, we need |
|
164 * to call SmfDataStoreManager's API to refresh data store |
|
165 */ |
|
166 void timerExpired ( ) {} |
|
167 |
|
168 /** |
|
169 * This method is called every time timerExpired slot is trigerred |
|
170 * Fetches the last saved requests through Transport Manager and Plugin Manager |
|
171 * Who will save the last request (Tranport Manager or Data Store Manager) TBD later |
|
172 */ |
|
173 void runSavedRequest ( ) {} |
|
174 #endif |
|
175 /** |
154 /** |
176 * This slot is called when the data store updates are available as a result of |
155 * This slot is called when the data store updates are available as a result of |
177 * "runSavedRequest()". |
156 * "runSavedRequest()". |
178 * Note:- The "10.4.1.11 updateDatastore" can be merged with this |
157 * Note:- The "10.4.1.11 updateDatastore" can be merged with this |
179 */ |
158 */ |
199 SmfTransportManager* m_transportManager; |
178 SmfTransportManager* m_transportManager; |
200 SmfPluginManager* m_pluginManager; |
179 SmfPluginManager* m_pluginManager; |
201 SmfCredMgrClient* m_credentialMngr; |
180 SmfCredMgrClient* m_credentialMngr; |
202 }; |
181 }; |
203 |
182 |
204 #ifdef CLIENT_SERVER_TEST |
|
205 class dummyPM : public QObject |
|
206 { |
|
207 Q_OBJECT |
|
208 public: |
|
209 dummyPM(SmfServer* server,QObject* parent=0); |
|
210 ~dummyPM(); |
|
211 SmfError createRequest ( const quint32& aSessionID, |
|
212 const QString& aPluginID, |
|
213 const SmfRequestTypeID& aOperation, |
|
214 QByteArray& aInputData ); |
|
215 public slots: |
|
216 void responseAvailable(); |
|
217 private: |
|
218 QTimer* m_timer; |
|
219 SmfServer* m_server; |
|
220 }; |
|
221 #endif |
|
222 |
|
223 #endif // SMFSERVER_H |
183 #endif // SMFSERVER_H |