commit 03acdaa8be5ac1509658c5af5e44a2916872676f
parent fd83c02be8d9e05f40a8e62eaaf882342d529936
Author: trinitou <debuggleburger@gmail.com>
Date: Thu, 18 Jan 2024 07:03:08 +0100
Move clap_timestamp_t definition to separate header
Diffstat:
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/clap/factory/preset-discovery.h b/include/clap/factory/preset-discovery.h
@@ -43,6 +43,7 @@
#include "../private/std.h"
#include "../private/macros.h"
+#include "../timestamp.h"
#include "../version.h"
#include "../universal-plugin-id.h"
@@ -89,16 +90,6 @@ enum clap_preset_discovery_flags {
CLAP_PRESET_DISCOVERY_IS_FAVORITE = 1 << 3,
};
-// TODO: move clap_timestamp_t, CLAP_TIMESTAMP_UNKNOWN and clap_plugin_id_t to parent files once we
-// settle with preset discovery
-
-// This type defines a timestamp: the number of seconds since UNIX EPOCH.
-// See C's time_t time(time_t *).
-typedef uint64_t clap_timestamp_t;
-
-// Value for unknown timestamp.
-static const clap_timestamp_t CLAP_TIMESTAMP_UNKNOWN = 0;
-
// Receiver that receives the metadata for a single preset file.
// The host would define the various callbacks in this interface and the preset parser function
// would then call them.
diff --git a/include/clap/timestamp.h b/include/clap/timestamp.h
@@ -0,0 +1,11 @@
+#pragma once
+
+#include "private/std.h"
+#include "private/macros.h"
+
+// This type defines a timestamp: the number of seconds since UNIX EPOCH.
+// See C's time_t time(time_t *).
+typedef uint64_t clap_timestamp_t;
+
+// Value for unknown timestamp.
+static const CLAP_CONSTEXPR clap_timestamp_t CLAP_TIMESTAMP_UNKNOWN = 0;