|
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 serviceipcserverlocalsocket_p_h |
|
19 #define serviceipcserverlocalsocket_p_h |
|
20 |
|
21 #include <QtCore> |
|
22 #include "serviceipcserver_p.h" |
|
23 |
|
24 class QLocalServer; |
|
25 |
|
26 namespace WRT { |
|
27 |
|
28 class ServiceFwIPCServer; |
|
29 |
|
30 class ServiceFwIPCServerLocalSocket : public QObject, |
|
31 public ServiceFwIPCServerPrivate |
|
32 { |
|
33 Q_OBJECT |
|
34 public: |
|
35 |
|
36 ServiceFwIPCServerLocalSocket(QObject* aParent); |
|
37 |
|
38 virtual ~ServiceFwIPCServerLocalSocket(); |
|
39 |
|
40 // Inherited from ServiceFwIPCServerPrivate |
|
41 public: |
|
42 |
|
43 bool listen(const QString& aServerName); |
|
44 |
|
45 void disconnect(); |
|
46 |
|
47 void configIpcServerLifetime(bool aKeepServer); |
|
48 |
|
49 public slots: |
|
50 |
|
51 void handleNewConnection(); |
|
52 |
|
53 void handleSessionDisconnect(ServiceIPCSession* aSession); |
|
54 |
|
55 private: |
|
56 QLocalServer* m_Listener; |
|
57 QSharedMemory m_SharedMem; |
|
58 bool m_isValidSession; |
|
59 bool m_isKeepServer; |
|
60 }; |
|
61 |
|
62 } |
|
63 #endif // serviceipcserverlocalsocket_p_h |