Merge "Revert "Fix N_SE-46938 for tz list."" into devel_3.0_main
[platform/framework/native/appfw.git] / src / io / inc / FIo_ServerChannelImpl.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16
17 /**
18  * @file        FIo_ServerChannelImpl.h
19  * @brief       This is the header file for the _ServerChannelImpl class.
20  *
21  * This file contains the declarations of  _ServerChannelImpl.
22  */
23
24 #ifndef _FIO_INTERNAL_SERVER_CHANNEL_IMPL_H_
25 #define _FIO_INTERNAL_SERVER_CHANNEL_IMPL_H_
26
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"
33
34 namespace Tizen { namespace Io
35 {
36
37 class _ServerChannel;
38 class ServerChannel;
39 class IChannelRequestEventListener;
40
41 class _OSP_EXPORT_ _ServerChannelImpl
42         : public Tizen::Base::Object
43         , public _IChannelRequestEventListener
44 {
45 public:
46         _ServerChannelImpl(void);
47
48         virtual ~_ServerChannelImpl(void);
49
50         result Construct(ServerChannel* pServerChannel, const Tizen::Base::String& channelName = L"");
51
52         result SendResponse(const Tizen::Base::String& clientChannelId, const Tizen::Base::Collection::IList* pArgs, RequestId reqId);
53
54         void SetChannelRequestEventListener(IChannelRequestEventListener* pRequestListener);
55
56         void OnChannelRequestReceivedN(RequestId reqId, const Tizen::Base::String& channelId, Tizen::Base::Collection::IList* pArgs);
57
58         static _ServerChannelImpl* GetInstance(ServerChannel* pChannel);
59
60         static ServerChannel* GetServerChannel(const Tizen::Base::String& channelName);
61
62 private:
63         _ServerChannelImpl(const _ServerChannelImpl& serverChannelImpl);
64
65         _ServerChannelImpl& operator =(const _ServerChannelImpl& serverChannelImpl);
66
67 private:
68         ServerChannel* __pServerChannel;
69         IChannelRequestEventListener* __pRequestListener;
70         _Channel* __pChannel;
71 }; //_ServerChannelImpl
72
73
74 } } // Tizen::Io
75
76 #endif //_FIO_CHANNEL_H_