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_ServerChannelImpl.h
19 * @brief This is the header file for the _ServerChannelImpl class.
21 * This file contains the declarations of _ServerChannelImpl.
24 #ifndef _FIO_INTERNAL_SERVER_CHANNEL_IMPL_H_
25 #define _FIO_INTERNAL_SERVER_CHANNEL_IMPL_H_
27 #include <FOspConfig.h>
28 #include <FBaseResult.h>
29 #include <FBaseObject.h>
30 #include <FAppTypes.h>
31 #include "FIo_IChannelRequestEventListener.h"
32 #include "FIo_Channel.h"
34 namespace Tizen { namespace Io
39 class IChannelRequestEventListener;
41 class _OSP_EXPORT_ _ServerChannelImpl
42 : public Tizen::Base::Object
43 , public _IChannelRequestEventListener
46 _ServerChannelImpl(void);
48 virtual ~_ServerChannelImpl(void);
50 result Construct(ServerChannel* pServerChannel, const Tizen::Base::String& channelName = L"");
52 result SendResponse(const Tizen::Base::String& clientChannelId, const Tizen::Base::Collection::IList* pArgs, RequestId reqId);
54 void SetChannelRequestEventListener(IChannelRequestEventListener* pRequestListener);
56 void OnChannelRequestReceivedN(RequestId reqId, const Tizen::Base::String& channelId, Tizen::Base::Collection::IList* pArgs);
58 static _ServerChannelImpl* GetInstance(ServerChannel* pChannel);
60 static ServerChannel* GetServerChannel(const Tizen::Base::String& channelName);
63 _ServerChannelImpl(const _ServerChannelImpl& serverChannelImpl);
65 _ServerChannelImpl& operator =(const _ServerChannelImpl& serverChannelImpl);
68 ServerChannel* __pServerChannel;
69 IChannelRequestEventListener* __pRequestListener;
71 }; //_ServerChannelImpl
76 #endif //_FIO_CHANNEL_H_