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://floralicense.org/license/
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 AccessoryManager.h
20 * @brief This is the declaration file of the AccessoryManager class.
23 #ifndef _ACCESSORY_MONITOR_
24 #define _ACCESSORY_MONITOR_
29 #include <FIo_IDataRouterEventListener.h>
30 #include <FIo_DataRouter.h>
32 class AccessoryConditionHandler;
34 class AccessoryMonitor
35 : public Tizen::Base::Object
36 , public Tizen::Io::_IDataRouterEventListener
43 result Construct(AccessoryConditionHandler* pConditionHandler);
44 result SendData(char* buffer, int length);
45 Tizen::App::AppId GetClientId(void) const;
46 void SetClientId(Tizen::App::AppId appId);
47 void RemoveClientId(Tizen::App::AppId appId);
48 Tizen::Io::_DataRouter* GetDataRouter(void) const;
49 virtual void OnDataRouterDataReceivedN(const char* buffer, int length);
50 virtual void OnDataRouterStateChanged(Tizen::Io::_DataRouterState state);
52 static AccessoryMonitor* GetInstance(void);
53 static void ReleaseInstance(void);
56 AccessoryConditionHandler* __pAccessoryConditionHandler;
57 Tizen::Io::_DataRouter* __pDataRouter;
58 Tizen::App::AppId __clientAppId;
61 #endif //AccessoryMonitor