38# include <curl/curl.h>
70 Ogre::WorkQueue::Response*
handleRequest(
const Ogre::WorkQueue::Request* req,
const Ogre::WorkQueue* srcQ)
override;
Central state/object manager and communications hub.
RepoAttachmentsMap m_repo_attachments
Fully loaded images in memory.
void InstallDownloadedRepoFile(MsgType result, RepoFileInstallRequest *request)
void DrawAttachment(BBCodeDrawingContext *context, int attachment_id)
void DrawResourceDescriptionBBCode(const ResourceItem &item, ImVec2 panel_screenpos, ImVec2 panel_size)
std::string m_repofiles_msg
void OpenResource(int resource_id)
std::string m_current_sort
std::string m_repolist_msg
Ogre::TexturePtr m_fallback_thumbnail
bool CheckRepoFileIsInstalled(ResourceFiles &resfile, std::string &out_filepath)
void RequestInstallRepoFile(int resource_id, int datafile_pos, std::string filepath)
RepoFileInstallRequestID_t GetNextInstallRequestId()
const ImVec4 RESOURCE_TITLE_COLOR
void NotifyRepoFileUninstalled(std::string const &filename)
void DrawResourceView(float searchbox_x)
ImVec4 m_repolist_msg_color
int m_gallery_mode_attachment_id
const float ATTACH_SPINNER_RADIUS
void QueueInstallRepoFile(RepoFileInstallRequest *request)
const float ATTACH_MAX_WIDTH
Ogre::uint16 m_ogre_workqueue_channel
void DrawThumbnail(ResourceItemArrayPos_t resource_arraypos, ImVec2 image_size, float spinner_size, ImVec2 spinner_cursor)
const ImVec2 ATTACH_SPINNER_PADDING
void SetVisible(bool visible)
Str< 500 > m_search_input
const float ATTACH_MAX_HEIGHT
std::string m_repolist_curlmsg
Displayed as dimmed text.
const ImVec4 RESOURCE_INSTALL_BTN_COLOR
std::string m_current_category
RepoFileInstallRequestID_t m_next_install_request_id
ResourceItemArrayPos_t m_resourceview_item_arraypos
RepoImageRequestHandler m_repo_image_request_handler
std::string m_all_category_label
RepoFileInstallRequestID_t m_active_install_request_id
std::string m_repolist_httpmsg
Displayed as dimmed text.
ResourcesCollection m_data
void ShowError(CurlFailInfo *failinfo)
void DrawFooterDownloadsInfo()
std::string m_current_category_label
void DrawResourceViewRightColumn()
int m_current_category_id
void DownloadBBCodeAttachmentsRecursive(const bbcpp::BBNode &parent)
void DownloadAttachment(int attachment_id, std::string const &attachment_ext)
void UpdateResources(ResourcesCollection *data)
void LoadDownloadedImage(RepoImageDownloadRequest *request)
To be run on main thread.
void UpdateResourceFilesAndDescription(ResourcesCollection *data)
static void DownloadImage(RepoImageDownloadRequest *request)
To be run on background via Ogre WorkQueue.
std::vector< RepoFileInstallRequest > m_queued_install_requests
void TryProcessNextQueuedInstallRequest()
Wrapper for classic c-string (local buffer) Refresher: strlen() excludes '\0' terminator; strncat() A...
MsgType
Global gameplay message loop, see struct Message in GameContext.h.
const int RESOURCEITEMARRAYPOS_INVALID
std::map< int, Ogre::TexturePtr > RepoAttachmentsMap
Maps attachment ID to Ogre::TexturePtr.
int ResourceItemArrayPos_t
static const RepoFileInstallRequestID_t REPOFILEINSTALLREQUESTID_INVALID
Invalid ID for repository item installation request.
int RepoFileInstallRequestID_t
Unique sequentially generated ID of a repository item installation request; use GUI::RepositorySelect...
std::ostream & operator<<(std::ostream &os, RepoImageDownloadRequest &val)
std::shared_ptr< BBDocument > BBDocumentPtr
ResFileInstallStatus cached_install_status
std::string cached_install_path
Valid if cached_install_status == RFIS_INSTALLED
bool attachments_dl_queued
Attachments are requested in bulk on first display.
bbcpp::BBDocumentPtr description
Ogre::TexturePtr preview_tex
std::vector< ResourceItem > items
std::vector< ResourceCategories > categories
std::vector< ResourceFiles > files
Payload for MSG_NET_INSTALL_REPOFILE_REQUEST message - also used for update (overwrites existing)
std::string rfir_filename
RepoFileInstallRequestID_t rfir_install_request_id
std::string rfir_filepath
int thumb_resourceitem_idx
fetch thumbnail
std::string attachment_ext
int attachment_id
download attachment
Ogre::WorkQueue::Response * handleRequest(const Ogre::WorkQueue::Request *req, const Ogre::WorkQueue *srcQ) override