diff options
Diffstat (limited to 'src/env.h')
| -rw-r--r-- | src/env.h | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -119,6 +119,29 @@ private: }; +class ModuleNotification +{ +public: + ModuleNotification(QObject* o, std::function<void (Module)> f); + ~ModuleNotification(); + + ModuleNotification(const ModuleNotification&) = delete; + ModuleNotification& operator=(const ModuleNotification&) = delete; + + ModuleNotification(ModuleNotification&&) = default; + ModuleNotification& operator=(ModuleNotification&&) = default; + + void setCookie(void* c); + void fire(QString path, std::size_t fileSize); + +private: + void* m_cookie; + QObject* m_object; + std::set<QString> m_loaded; + std::function<void (Module)> m_f; +}; + + // represents the process's environment // class Environment @@ -147,6 +170,16 @@ public: // const Metrics& metrics() const; + // timezone + // + QString timezone() const; + + // will call `f` on the same thread `o` is running on every time a module + // is loaded in the process + // + std::unique_ptr<ModuleNotification> onModuleLoaded( + QObject* o, std::function<void (Module)> f); + // logs the environment // void dump(const Settings& s) const; |
