X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=addon.h;h=5ca812cc94a2ec0777bd6d2b1203e0a92b2af3d1;hb=fbc68c65e01838feb77f47b30994b45fcc39ebaf;hp=2b9d9ac4f7906e9af0ce3142b0ba12a5fe95fb14;hpb=825c3bce18272c0f81659e0eac469709d0462836;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/addon.h b/addon.h index 2b9d9ac..5ca812c 100644 --- a/addon.h +++ b/addon.h @@ -1,14 +1,6 @@ #ifndef ADDON_H #define ADDON_H -#define ADDON_FOLDERNAME_MAX 64 - -/* total count that we have knowledge of */ -#define ADDON_MOUNTED_MAX 128 -#define ADDON_UID_MAX 76 - -#ifndef ADDON_DEFINE_ONLY - #include "skaterift.h" #include "vg/vg_steam_ugc.h" #include "addon_types.h" @@ -27,12 +19,15 @@ struct addon_alias { char foldername[ ADDON_FOLDERNAME_MAX ]; }; +#define ADDON_REG_HIDDEN 0x1 + struct { struct addon_reg{ addon_alias alias; u32 foldername_hash; u8 metadata[512]; /* vg_msg buffer */ u32 metadata_len; + u32 flags; u16 cache_id; @@ -75,14 +70,18 @@ struct { static addon_system; static void addon_system_init( void ); -static u32 addon_count( enum addon_type type ); -static addon_reg *get_addon_from_index( enum addon_type type, u32 index ); +static u32 addon_count( enum addon_type type, u32 ignoreflags ); +static addon_reg *get_addon_from_index( enum addon_type type, u32 index, + u32 ignoreflags ); static u32 get_index_from_addon( enum addon_type type, addon_reg *a ); -static int addon_get_content_folder( addon_reg *reg, vg_str *folder ); +static int addon_get_content_folder( addon_reg *reg, vg_str *folder, int async); /* scanning routines */ static u32 addon_match( addon_alias *alias ); +static int addon_alias_eq( addon_alias *a, addon_alias *b ); static void addon_alias_uid( addon_alias *alias, char buf[ADDON_UID_MAX] ); +static int addon_uid_to_alias( const char *uid, addon_alias *alias ); +static void invalidate_addon_alias( addon_alias *alias ); static void addon_mount_content_folder( enum addon_type type, const char *base_folder, const char *content_ext ); @@ -104,5 +103,4 @@ static void addon_cache_unwatch( enum addon_type type, u16 cache_id ); static u16 addon_cache_create_viewer_from_uid( enum addon_type type, char uid[ADDON_UID_MAX] ); -#endif #endif /* ADDON_H */