sync with tizen_2.0
[platform/framework/native/appfw.git] / src / io / inc / FIo_ClientChannelImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file        FIo_ClientChannelImpl.h
20  * @brief       This is the header file for the _ClientChannelImpl class.
21  *
22  * This file contains the declarations of  _ClientChannelImpl
23  */
24
25
26 #ifndef _FIO_INTERNAL_CLIENT_CHANNEL_IMPL_H_
27 #define _FIO_INTERNAL_CLIENT_CHANNEL_IMPL_H_
28
29 #include <FBaseResult.h>
30 #include <FBaseObject.h>
31 #include <FBaseDataType.h>
32 #include <FBaseString.h>
33 #include <FBaseColArrayList.h>
34 #include <FAppTypes.h>
35 #include "FIo_IChannelResponseEventListener.h"
36
37
38 namespace Tizen { namespace Io
39 {
40
41 class _Channel;
42 class ClientChannel;
43 class IChannelResponseEventListener;
44
45 class _ClientChannelImpl
46         : public Tizen::Base::Object
47         , public _IChannelResponseEventListener
48 {
49 public:
50         _ClientChannelImpl(void);
51
52         virtual ~_ClientChannelImpl(void);
53
54         result Construct(ClientChannel* pClientChannel, const Tizen::Base::String& channelName = L"");
55
56         void SetChannelResponseEventListener(IChannelResponseEventListener* pResponseEventListener);
57
58         result SendRequest(const Tizen::Base::String& serverChannelId, const Tizen::Base::Collection::IList* pArgs, RequestId& reqId);
59
60         void OnChannelResponseReceivedN(RequestId reqId, const Tizen::Base::String& channelId, Tizen::Base::Collection::IList* pArgs);
61
62         static _ClientChannelImpl* GetInstance(ClientChannel* pChannel);
63
64         static ClientChannel* GetClientChannel(const Tizen::Base::String& channelName);
65
66 private:
67         _ClientChannelImpl(const _ClientChannelImpl& value);
68
69         _ClientChannelImpl& operator =(const _ClientChannelImpl& value);
70
71 private:
72         ClientChannel* __pClientChannel;
73         IChannelResponseEventListener* __pResponseListener;
74         _Channel* __pChannel;
75 }; // _ClientChannelImpl
76
77 } } // Tizen::Io
78
79 #endif //_FIO_INTERNAL_CLIENT_CHANNEL_IMPL_H_