|
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 serviceipcobserver_h |
|
19 #define serviceipcobserver_h |
|
20 |
|
21 #include <QtCore> |
|
22 #include "clientinfo.h" |
|
23 |
|
24 namespace WRT { |
|
25 |
|
26 class ServiceIPCRequest; |
|
27 |
|
28 /** |
|
29 * Interface Observer class to handle IPC related events |
|
30 */ |
|
31 class MServiceIPCObserver |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Handle a new request |
|
37 * @param aRequest request object, ownership NOT passed |
|
38 * @return bool true if handled |
|
39 */ |
|
40 virtual bool handleRequest(ServiceIPCRequest *aRequest) = 0; |
|
41 |
|
42 /** |
|
43 * Handle any cancellation of an asynchronous request. |
|
44 * @param aRequest request object that is going to be cancelled, ownership NOT passed |
|
45 * Object will be cleaned up after callback returns |
|
46 * @return void |
|
47 */ |
|
48 virtual void handleCancelRequest(ServiceIPCRequest *aRequest) = 0; |
|
49 |
|
50 /** |
|
51 * Handle the connection of a new client to the server |
|
52 * @param aNewClient information about the new client, including session ID |
|
53 * @return void |
|
54 */ |
|
55 virtual void handleClientConnect( ClientInfo *aNewClient ) = 0; |
|
56 |
|
57 /** |
|
58 * Handle the disconnection of a client from the server. |
|
59 * This callback is called when a client disconnects (ie closes a session) |
|
60 * @param aClient information about the client that is disconected |
|
61 * @return void |
|
62 */ |
|
63 virtual void handleClientDisconnect( ClientInfo *aClient ) = 0; |
|
64 }; |
|
65 |
|
66 } |
|
67 #endif // serviceipcobserver_h |