lib: rename bt_plugin_create_all_*() -> bt_plugin_find_all_*()
[babeltrace.git] / lib / graph / notification / inactivity.c
index 2472cba1fa7ca657eedbc55e2c5d78d724338f84..47d759d4d3aa33f7ef058841b8624c85d360cb70 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
 #define BT_LOG_TAG "NOTIF-INACTIVITY"
 #include <babeltrace/lib-logging-internal.h>
 
+#include <babeltrace/assert-pre-internal.h>
 #include <babeltrace/object-internal.h>
 #include <babeltrace/compiler-internal.h>
 #include <babeltrace/trace-ir/clock-class.h>
 #include <babeltrace/trace-ir/clock-value-internal.h>
 #include <babeltrace/graph/notification-internal.h>
-#include <babeltrace/graph/private-notification-inactivity.h>
+#include <babeltrace/graph/notification-inactivity-const.h>
+#include <babeltrace/graph/notification-inactivity.h>
 #include <babeltrace/graph/notification-inactivity-internal.h>
-#include <babeltrace/assert-pre-internal.h>
-#include <babeltrace/object.h>
 
 static
 void bt_notification_inactivity_destroy(struct bt_object *obj)
@@ -48,7 +48,7 @@ void bt_notification_inactivity_destroy(struct bt_object *obj)
        g_free(notification);
 }
 
-struct bt_private_notification *bt_private_notification_inactivity_create(
+struct bt_notification *bt_notification_inactivity_create(
                struct bt_self_notification_iterator *self_notif_iter,
                struct bt_clock_class *default_clock_class)
 {
@@ -86,11 +86,9 @@ end:
        return (void *) ret_notif;
 }
 
-int bt_private_notification_inactivity_set_default_clock_value(
-               struct bt_private_notification *priv_notif,
-               uint64_t value_cycles)
+void bt_notification_inactivity_set_default_clock_value(
+               struct bt_notification *notif, uint64_t value_cycles)
 {
-       struct bt_notification *notif = (void *) priv_notif;
        struct bt_notification_inactivity *inactivity = (void *) notif;
 
        BT_ASSERT_PRE_NON_NULL(notif, "Notification");
@@ -99,11 +97,11 @@ int bt_private_notification_inactivity_set_default_clock_value(
        bt_clock_value_set_value_inline(inactivity->default_cv, value_cycles);
        BT_LIB_LOGV("Set inactivity notification's default clock value: "
                "%![notif-]+n, value=%" PRIu64, notif, value_cycles);
-       return 0;
 }
 
-struct bt_clock_value *bt_notification_inactivity_borrow_default_clock_value(
-               struct bt_notification *notif)
+const struct bt_clock_value *
+bt_notification_inactivity_borrow_default_clock_value_const(
+               const struct bt_notification *notif)
 {
        struct bt_notification_inactivity *inactivity = (void *) notif;
 
This page took 0.035759 seconds and 4 git commands to generate.