OrbbecSDK  1.0.0
Context.hpp
浏览该文件的文档.
1 
6 #pragma once
7 
8 #include "Types.hpp"
9 
10 #include <functional>
11 #include <memory>
12 
13 struct ContextImpl;
14 
15 namespace ob {
16 class Device;
17 class DeviceInfo;
18 class DeviceList;
19 
20 class OB_EXTENSION_API Context {
21 private:
22  std::unique_ptr< ContextImpl > impl_;
23 
24 public:
30  Context();
31  virtual ~Context();
32 
38  std::shared_ptr< DeviceList > queryDeviceList();
39 
40  using DeviceChangedCallback = std::function< void( std::shared_ptr< DeviceList > removedList, std::shared_ptr< DeviceList > addedList ) >;
41 
47  void setDeviceChangedCallback( DeviceChangedCallback callback );
48 
54  void setLoggerServerity( OBLogServerity log );
55 
62  void setLoggerToFile( OBLogServerity log, const char* fileName );
63 
69  void setLoggerToConsole( OBLogServerity log );
70 
76  void enableMultiDeviceSync( uint64_t repeatInterval );
77 };
78 } // namespace ob
Definition: Context.hpp:15
提供SDK的结构体、枚举常量定义(依赖libobsensor/h/ObTypes.h)