]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/capture/nfqueue/nfqueue.h
Add an option to opt-out Firebird store.
[stg.git] / projects / stargazer / plugins / capture / nfqueue / nfqueue.h
index 7d71bcd23e38885547b093c10bd7e84cbc3caed1..097cf3b3fea5241ad641febabed2d1d9a9f3f058 100644 (file)
 
 #include <string>
 #include <vector>
-
-#include <pthread.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#include <jthread.hpp>
+#pragma GCC diagnostic pop
 
 namespace STG
 {
 
-struct Users;
-struct Tariffs;
+class Users;
+class Tariffs;
 struct Admins;
 struct TraffCounter;
 struct Settings;
@@ -69,12 +71,11 @@ private:
     NFQ_CAP(const NFQ_CAP & rvalue);
     NFQ_CAP & operator=(const NFQ_CAP & rvalue);
 
-    static void *       Run(void *);
+    void                Run(std::stop_token token);
 
     mutable std::string errorStr;
 
-    pthread_t           thread;
-    bool                nonstop;
+    std::jthread        m_thread;
     bool                isRunning;
     STG::ModuleSettings     settings;