2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FIo_IIpcServerEventListener.h
19 * @brief This is the header file for the _IIpcServerEventListener class.
21 * This file contains the declarations of _IIpcServerEventListener.
24 #include <FOspConfig.h>
25 #include <FBaseRtIEventListener.h>
27 #ifndef _FIO_INTERNAL_IIPC_SERVER_EVENT_LISTENER_H_
28 #define _FIO_INTERNAL_IIPC_SERVER_EVENT_LISTENER_H_
30 namespace IPC { class Message; }
32 namespace Tizen { namespace Io
37 * @interface _IIpcServerEventListener
38 * @brief This interface provides listener method for the request event from an IPC client.
40 class _OSP_EXPORT_ _IIpcServerEventListener
41 : virtual Tizen::Base::Runtime::IEventListener
45 * This is the destructor for this class.
47 virtual ~_IIpcServerEventListener(void);
50 * Called when an IPC server started.
52 * @param[in] server The IPC server
54 virtual void OnIpcServerStarted(const _IpcServer& server) = 0;
57 * Called when an IPC server stopped.
59 * @param[in] server The IPC server
61 virtual void OnIpcServerStopped(const _IpcServer& server) = 0;
64 * Called when an IPC client connected.
66 * @param[in] server The IPC server
68 virtual void OnIpcClientConnected(const _IpcServer& server, int clientId) = 0;
71 * Called when an IPC client disconnected.
73 * @param[in] server The IPC server
74 * @param[in] clientId The id of the connected IPC client
76 virtual void OnIpcClientDisconnected(const _IpcServer& server, int clientId) = 0;
79 * Called when an IPC request message received.
84 * CalculatorStub::OnSumRequested(int a, int b, int* pC)
91 * CalculatorStub::OnMultiplyRequested(int a, int b, int* pC)
98 * CalculatorStub::OnIpcRequestReceived(_IpcServer& server, const IPC::Message& message)
100 * IPC_BEGIN_MESSAGE_MAP(CalculatorStub, message)
101 * IPC_MESSAGE_HANDLER(My_sum, OnSumRequested, &server)
102 * IPC_MESSAGE_HANDLER(My_mul, OnMultiplyRequested, &server)
103 * IPC_END_MESSAGE_MAP()
109 * @param[in] server The IPC server
110 * @param[in] message The received message
112 virtual void OnIpcRequestReceived(_IpcServer& server, const IPC::Message& message) = 0;
113 }; // _IIpcServerEventListener
118 #endif //_FIO_IIPCSERVEREVENTLISTENER_H_