2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FIo_IIpcServerEventListener.h
20 * @brief This is the header file for the _IIpcServerEventListener class.
22 * This file contains the declarations of _IIpcServerEventListener.
25 #include <FOspConfig.h>
26 #include <FBaseRtIEventListener.h>
28 #ifndef _FIO_INTERNAL_IIPC_SERVER_EVENT_LISTENER_H_
29 #define _FIO_INTERNAL_IIPC_SERVER_EVENT_LISTENER_H_
31 namespace IPC { class Message; }
33 namespace Tizen { namespace Io
38 * @interface _IIpcServerEventListener
39 * @brief This interface provides listener method for the request event from an IPC client.
41 class _OSP_EXPORT_ _IIpcServerEventListener
42 : virtual Tizen::Base::Runtime::IEventListener
46 * This is the destructor for this class.
48 virtual ~_IIpcServerEventListener(void);
51 * Called when an IPC server started.
53 * @param[in] server The IPC server
55 virtual void OnIpcServerStarted(const _IpcServer& server) = 0;
58 * Called when an IPC server stopped.
60 * @param[in] server The IPC server
62 virtual void OnIpcServerStopped(const _IpcServer& server) = 0;
65 * Called when an IPC client connected.
67 * @param[in] server The IPC server
69 virtual void OnIpcClientConnected(const _IpcServer& server, int clientId) = 0;
72 * Called when an IPC client disconnected.
74 * @param[in] server The IPC server
75 * @param[in] clientId The id of the connected IPC client
77 virtual void OnIpcClientDisconnected(const _IpcServer& server, int clientId) = 0;
80 * Called when an IPC request message received.
85 * CalculatorStub::OnSumRequested(int a, int b, int* pC)
92 * CalculatorStub::OnMultiplyRequested(int a, int b, int* pC)
99 * CalculatorStub::OnIpcRequestReceived(_IpcServer& server, const IPC::Message& message)
101 * IPC_BEGIN_MESSAGE_MAP(CalculatorStub, message)
102 * IPC_MESSAGE_HANDLER(My_sum, OnSumRequested, &server)
103 * IPC_MESSAGE_HANDLER(My_mul, OnMultiplyRequested, &server)
104 * IPC_END_MESSAGE_MAP()
110 * @param[in] server The IPC server
111 * @param[in] message The received message
113 virtual void OnIpcRequestReceived(_IpcServer& server, const IPC::Message& message) = 0;
114 }; // _IIpcServerEventListener
119 #endif //_FIO_IIPCSERVEREVENTLISTENER_H_