Fix the boiler plate codes
[platform/framework/native/appfw.git] / src / io / inc / FIo_DataRouter.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_DataRouter.h
19  * @brief       This is the header file for the %_DataRouter class.
20  *
21  * This header file contains the declarations of the %_DataRouter class.
22  */
23
24 #ifndef _FIO_INTERNAL_DATA_ROUTER_H_
25 #define _FIO_INTERNAL_DATA_ROUTER_H_
26
27 #include <FBaseObject.h>
28 #include <FOspConfig.h>
29
30 namespace Tizen {namespace Io {
31
32 class _IDataRouterEventListener; //Data Receiver
33
34 enum _DataRouterState
35 {
36         _DATA_ROUTER_STATE_OPENED = 0,
37         _DATA_ROUTER_STATE_CLOSED
38 };
39 /**
40  * This class provides communication feature on a datarouter module. The datarouter is a tizen module for USB connection management such as Kies, Debugging, MTP, Internet sharing.
41  */
42 class _OSP_EXPORT_ _DataRouter
43         : public Tizen::Base::Object
44 {
45
46 public:
47         result Construct(_IDataRouterEventListener& listener);
48         result Write(const char* data, int length);
49         void DataReceived(const char* data, int length);
50         void StateChanged(_DataRouterState state);
51
52         static _DataRouter* GetInstance(void);
53         static void ReleaseInstance(void);
54
55 private:
56         _DataRouter();
57         ~_DataRouter();
58
59 private:
60         _IDataRouterEventListener*      __pDataRouterEventListener;
61         bool                            __initialized;
62 }; // _DataRouter
63
64 }} // Tizen::Io
65
66 #endif // _FIO_INTERNAL_DATA_ROUTER_H_
67