Skip to content

Commit

Permalink
Move clap_timestamp_t definition to separate header
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinitou committed Jan 18, 2024
1 parent fd83c02 commit 03acdaa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 1 addition & 10 deletions include/clap/factory/preset-discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#include "../private/std.h"
#include "../private/macros.h"
#include "../timestamp.h"
#include "../version.h"
#include "../universal-plugin-id.h"

Expand Down Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions include/clap/timestamp.h
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 03acdaa

Please sign in to comment.