4 #include "workshop_types.h"
8 #include "vg/vg_steam_remote_storage.h"
10 #include "pointcloud.h"
11 #include "vg/vg_steam_auth.h"
12 #include "vg/vg_steam_ugc.h"
13 #include "vg/vg_steam_friends.h"
15 #include "ent_skateshop.h"
17 struct async_workshop_filepath_info
{
23 struct async_workshop_installed_files_info
{
24 PublishedFileId_t
*buffer
;
28 struct async_workshop_metadata_info
{
29 struct workshop_file_info
*info
;
34 #define WORKSHOP_VIEW_PER_PAGE 15
39 char description
[512];
41 struct ui_dropdown_value submission_type_selection
;
42 enum workshop_file_type type
;
44 PublishedFileId_t file_id
; /* 0 if not published yet */
46 struct ui_dropdown_value visibility
;
47 int submit_title
, /* set if the respective controls are touched */
49 submit_file_and_image
;
53 enum workshop_form_page
{
54 k_workshop_form_hidden
,
55 k_workshop_form_open
, /* open but not looking at anything */
56 k_workshop_form_edit
, /* editing a submission */
57 k_workshop_form_cclosing
,
58 k_workshop_form_closing_good
, /* post upload screen */
59 k_workshop_form_closing_bad
,
64 * -----------------------------
67 char addon_folder
[128];
68 struct player_board board_model
;
70 /* what does the user want to do with the image preview? */
71 enum workshop_form_file_intent
{
72 k_workshop_form_file_intent_none
, /* loading probably */
73 k_workshop_form_file_intent_new
, /* board_model is valid */
74 k_workshop_form_file_intent_keep_old
/* just browsing */
78 world_instance
*view_world
;
79 ent_swspreview
*ptr_ent
;
89 * published UGC request
90 * ------------------------------
94 UGCQueryHandle_t handle
;
104 * ------------------------------------------
107 const char *failure_or_success_string
;
113 int view_published_page_count
,
114 view_published_page_id
;
116 struct published_file
{
121 published_files_list
[WORKSHOP_VIEW_PER_PAGE
];
122 int published_files_list_length
;
124 static workshop_form
;
128 VG_STATIC
int workshop_submit_command( int argc
, const char *argv
[] );
129 VG_STATIC
void async_workshop_get_filepath( void *data
, u32 len
);
130 VG_STATIC
void async_workshop_get_installed_files( void *data
, u32 len
);
131 VG_STATIC
void workshop_load_metadata( const char *path
,
132 struct workshop_file_info
*info
);
134 /* generic reciever */
135 VG_STATIC
void workshop_async_any_complete( void *data
, u32 size
)
140 #endif /* WORKSHOP_H */