12#ifndef __PLUGINS_CACHED_PLUGIN_DESCRIPTORS_H__
13#define __PLUGINS_CACHED_PLUGIN_DESCRIPTORS_H__
24#define CACHED_PLUGIN_DESCRIPTORS_SCHEMA_VERSION 4
44static const cyaml_schema_field_t cached_plugin_descriptors_fields_schema[] = {
49 plugin_descriptor_schema),
53 plugin_descriptor_schema),
58static const cyaml_schema_value_t cached_plugin_descriptors_schema = {
61 cached_plugin_descriptors_fields_schema),
101 bool check_blacklisted);
116 const
char * abs_path);
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
void cached_plugin_descriptors_blacklist(CachedPluginDescriptors *self, const char *sha1, bool _serialize)
Appends a descriptor to the cache.
PluginDescriptor ** cached_plugin_descriptors_get(CachedPluginDescriptors *self, const char *abs_path)
Returns the PluginDescriptor's corresponding to the .so/.dll file at the given path,...
void cached_plugin_descriptors_replace(CachedPluginDescriptors *self, const PluginDescriptor *_new_descr, bool _serialize)
Replaces a descriptor in the cache.
CachedPluginDescriptors * cached_plugin_descriptors_new(void)
Reads the file and fills up the object.
bool cached_plugin_descriptors_is_blacklisted(CachedPluginDescriptors *self, const char *sha1)
Returns if the plugin with the given sha1 is blacklisted or not.
void cached_plugin_descriptors_clear(CachedPluginDescriptors *self)
Clears the descriptors and removes the cache file.
unsigned int cached_plugin_descriptors_find(CachedPluginDescriptors *self, GPtrArray *arr, const PluginDescriptor *descr, const char *sha1, bool check_valid, bool check_blacklisted)
Finds descriptors matching the given one's unique identifiers and adds them to the array.
void cached_plugin_descriptors_add(CachedPluginDescriptors *self, const PluginDescriptor *descr, int _serialize)
Appends a descriptor to the cache.
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
#define YAML_FIELD_FIXED_SIZE_PTR_ARRAY_VAR_COUNT(owner, member, schema)
Fixed-width array of pointers with variable count.
Descriptors to be cached.
PluginDescriptor * descriptors[90000]
Valid descriptors.
PluginDescriptor * blacklisted[90000]
Blacklisted paths and hashes, to skip when scanning.
int schema_version
Version of the file.