2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FIo_DataRouter.h
20 * @brief This is the header file for the %_DataRouter class.
22 * This header file contains the declarations of the %_DataRouter class.
25 #ifndef _FIO_INTERNAL_DATA_ROUTER_H_
26 #define _FIO_INTERNAL_DATA_ROUTER_H_
28 #include <FBaseObject.h>
29 #include <FOspConfig.h>
31 namespace Tizen {namespace Io {
33 class _IDataRouterEventListener; //Data Receiver
37 _DATA_ROUTER_STATE_OPENED = 0,
38 _DATA_ROUTER_STATE_CLOSED
41 * 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.
43 class _OSP_EXPORT_ _DataRouter
44 : public Tizen::Base::Object
48 result Construct(_IDataRouterEventListener& listener);
49 result Write(const char* data, int length);
50 void DataReceived(const char* data, int length);
51 void StateChanged(_DataRouterState state);
53 static _DataRouter* GetInstance(void);
54 static void ReleaseInstance(void);
60 _IDataRouterEventListener* __pDataRouterEventListener;
66 #endif // _FIO_INTERNAL_DATA_ROUTER_H_