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_DataRouter.h
19 * @brief This is the header file for the %_DataRouter class.
21 * This header file contains the declarations of the %_DataRouter class.
24 #ifndef _FIO_INTERNAL_DATA_ROUTER_H_
25 #define _FIO_INTERNAL_DATA_ROUTER_H_
27 #include <FBaseObject.h>
28 #include <FOspConfig.h>
30 namespace Tizen {namespace Io {
32 class _IDataRouterEventListener; //Data Receiver
36 _DATA_ROUTER_STATE_OPENED = 0,
37 _DATA_ROUTER_STATE_CLOSED
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.
42 class _OSP_EXPORT_ _DataRouter
43 : public Tizen::Base::Object
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);
52 static _DataRouter* GetInstance(void);
53 static void ReleaseInstance(void);
60 _IDataRouterEventListener* __pDataRouterEventListener;
66 #endif // _FIO_INTERNAL_DATA_ROUTER_H_