Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Uploads

Ahmed Castro edited this page Aug 29, 2018 · 4 revisions

setUploadListener

void Instance::setUploadListener(const std::function<void(u32 response_code, u32 mod_id)> &callback);

Registers a function to be called every time a modfile upload finishes.

Function parameters

Name Type Description
callback const std::function<void(u32 response_code, u32 mod_id)>& Function to be called every time a modfile finished uploading.

Callback parameters

Name Type Description
response_code u32 Response code from mod.io backend. See Response Codes.
mod_id u32 Id of the modfile that was just uploaded.

Examples

modio_instance.setUploadListener([&](u32 response_code, u32 mod_id) {
  if (response_code == 201)
  {
    //Mod successfully uploaded
  }
});

getModUploadQueue

std::list<QueuedModfileUpload *> Instance::getModfileUploadQueue();

Returns a std::list of modio::QueuedModfileUpload objects which represents the mods that are currently queued to be uploaded.

Examples

std::list<modio::QueuedModfileUpload *> modfile_upload_queue = modio_instance.getModfileUploadQueue();

Contents

Clone this wiki locally