This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Uploads (C compatible)
Ahmed Castro edited this page Apr 3, 2019
·
4 revisions
void modioSetUploadListener(void (*callback)(u32 response_code, u32 mod_id));
C++ wrapper: Uploads#setuploadlistener
Registers a function to be called every time a modfile upload finishes.
Name | Type | Description |
---|---|---|
callback | void (*callback)(u32 response_code, u32 mod_id) |
Function to be called every time a modfile upload finishes. |
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. |
void onAddModfile(u32 response_code, u32 mod_id)
{
if (response_code == 201)
{
//Modfile uploaded successfully
}
}
[...]
modioSetUploadListener(&onAddModfile);
u32 modioGetModUploadQueueCount();
C++ wrapper: n/a
Returns the size of the upload queue.
u32 queue_size = modioGetModUploadQueueCount();
void modioGetModfileUploadQueue(ModioQueuedModfileUpload* upload_queue);
C++ wrapper: Uploads#getmoduploadqueue
Returns an array of ModioQueuedModfileUpload objects which represents the mods that are currently queued to be uploaded.
Name | Type | Description |
---|---|---|
upload_queue | ModioQueuedModfileUpload* |
Array where the contents of the queue will be copied. |
u32 queue_size = modioGetModUploadQueueCount();
ModioQueuedModfileUpload *upload_queue = malloc(queue_size * sizeof(*upload_queue));
modioGetModfileUploadQueue(upload_queue);
[...]
free(upload_queue);
void modioFreeQueuedModfileUpload(ModioQueuedModfileUpload* queued_modfile_upload);
C++ wrapper: n/a
Frees the privided ModioQueuedModfileUpload, use this to free the returned queue from modioGetModfileUploadQueue.
Name | Type | Description |
---|---|---|
queued_mod_download | ModioQueuedModfileUpload |
ModioQueuedModfileUpload object to be freed. |
- Home
- Table of Contents
- Getting Started
- SDK Methods
- Creators
- Editors
- Schemas
- modio::Avatar
- modio::Comment
- modio::Dependency
- modio::Download
- modio::Error
- modio::Filehash
- modio::Game
- modio::GameTagOption
- modio::Header
- modio::Icon
- modio::Image
- modio::InstalledMod
- modio::Logo
- modio::Media
- modio::MetadataKVP
- modio::Mod
- modio::ModEvent
- modio::Modfile
- modio::QueuedModDownload
- modio::QueuedModfileUpload
- modio::Rating
- modio::Response
- modio::Stats
- modio::Tag
- modio::User
- Debugging
- Constants
-
C Compatibility
- Methods
- Initialization, Process and Shutdown (C compatible)
- User Authentication (C compatible)
- Mods (C compatible)
- Modfiles (C compatible)
- Media (C compatible)
- Subscriptions (C compatible)
- Events (C compatible)
- Stats (C compatible)
- Tags (C compatible)
- Ratings (C compatible)
- Metadata KVP (C compatible)
- Dependencies (C compatible)
- Comments (C compatible)
- Reports (C compatible)
- Me (C compatible)
- Downloads (C compatible)
- Uploads (C compatible)
- Logs (C compatible)
- External Auth (C compatible)
- Configuration (C compatible)
- Creators
- Editors
- Schemas
- ModioAvatar
- ModioComment
- ModioDependency
- ModioDownload
- ModioError
- ModioFilehash
- ModioGame
- ModioGameTagOption
- ModioHeader
- ModioIcon
- ModioImage
- ModioInstalledMod
- ModioListNode
- ModioLogo
- ModioMedia
- ModioMetadataKVP
- ModioMod
- ModioModEvent
- ModioModfile
- ModioQueuedModDownload
- ModioQueuedModfileUpload
- ModioRating
- ModioResponse
- ModioStats
- ModioTag
- ModioUser
- Methods
- Building