author | cgandhi <chandradeep.gandhi@sasken.com> |
Wed, 23 Jun 2010 20:47:13 +0530 | |
changeset 15 | 9b00ca3cc206 |
parent 13 | b5d63d5fc252 |
permissions | -rw-r--r-- |
10 | 1 |
/** |
2 |
* Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the "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 |
* Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* Manasij Roy, Nalina Hariharan |
|
14 |
*/ |
|
15 |
||
16 |
#ifndef SMFCLIENTQT_H |
|
17 |
#define SMFCLIENTQT_H |
|
18 |
||
19 |
#include <QObject> |
|
20 |
#include <QByteArray> |
|
21 |
#include <QString> |
|
13
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
22 |
#include <QLocalSocket> |
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
23 |
|
10 | 24 |
#include "smfglobal.h" |
25 |
||
26 |
class SmfClientQt : public QObject |
|
27 |
{ |
|
28 |
Q_OBJECT |
|
29 |
||
30 |
public: |
|
31 |
explicit SmfClientQt(QObject *parent = 0); |
|
13
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
32 |
~SmfClientQt(); |
10 | 33 |
|
34 |
public: |
|
35 |
/** |
|
36 |
* Send a request to the server. |
|
37 |
* @param aSerializedData serialized by the caller. |
|
38 |
* @param aInterfaceName Interface name |
|
39 |
* @param requestType Opcode |
|
40 |
*/ |
|
41 |
int sendRequest(QByteArray& aSerializedData, |
|
42 |
QString aInterfaceName, |
|
43 |
SmfRequestTypeID requestType); |
|
44 |
||
45 |
/** |
|
46 |
* This overloaded API is for ESmfGetServices, where data should be |
|
47 |
* fetched synchronously |
|
48 |
*/ |
|
49 |
QByteArray sendRequest(QString aInterfaceName, |
|
50 |
SmfRequestTypeID requestType); |
|
51 |
||
52 |
/** |
|
53 |
* For testing purpose only |
|
54 |
*/ |
|
55 |
int sendDummyRequest(QByteArray* provider,QString aInterfaceName, |
|
56 |
SmfRequestTypeID requestType); |
|
57 |
||
58 |
/** |
|
59 |
* CancelRequest. |
|
60 |
* Cancels an outstanding request. |
|
61 |
*/ |
|
62 |
void CancelRequest(); |
|
63 |
||
13
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
64 |
private slots: |
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
65 |
void connectionEstablished(); |
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
66 |
void readIncomingData(); |
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
67 |
void handleError(QLocalSocket::LocalSocketError error); |
10 | 68 |
|
13
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
69 |
private: |
b5d63d5fc252
Basic functionality on desktop server build. Started a test for GetServices
James Aley <jamesa@symbian.org>
parents:
10
diff
changeset
|
70 |
QLocalSocket *m_serverConnection; |
10 | 71 |
}; |
72 |
||
73 |
#endif // SMFCLIENTQT_H |