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

Uploads (C compatible)

Ahmed Castro edited this page Jun 26, 2018 · 4 revisions

modioSetDownloadListener

void modioSetUploadListener(void (*callback)(u32 response_code, u32 mod_id)); 

C++ wrapper: Downloads#setuploadlistener

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

Function parameters

Name Type Description
callback void (*callback)(u32 response_code, u32 mod_id) Function to be called every time a modfile upload finishes.

Callback parameters

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

Examples

void onAddModfile(u32 response_code, u32 mod_id)
{
  if (response_code == 201)
  {
    //Modfile uploaded successfully
  }
}

[...]

modioSetUploadListener(&onAddModfile);

Contents

Clone this wiki locally