commit df3de19d9ace38847141b41d1840e7f17f0a1295
parent be828efc29c456accbd057268780b9a4303aa94f
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Fri, 28 May 2021 16:12:36 +0200
Rework the file-reference
Diffstat:
2 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/include/clap/ext/draft/file-reference.h b/include/clap/ext/draft/file-reference.h
@@ -38,7 +38,11 @@ typedef struct clap_plugin_file_reference {
bool (*get)(const clap_plugin *plugin, uint32_t index, clap_file_reference *file_reference);
// [main-thread]
- bool (*get_hash)(const clap_plugin *plugin, clap_id resource_id, clap_hash hash, uint8_t *digest);
+ bool (*get_hash)(const clap_plugin *plugin,
+ clap_id resource_id,
+ clap_hash hash,
+ uint8_t * digest,
+ uint32_t digest_size);
// updates the path to a file reference
// [main-thread]
@@ -53,7 +57,7 @@ typedef struct clap_host_file_reference {
// [main-thread]
void (*changed)(const clap_host *host);
- void (*set_dirty)(const clap_host *host , clap_id resource_id);
+ void (*set_dirty)(const clap_host *host, clap_id resource_id);
} clap_host_file_reference;
#ifdef __cplusplus
diff --git a/include/clap/hash.h b/include/clap/hash.h
@@ -8,23 +8,14 @@ extern "C" {
// Commonly used hashing algorithms
enum {
- // 32 bits
- CLAP_HASH_CRC32,
-
- // 64 bits
- CLAP_HASH_CRC64,
-
- // 128 bits
- CLAP_HASH_MD5,
-
- // 160 bits
- CLAP_HASH_SHA1,
-
- // 256 bits
- CLAP_HASH_SHA2,
-
- // 512 bits
- CLAP_HASH_SHA3,
+ CLAP_HASH_CRC32,
+ CLAP_HASH_CRC64,
+ CLAP_HASH_MD5,
+ CLAP_HASH_SHA1,
+ CLAP_HASH_SHA2,
+ CLAP_HASH_SHA3,
+ CLAP_BLAKE2,
+ CLAP_BLAKE3,
};
typedef uint32_t clap_hash;