16
|
1 |
/**
|
|
2 |
This file is part of CWRT package **
|
|
3 |
|
|
4 |
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). **
|
|
5 |
|
|
6 |
This program is free software: you can redistribute it and/or modify
|
|
7 |
it under the terms of the GNU (Lesser) General Public License as
|
|
8 |
published by the Free Software Foundation, version 2.1 of the License.
|
|
9 |
This program is distributed in the hope that it will be useful, but
|
|
10 |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12 |
(Lesser) General Public License for more details. You should have
|
|
13 |
received a copy of the GNU (Lesser) General Public License along
|
|
14 |
with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
15 |
*/
|
|
16 |
|
|
17 |
|
|
18 |
#ifndef serviceipcrequest_h
|
|
19 |
#define serviceipcrequest_h
|
|
20 |
|
|
21 |
#include <QtCore>
|
|
22 |
#include <serviceipcdefs.h>
|
|
23 |
|
|
24 |
namespace WRT {
|
|
25 |
|
|
26 |
class ServiceIPCSession;
|
|
27 |
class ClientInfo;
|
|
28 |
|
|
29 |
class SFWIPCSRV_EXPORT ServiceIPCRequest : public QObject
|
|
30 |
{
|
|
31 |
public:
|
|
32 |
virtual ~ServiceIPCRequest();
|
|
33 |
|
|
34 |
ServiceIPCRequest(ServiceIPCSession* aSession,
|
|
35 |
qint64 aDataLength,
|
|
36 |
const QString& aRequestOp);
|
|
37 |
|
|
38 |
public:
|
|
39 |
// New function
|
|
40 |
|
|
41 |
const QString& getOperation();
|
|
42 |
|
|
43 |
const QByteArray& getData();
|
|
44 |
|
|
45 |
bool write(const QByteArray& aData);
|
|
46 |
|
|
47 |
bool completeRequest();
|
|
48 |
|
|
49 |
bool addRequestdata(const QByteArray& aMoreData);
|
|
50 |
|
|
51 |
void setClientInfo(ClientInfo *aClientInfo);
|
|
52 |
|
|
53 |
const ClientInfo *clientInfo();
|
|
54 |
|
|
55 |
private:
|
|
56 |
ServiceIPCSession* m_Session; // not owned
|
|
57 |
ClientInfo *m_ClientInfo;
|
|
58 |
QString m_RequestOp;
|
|
59 |
QByteArray m_RequestData;
|
|
60 |
qint64 m_Datalength;
|
|
61 |
};
|
|
62 |
|
|
63 |
}
|
|
64 |
#endif // serviceipcrequest_h
|