X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Flogging.hpp;h=28f2107437ec966cd2e6545dca9ade9aea469d5c;hp=699576271a2d68f19f9fe400433a9545bca14295;hb=1f2082e20445966624f6172ebefd53fb1a021164;hpb=bcb4c327ee9b8d2172d126429ba017884d079d4c diff --git a/pv/logging.hpp b/pv/logging.hpp index 69957627..28f21074 100644 --- a/pv/logging.hpp +++ b/pv/logging.hpp @@ -22,11 +22,15 @@ #include "globalsettings.hpp" +#include + #include #include #include #include +using std::mutex; + namespace pv { class Logging : public QObject, public GlobalSettingsInterface @@ -40,6 +44,7 @@ public: LogSource_srd }; + static const int MIN_BUFFER_SIZE; static const int MAX_BUFFER_SIZE; public: @@ -55,10 +60,10 @@ public: static void log_pv(QtMsgType type, const QMessageLogContext &context, const QString &msg); - static int log_libsigrok(void *cb_data, int loglevel, const char *format, va_list args); + static int log_sr(void *cb_data, int loglevel, const char *format, va_list args); #ifdef ENABLE_DECODE - static int log_libsrd(void *cb_data, int loglevel, const char *format, va_list args); + static int log_srd(void *cb_data, int loglevel, const char *format, va_list args); #endif private: @@ -70,6 +75,7 @@ Q_SIGNALS: private: int buffer_size_; QStringList buffer_; + mutable mutex log_mutex_; }; extern Logging logging;