cpp-common/bt2: add support to get / set trace UID
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 28 Nov 2023 04:39:27 +0000 (23:39 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
Wrap bt_trace_set_uid and bt_trace_get_uid.

Change-Id: I610c426424214334fb210421809adae3e214c4e3
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10154
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12728

src/cpp-common/bt2/trace-ir.hpp

index 462291c7ba38f63c85779463c664e196cf26723c..c04ebaa337f70ef81ad87fbca6bd1ac960cdd525 100644 (file)
@@ -675,6 +675,16 @@ public:
         return bt2s::nullopt;
     }
 
+    void uid(const bt2c::CStringView uid) const noexcept
+    {
+        bt_trace_set_uid(this->libObjPtr(), uid);
+    }
+
+    bt2c::CStringView uid() const noexcept
+    {
+        return bt_trace_get_uid(this->libObjPtr());
+    }
+
     std::uint64_t length() const noexcept
     {
         return bt_trace_get_stream_count(this->libObjPtr());
This page took 0.025233 seconds and 4 git commands to generate.