Kallisto Linux API
Library for interacting with Kallisto devices
kallisto_manager.hpp
Go to the documentation of this file.
1 
42 #ifndef KALLISTO_MANAGER_HPP
43 #define KALLISTO_MANAGER_HPP
44 
45 #include <vector>
46 
47 #include "../../util/error/kallisto_error.hpp"
48 #include "../../hardware/kallisto.hpp"
49 #include "../../hardware/kallisto_event_listener.hpp"
50 
51 namespace kallisto {
52 namespace core {
53 
54 //Forward declarations
55 class KallistoCore;
56 class KallistoCoreImpl;
57 
58 class KallistoManager {
59  friend class KallistoCore; //Only KallistoCore can create managers
60 
61 private:
62  KallistoCoreImpl& m_core;
63 
68 
72  ~KallistoManager();
73 
77  KallistoManager(KallistoManager const&) = delete;
78  KallistoManager(KallistoManager&&) = delete;
79  void operator=(KallistoManager const&) = delete;
80  void operator=(KallistoManager &&) = delete;
81 
82 public:
83 
90  std::vector<hardware::Kallisto*> getKallistos();
91 
100  hardware::Kallisto* getKallisto(std::string address);
101 
102 
112 
122 
132 
144 
154 
164 
173  bool getBond(hardware::Kallisto& kallisto);
174 
185  error::KallistoDetailedResult startDfu(hardware::Kallisto& kallisto, std::string file_path, void* listener);
186 
196 };
197 
198 } /* namepsace core */
199 } /* namepsace kallisto */
200 
201 #endif // KALLISTO_MANAGER_HPP
Definition: kallisto_manager.hpp:57
std::vector< hardware::Kallisto * > getKallistos()
error::KallistoDetailedResult registerListener(hardware::KallistoEventListener &listener, hardware::Kallisto &kallisto)
hardware::Kallisto * getKallisto(std::string address)
Definition: bluetooth_adapter.hpp:52
Definition: kallisto_event_listener.hpp:56
Class that encapsulates a result.
Definition: kallisto_error.hpp:81
error::KallistoDetailedResult stayConnected(hardware::Kallisto &kallisto, bool enable)
error::KallistoDetailedResult startDfu(hardware::Kallisto &kallisto, std::string file_path, void *listener)
Definition: kallisto.hpp:52
bool getBond(hardware::Kallisto &kallisto)
error::KallistoDetailedResult abortDfu(hardware::Kallisto &kallisto)
error::KallistoDetailedResult unregisterListener(hardware::KallistoEventListener &listener, hardware::Kallisto &kallisto)
Definition: kallisto_core.hpp:57
Definition: kallisto_core_impl.hpp:69
error::KallistoDetailedResult removeBond(hardware::Kallisto &kallisto)
error::KallistoDetailedResult createBond(hardware::Kallisto &kallisto)