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_MessagePortStub.h
20 * @brief This is the header file for the _MessagePortStub class.
22 * This file contains the declarations of _MessagePortStub.
26 #ifndef _FIO_INTERNAL_MESSAGE_PORT_STUB_H_
27 #define _FIO_INTERNAL_MESSAGE_PORT_STUB_H_
29 #include <message-port-data-types.h>
31 #include <FBaseResult.h>
32 #include <FBaseObject.h>
33 #include <FBaseColArrayList.h>
34 #include <FBaseColHashMap.h>
35 #include <FAppTypes.h>
37 #include "IpcServer.h"
38 #include "IIpcServerEventListener.h"
45 class _MessagePortService;
47 class _MessagePortStub
48 : public IIpcServerEventListener
51 _MessagePortStub(void);
52 virtual ~_MessagePortStub(void);
54 virtual result Construct(void);
56 result SendMessage(int clientId, const BundleBuffer& metadata, const BundleBuffer& buffer);
58 void SetMessagePortService(_MessagePortService& service);
61 bool OnRegisterMessagePort(const BundleBuffer& buffer, int* pResult);
63 bool OnCheckRemotePort(const BundleBuffer& buffer, int* pResult);
65 bool OnSendMessage(const BundleBuffer& metadata, const BundleBuffer& buffer, int* pResult);
67 virtual void OnIpcRequestReceived(IpcServer& server, const IPC::Message& message);
69 virtual void OnIpcServerStarted(const IpcServer& server);
71 virtual void OnIpcServerStopped(const IpcServer& server);
73 virtual void OnIpcClientConnected(const IpcServer& server, int clientId);
75 virtual void OnIpcClientDisconnected(const IpcServer& server, int clientId);
77 _MessagePortStub(const _MessagePortStub& value);
78 _MessagePortStub& operator = (const _MessagePortStub& value);
81 IpcServer* __pIpcServer;
82 _MessagePortService* __pService;
84 }; // _MessagePortStub
88 #endif // _FIO_INTERNAL_MESSAGE_PORT_STUB_H_