5 #include "addon_types.h"
7 #include "vg/vg_steam_remote_storage.h"
9 #include "pointcloud.h"
10 #include "vg/vg_steam_auth.h"
11 #include "vg/vg_steam_ugc.h"
12 #include "vg/vg_steam_friends.h"
14 #include "ent_skateshop.h"
16 struct async_workshop_filepath_info
{
22 struct async_workshop_installed_files_info
{
23 PublishedFileId_t
*buffer
;
27 struct async_workshop_metadata_info
{
28 struct workshop_file_info
*info
;
33 #define WORKSHOP_VIEW_PER_PAGE 15
38 char description
[512];
40 struct ui_dropdown_value submission_type_selection
;
43 PublishedFileId_t file_id
; /* 0 if not published yet */
45 struct ui_dropdown_value visibility
;
46 int submit_title
, /* set if the respective controls are touched */
48 submit_file_and_image
;
52 enum workshop_form_page
{
53 k_workshop_form_hidden
,
54 k_workshop_form_open
, /* open but not looking at anything */
55 k_workshop_form_edit
, /* editing a submission */
56 k_workshop_form_cclosing
,
57 k_workshop_form_closing_good
, /* post upload screen */
58 k_workshop_form_closing_bad
,
63 * -----------------------------
66 char addon_folder
[128];
67 struct player_board board_model
;
69 /* what does the user want to do with the image preview? */
70 enum workshop_form_file_intent
{
71 k_workshop_form_file_intent_none
, /* loading probably */
72 k_workshop_form_file_intent_new
, /* board_model is valid */
73 k_workshop_form_file_intent_keep_old
/* just browsing */
77 world_instance
*view_world
;
78 ent_swspreview
*ptr_ent
;
88 * published UGC request
89 * ------------------------------
93 UGCQueryHandle_t handle
;
103 * ------------------------------------------
106 const char *failure_or_success_string
;
112 int view_published_page_count
,
113 view_published_page_id
;
115 struct published_file
{
120 published_files_list
[WORKSHOP_VIEW_PER_PAGE
];
121 int published_files_list_length
;
123 static workshop_form
;
127 VG_STATIC
int workshop_submit_command( int argc
, const char *argv
[] );
128 VG_STATIC
void async_workshop_get_filepath( void *data
, u32 len
);
129 VG_STATIC
void async_workshop_get_installed_files( void *data
, u32 len
);
130 VG_STATIC
void workshop_load_metadata( const char *path
,
131 struct workshop_file_info
*info
);
133 /* generic reciever */
134 VG_STATIC
void workshop_async_any_complete( void *data
, u32 size
)
139 #endif /* WORKSHOP_H */