diff --git a/game/source/screenshots/screenshots_uploader.cpp b/game/source/screenshots/screenshots_uploader.cpp index 2dac1ec37..277f587f8 100644 --- a/game/source/screenshots/screenshots_uploader.cpp +++ b/game/source/screenshots/screenshots_uploader.cpp @@ -2,6 +2,18 @@ REFERENCE_DECLARE(0x0244ECE0, c_screenshots_uploader*, g_screenshots_uploader); +//.text:006191F0 ; public: __cdecl c_screenshots_uploader::c_screenshots_uploader() +//.text:00619280 ; public: __cdecl c_screenshots_uploader::~c_screenshots_uploader() +//.text:00619290 ; public: void* __cdecl c_screenshots_uploader::`scalar deleting destructor'(unsigned int) +//.text:006192C0 ; public: bool __cdecl c_screenshots_uploader::begin_screenshot_upload(e_controller_index controller_index, long content_item_index, s_file_reference const* file_reference, long game_id) +//.text:006194B0 ; public: void __cdecl c_screenshots_uploader::cancel_upload() +//.text:006194C0 ; public: void __cdecl c_screenshots_uploader::dispose(void) +//.text:00619500 ; private: void __cdecl c_screenshots_uploader::end_progress_spinner() +//.text:00619540 ; private: void __cdecl c_screenshots_uploader::end_screenshot_upload() +//.text:006195E0 ; public: bool __cdecl c_screenshots_uploader::get_busy() +//.text:006195F0 ; public: c_screenshots_uploader::e_screenshots_uploader_task __cdecl c_screenshots_uploader::get_current_task() const +//.text:00619600 ; public: static bool __cdecl c_screenshots_uploader::initialize() + void __cdecl screenshots_uploader_dispose() { INVOKE(0x00619610, screenshots_uploader_dispose); @@ -12,7 +24,10 @@ void __cdecl screenshots_uploader_dispose_from_old_map() INVOKE(0x00619620, screenshots_uploader_dispose_from_old_map); } -//.text:00619670 ; +c_screenshots_uploader* __cdecl screenshots_uploader_get() +{ + return INVOKE(0x00619670, screenshots_uploader_get); +} void __cdecl screenshots_uploader_initialize() { @@ -24,12 +39,28 @@ void __cdecl screenshots_uploader_initialize_for_new_map() INVOKE(0x00619690, screenshots_uploader_initialize_for_new_map); } -//.text:006196A0 ; void __cdecl screenshots_uploader_memory_dispose() -//.text:006196D0 ; void __cdecl screenshots_uploader_memory_initialize(e_map_memory_configuration) -//.text:00619760 ; +void __cdecl screenshots_uploader_memory_dispose() +{ + INVOKE(0x006196A0, screenshots_uploader_memory_dispose); +} + +void __cdecl screenshots_uploader_memory_initialize(e_map_memory_configuration memory_configuration) +{ + INVOKE(0x006196D0, screenshots_uploader_memory_initialize, memory_configuration); +} + +c_screenshots_uploader* __cdecl screenshots_uploader_try_and_get() +{ + return INVOKE(0x00619760, screenshots_uploader_try_and_get); +} void __cdecl screenshots_uploader_update() { INVOKE(0x00619770, screenshots_uploader_update); } +//.text:00619780 ; private: void __cdecl c_screenshots_uploader::start_progress_spinner(bool) +//.text:00619870 ; public: void __cdecl c_screenshots_uploader::update() +//.text:00619920 ; private: void __cdecl c_screenshots_uploader::update_progress_spinner() +//.text:00619970 ; private: void __cdecl c_screenshots_uploader::update_screenshot_upload() + diff --git a/game/source/screenshots/screenshots_uploader.hpp b/game/source/screenshots/screenshots_uploader.hpp index f6436640e..27902f751 100644 --- a/game/source/screenshots/screenshots_uploader.hpp +++ b/game/source/screenshots/screenshots_uploader.hpp @@ -7,29 +7,55 @@ struct c_screenshots_uploader { - c_http_post_source m_post_source; - c_http_stored_buffer_downloader<1024> m_buffer_downloader; +public: + //c_screenshots_uploader(); + //~c_screenshots_uploader(); + //bool begin_screenshot_upload(e_controller_index controller_index, long content_item_index, s_file_reference const* file_reference, long game_id); + //void cancel_upload(); + //void dispose(); + +private: + //void end_progress_spinner(); + //void end_screenshot_upload(); + +public: + //bool get_busy(); + //c_screenshots_uploader::e_screenshots_uploader_task get_current_task() const; + //static bool initialize(); + +private: + //void start_progress_spinner(bool); + +public: + //void update(); + +private: + //void update_progress_spinner(); + //void update_screenshot_upload(); + + c_http_post_source m_http_post_source; + c_http_stored_buffer_downloader<1024> m_http_uploader; c_enum m_controller_index; - long m_screenshot_uploading; // bool? upload_state? - dword m_upload_timestamp; - c_url_string m_url_string; + long m_screenshots_uploader_task; + long m_screenshot_upload_time; + c_url_string m_screenshots_uploader_url; long m_content_item_index; - s_file_reference m_file_reference; - - // if (m_upload_in_progress) - // { - // window_manager_get()->get_screen_by_name(STRING_ID(gui, in_progress_mini))->transition_out_with_transition_type(0); - // m_upload_in_progress = false; - // } - bool m_upload_in_progress; + s_file_reference m_screenshot_file; + bool m_progress_spinner_active; }; static_assert(sizeof(c_screenshots_uploader) == 0xE08); extern c_screenshots_uploader*& g_screenshots_uploader; +enum e_map_memory_configuration; + extern void __cdecl screenshots_uploader_dispose(); extern void __cdecl screenshots_uploader_dispose_from_old_map(); +extern c_screenshots_uploader* __cdecl screenshots_uploader_get(); extern void __cdecl screenshots_uploader_initialize(); extern void __cdecl screenshots_uploader_initialize_for_new_map(); +extern void __cdecl screenshots_uploader_memory_dispose(); +extern void __cdecl screenshots_uploader_memory_initialize(e_map_memory_configuration memory_configuration); +extern c_screenshots_uploader* __cdecl screenshots_uploader_try_and_get(); extern void __cdecl screenshots_uploader_update();