summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
Diffstat (limited to 'core/include')
-rw-r--r--core/include/turns/core/participant.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/include/turns/core/participant.hpp b/core/include/turns/core/participant.hpp
index 8568b03..cd99fbb 100644
--- a/core/include/turns/core/participant.hpp
+++ b/core/include/turns/core/participant.hpp
@@ -8,6 +8,8 @@
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
+#include <nlohmann/json_fwd.hpp>
+
#include <compare>
namespace turns::core
@@ -15,6 +17,7 @@ namespace turns::core
struct participant : Glib::Object
{
auto static create(Glib::ustring name, float priority, disposition disposition) -> Glib::RefPtr<participant>;
+ auto static create(nlohmann::json const & serialized) -> Glib::RefPtr<participant>;
participant();
participant(Glib::ustring name, float priority, disposition disposition);
@@ -45,6 +48,8 @@ namespace turns::core
return self.m_priority.get_proxy();
}
+ auto serialize() -> nlohmann::json;
+
private:
Glib::Property<core::disposition> m_disposition{*this, "disposition", core::disposition::neutral};
Glib::Property<bool> m_is_active{*this, "active", false};