#ifndef SENSE_API_MANAGER_H #define SENSE_API_MANAGER_H #include #include #include #include #include #include #include #include #include #include #include namespace smo { namespace stim_buff { class StimBuffApiManager { public: struct Resources { std::vector> libs; }; static StimBuffApiManager& getInstance() { static StimBuffApiManager instance; return instance; } void initialize(void) {}; void finalize(void) {}; StimBuffApiLib& loadStimBuffApiLib(const std::string& libraryPath); std::optional> findStimBuffApiLibByLibraryPath( const std::string& libraryPath); std::optional> findStimBuffApiLibByApiName( const std::string& apiName); StimBuffApiLib &getStimBuffApiLibByApiName(const std::string& apiName); void unloadStimBuffApiLib(const std::string& libraryPath); void loadAllStimBuffApiLibsFromOptions(void); void unloadAllStimBuffApiLibs(void); body::BodyViralPostingInvoker initializeStimBuffApiLibCReq( StimBuffApiLib &lib, bool acquireListLock=true); body::BodyViralPostingInvoker finalizeStimBuffApiLibCReq( StimBuffApiLib &lib, bool acquireListLock=true); body::BodyViralPostingInvoker initializeAllStimBuffApiLibsCReq(); body::BodyViralPostingInvoker finalizeAllStimBuffApiLibsCReq(); std::string stringifyLibs() const; public: sscl::SharedResourceGroup s; private: StimBuffApiManager() : s("StimBuffApiManager") {} ~StimBuffApiManager() = default; StimBuffApiManager(const StimBuffApiManager&) = delete; StimBuffApiManager& operator=(const StimBuffApiManager&) = delete; }; } // namespace stim_buff } // namespace smo #endif // SENSE_API_MANAGER_H