6 #include "vg/vg_steam_remote_storage.h"
9 enum workshop_operation
{
10 k_workshop_form_op_none
,
11 k_workshop_form_op_loading_model
,
12 k_workshop_form_op_downloading_submission
,
13 k_workshop_form_op_publishing_update
,
14 k_workshop_op_item_scan
,
15 k_workshop_op_item_load
21 struct workshop_file_info
{
27 struct async_workshop_filepath_info
{
33 struct async_workshop_installed_files_info
{
34 PublishedFileId_t
*buffer
;
38 struct async_workshop_metadata_info
{
39 struct workshop_file_info
*info
;
43 VG_STATIC
void workshop_file_info_clear( struct workshop_file_info
*info
)
46 info
->author_name
[0] = '\0';
47 info
->title
[0] = '\0';
50 VG_STATIC
void async_workshop_get_filepath( void *data
, u32 len
);
51 VG_STATIC
void async_workshop_get_installed_files( void *data
, u32 len
);
52 VG_STATIC
void workshop_load_metadata( const char *path
,
53 struct workshop_file_info
*info
);
56 * Start a new operation and crash if we are already running one.
58 VG_STATIC
int workshop_begin_op( enum workshop_operation op
)
60 if( workshop
.operation
!= k_workshop_form_op_none
){
61 vg_error( "Workshop form currently executing op(%d), tried to "
62 "start op(%d)\n", workshop
.operation
, op
);
66 workshop
.operation
= op
;
67 vg_info( "Starting op( %d )\n", op
);
72 * Finished operation, otheres can now run
74 VG_STATIC
void workshop_end_op(void)
76 vg_info( "Finishing op( %d )\n", workshop
.operation
);
77 workshop
.operation
= k_workshop_form_op_none
;
80 #endif /* WORKSHOP_H */