Make [at|de]tachAllSenseDevices[FromSpecs] and initializeSalmanoff async
This is the culmination of a lot of changes over the last week. We're making SMO basically fully async in many areas, and then preparing to implement the spinqueueing mechanism for locking.
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
#define _SALMANOFF_H
|
||||
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
#include <componentThread.h>
|
||||
|
||||
namespace smo {
|
||||
|
||||
void initializeSalmanoff(std::shared_ptr<ComponentThread>& componentThread);
|
||||
void shutdownSalmanoff(void);
|
||||
typedef std::function<void(bool)> initializeSalmanoffCbFn;
|
||||
typedef initializeSalmanoffCbFn shutdownSalmanoffCbFn;
|
||||
void initializeSalmanoff(initializeSalmanoffCbFn callback);
|
||||
void shutdownSalmanoff(shutdownSalmanoffCbFn callback);
|
||||
|
||||
} // namespace smo
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <optional>
|
||||
#include <functional>
|
||||
#include <componentThread.h>
|
||||
#include <asynchronousLoop.h>
|
||||
#include <senseApis/senseApiLib.h>
|
||||
#include <user/deviceAttachmentSpec.h>
|
||||
|
||||
@@ -52,9 +53,16 @@ public:
|
||||
void detachSenseDeviceReq(
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec>& spec,
|
||||
detachSenseDeviceReqCbFn cb);
|
||||
void attachAllSenseDevicesFromSpecs(void);
|
||||
void detachAllSenseDevices(void);
|
||||
void detachAllSenseDevicesReq(void);
|
||||
|
||||
typedef std::function<void(AsynchronousLoop &results)>
|
||||
attachAllSenseDevicesFromSpecsReqCbFn;
|
||||
typedef std::function<void(AsynchronousLoop &results)>
|
||||
detachAllSenseDevicesReqCbFn;
|
||||
|
||||
void attachAllSenseDevicesFromSpecsReq(
|
||||
attachAllSenseDevicesFromSpecsReqCbFn cb);
|
||||
void detachAllSenseDevicesReq(
|
||||
detachAllSenseDevicesReqCbFn cb);
|
||||
|
||||
std::string stringifyLibs() const;
|
||||
|
||||
@@ -69,6 +77,8 @@ private:
|
||||
|
||||
class AttachSenseDeviceReq;
|
||||
class DetachSenseDeviceReq;
|
||||
class AttachAllSenseDevicesFromSpecsReq;
|
||||
class DetachAllSenseDevicesReq;
|
||||
|
||||
public:
|
||||
static std::optional<std::string> searchForLibInSmoSearchPaths(
|
||||
|
||||
Reference in New Issue
Block a user