|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: Session class for server side IPC communication |
|
19 * |
|
20 */ |
|
21 |
|
22 #include "xqservicelog.h" |
|
23 |
|
24 #include "xqserviceipcobserver.h" |
|
25 #include "xqserviceipcserversession.h" |
|
26 |
|
27 namespace QtService |
|
28 { |
|
29 /*! |
|
30 \class ServiceIPCSession |
|
31 \brief Session class to hold the state of each connected client |
|
32 */ |
|
33 |
|
34 /*! |
|
35 Constructor. |
|
36 \param aObserver Observer to the session. |
|
37 */ |
|
38 ServiceIPCSession::ServiceIPCSession(MServiceIPCObserver* aObserver) : |
|
39 iPendingRequest(false), iObserver(aObserver), iCurRequest(NULL) |
|
40 { |
|
41 XQSERVICE_DEBUG_PRINT("ServiceIPCSession::ServiceIPCSession"); |
|
42 } |
|
43 |
|
44 /*! |
|
45 Destructor. |
|
46 */ |
|
47 ServiceIPCSession::~ServiceIPCSession() |
|
48 { |
|
49 XQSERVICE_DEBUG_PRINT("ServiceIPCSession::~ServiceIPCSession"); |
|
50 } |
|
51 |
|
52 /*! |
|
53 \fn QtService::ServiceIPCSession::write( const QByteArray& aData ) |
|
54 |
|
55 Write some data in response to a request. |
|
56 \param aData Some data to write as response. |
|
57 \return bool If write was successful. |
|
58 */ |
|
59 |
|
60 /*! |
|
61 \fn QtService::ServiceIPCSession::completeRequest() |
|
62 |
|
63 Complete a request. |
|
64 \return bool if request completed . |
|
65 */ |
|
66 |
|
67 /*! |
|
68 \fn QtService::ServiceIPCSession::close() |
|
69 |
|
70 Close a session and gracefully shutdown. |
|
71 */ |
|
72 } |
|
73 // END OF FILE |