Skip to content
modkitv0.2

services.h

#include <modkit/services.h>41 functions · 10 structs · 12 enums · 25 typedefs · 10 macros

Optional platform game services: identity, achievements, stats, leaderboards, and cloud save.

Enabled with MODKIT_ENABLE_SERVICES. Disabled builds keep the same API and answer MK_ERROR_UNSUPPORTED. One backend runs at a time Steamworks, Game Center, Play Games, a developer-hosted web service, an in-memory fake for tests, or none chosen at runtime, because whether a platform service is actually reachable is not something a build can decide. Query mk_services_capabilities() instead of testing platform macros. The platforms genuinely differ: Game Center has no stats, Steam has no leaderboard time windows and no cloud conflict API, and Play Games stats are write-only. Every entry point whose capability bit is clear returns MK_ERROR_UNSUPPORTED. Asynchronous calls return immediately with an mk_async_request_t and complete on the main thread from mk_services_poll(), which mk_app_run() drives.

Functions

mk_services_achievement_atfunction

mk_result mk_services_achievement_at(uint32_t index, mk_services_achievement *out_info)

Perform the services achievement at operation.

ParameterTypeDescription
indexuint32_tZero-based index.
out_infomk_services_achievement *Receives the info.

Returns MK_SUCCESS or an error result.

mk_services_achievement_clearfunction

mk_result mk_services_achievement_clear(const char *id)

Clear the services achievement.

ParameterTypeDescription
idconst char *Value for ID.

Returns MK_SUCCESS or an error result.

mk_services_achievement_countfunction

uint32_t mk_services_achievement_count(void)

Perform the services achievement count operation.

Returns The resulting value.

mk_services_achievement_getfunction

mk_result mk_services_achievement_get(const char *id, mk_services_achievement *out_info)

Get state from the services achievement.

ParameterTypeDescription
idconst char *Value for ID.
out_infomk_services_achievement *Receives the info.

Returns MK_SUCCESS or an error result.

mk_services_achievement_initfunction

void mk_services_achievement_init(mk_services_achievement *info)

Initialize the services achievement.

ParameterTypeDescription
infomk_services_achievement *Value for info.

mk_services_achievement_set_progressfunction

mk_result mk_services_achievement_set_progress(const char *id, uint32_t steps, uint32_t total_steps)

Set progress on the services achievement.

ParameterTypeDescription
idconst char *Value for ID.
stepsuint32_tValue for steps.
total_stepsuint32_tValue for total steps.

Returns MK_SUCCESS or an error result.

mk_services_achievement_unlockfunction

mk_result mk_services_achievement_unlock(const char *id)

Perform the services achievement unlock operation.

ParameterTypeDescription
idconst char *Value for ID.

Returns MK_SUCCESS or an error result.

mk_services_authfunction

mk_services_auth_state mk_services_auth(void)

Perform the services auth operation.

Returns The resulting value.

mk_services_auth_ticket_asyncfunction

mk_result mk_services_auth_ticket_async(const char *audience, mk_services_ticket_fn callback, void *user_data, mk_async_request_t *out_request)

Fetch a token your server can verify with the platform.

Maps to Steam GetAuthTicketForWebApi, Game Center identity verification, and Play requestServerSideAccess.

ParameterTypeDescription
audienceconst char *Value for audience.
callbackmk_services_ticket_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_backend_kindfunction

mk_services_backend mk_services_backend_kind(void)

The backend that actually started.

Returns The resulting value.

mk_services_backend_namefunction

const char * mk_services_backend_name(void)

Stable lowercase name: "steam", "game_center", "play_games", "web", "fake", "none", "disabled".

Returns A borrowed pointer, or NULL when unavailable.

mk_services_capabilitiesfunction

mk_services_capabilities_t mk_services_capabilities(void)

Perform the services capabilities operation.

Returns The resulting handle or value.

mk_services_cloud_delete_asyncfunction

mk_result mk_services_cloud_delete_async(const char *slot, mk_services_done_fn callback, void *user_data, mk_async_request_t *out_request)

Perform the services cloud delete async operation.

ParameterTypeDescription
slotconst char *Value for slot.
callbackmk_services_done_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_cloud_list_asyncfunction

mk_result mk_services_cloud_list_async(mk_services_list_fn callback, void *user_data, mk_async_request_t *out_request)

Perform the services cloud list async operation.

ParameterTypeDescription
callbackmk_services_list_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_cloud_quotafunction

mk_result mk_services_cloud_quota(uint64_t *out_used, uint64_t *out_total)

Perform the services cloud quota operation.

ParameterTypeDescription
out_useduint64_t *Receives the used.
out_totaluint64_t *Receives the total.

Returns MK_SUCCESS or an error result.

mk_services_cloud_read_asyncfunction

mk_result mk_services_cloud_read_async(const char *slot, mk_services_read_fn callback, void *user_data, mk_async_request_t *out_request)

Read async for the services cloud.

ParameterTypeDescription
slotconst char *Value for slot.
callbackmk_services_read_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_cloud_write_asyncfunction

mk_result mk_services_cloud_write_async(const char *slot, const mk_services_write_desc *desc, mk_services_done_fn callback, void *user_data, mk_async_request_t *out_request)

Write async for the services cloud.

ParameterTypeDescription
slotconst char *Value for slot.
descconst mk_services_write_desc *Configuration descriptor.
callbackmk_services_done_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_desc_initfunction

void mk_services_desc_init(mk_services_desc *desc)

Initialize the services desc.

ParameterTypeDescription
descmk_services_desc *Configuration descriptor.

mk_services_flush_asyncfunction

mk_result mk_services_flush_async(mk_services_done_fn callback, void *user_data, mk_async_request_t *out_request)

Commit locally-set achievements and stats to the platform.

Every backend needs a commit step (Steam StoreStats, Game Center report), so it is explicit rather than hidden behind each setter.

ParameterTypeDescription
callbackmk_services_done_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_initfunction

mk_result mk_services_init(const mk_services_desc *desc)

Select and start a backend.

With MK_SERVICES_BACKEND_AUTO a failed probe falls back rather than failing, so a machine without Steam still initializes with the none backend. An explicit backend that cannot start returns MK_ERROR_UNSUPPORTED.

ParameterTypeDescription
descconst mk_services_desc *Configuration descriptor.

Returns MK_SUCCESS or an error result.

mk_services_is_initializedfunction

bool mk_services_is_initialized(void)

Test whether the services is initialized.

Returns True when the condition holds.

mk_services_last_errorfunction

mk_services_error mk_services_last_error(void)

The most recent immediate (non-callback) failure.

Returns The resulting value.

mk_services_leaderboard_scores_asyncfunction

mk_result mk_services_leaderboard_scores_async(const mk_services_score_query *query, mk_services_scores_fn callback, void *user_data, mk_async_request_t *out_request)

Perform the services leaderboard scores async operation.

ParameterTypeDescription
queryconst mk_services_score_query *Value for query.
callbackmk_services_scores_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_leaderboard_submit_asyncfunction

mk_result mk_services_leaderboard_submit_async(const mk_services_submit_desc *desc, mk_services_submit_fn callback, void *user_data, mk_async_request_t *out_request)

Submit async for the services leaderboard.

ParameterTypeDescription
descconst mk_services_submit_desc *Configuration descriptor.
callbackmk_services_submit_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_playerfunction

mk_result mk_services_player(mk_services_player_info *out_info)

Perform the services player operation.

ParameterTypeDescription
out_infomk_services_player_info *Receives the info.

Returns MK_SUCCESS or an error result.

mk_services_player_info_initfunction

void mk_services_player_info_init(mk_services_player_info *info)

Initialize the services player info.

ParameterTypeDescription
infomk_services_player_info *Value for info.

mk_services_pollfunction

uint32_t mk_services_poll(void)

Deliver completed requests.

Called for you from the frame loop; call it directly in headless tools and tests. Returns the number of callbacks run.

Returns The resulting value.

mk_services_refresh_asyncfunction

mk_result mk_services_refresh_async(mk_services_done_fn callback, void *user_data, mk_async_request_t *out_request)

Re-read achievements and stats from the platform.

ParameterTypeDescription
callbackmk_services_done_fnCompletion callback.
user_datavoid *Caller-provided context.
out_requestmk_async_request_t *Receives the request.

Returns MK_SUCCESS or an error result.

mk_services_score_query_initfunction

void mk_services_score_query_init(mk_services_score_query *query)

Query init for the services score.

ParameterTypeDescription
querymk_services_score_query *Value for query.

mk_services_show_uifunction

mk_result mk_services_show_ui(mk_services_ui view, const char *id)

Show a platform overlay.

ParameterTypeDescription
viewmk_services_uiValue for view.
idconst char *Value for ID.

Returns MK_SUCCESS or an error result.

mk_services_shutdownfunction

void mk_services_shutdown(void)

Perform the services shutdown operation.

mk_services_sign_infunction

mk_result mk_services_sign_in(void)

Ensure the player is signed in, presenting platform UI if the backend has it.

Returns MK_SUCCESS or an error result.

mk_services_sign_in_silentfunction

mk_result mk_services_sign_in_silent(void)

Sign in only if it needs no UI.

Returns MK_SUCCESS or an error result.

mk_services_sign_outfunction

mk_result mk_services_sign_out(void)

Perform the services sign out operation.

Returns MK_SUCCESS or an error result.

mk_services_stat_add_intfunction

mk_result mk_services_stat_add_int(const char *id, int64_t delta)

Add int for the services stat.

ParameterTypeDescription
idconst char *Value for ID.
deltaint64_tValue for delta.

Returns MK_SUCCESS or an error result.

mk_services_stat_get_floatfunction

mk_result mk_services_stat_get_float(const char *id, double *out_value)

Get float from the services stat.

ParameterTypeDescription
idconst char *Value for ID.
out_valuedouble *Receives the value.

Returns MK_SUCCESS or an error result.

mk_services_stat_get_intfunction

mk_result mk_services_stat_get_int(const char *id, int64_t *out_value)

Get int from the services stat.

ParameterTypeDescription
idconst char *Value for ID.
out_valueint64_t *Receives the value.

Returns MK_SUCCESS or an error result.

mk_services_stat_set_floatfunction

mk_result mk_services_stat_set_float(const char *id, double value)

Set float on the services stat.

ParameterTypeDescription
idconst char *Value for ID.
valuedoubleValue to use.

Returns MK_SUCCESS or an error result.

mk_services_stat_set_intfunction

mk_result mk_services_stat_set_int(const char *id, int64_t value)

Set int on the services stat.

ParameterTypeDescription
idconst char *Value for ID.
valueint64_tValue to use.

Returns MK_SUCCESS or an error result.

mk_services_submit_desc_initfunction

void mk_services_submit_desc_init(mk_services_submit_desc *desc)

Submit desc init for the services.

ParameterTypeDescription
descmk_services_submit_desc *Configuration descriptor.

mk_services_write_desc_initfunction

void mk_services_write_desc_init(mk_services_write_desc *desc)

Write desc init for the services.

ParameterTypeDescription
descmk_services_write_desc *Configuration descriptor.

Structs

mk_services_achievementstruct

Data for services achievement.

FieldTypeDescription
struct_sizeuint32_tThe struct size.
struct_versionuint32_tThe struct version.
availableuint32_tThe available.
idcharLogical id.
namecharThe name.
descriptioncharThe description.
unlockedboolThe unlocked.
hiddenboolThe hidden.
stepsuint32_tCurrent progress; zero when unsupported.
total_stepsuint32_tZero for a binary achievement.
unlock_timeuint64_tUnix seconds, or zero if unknown.

mk_services_descstruct

Data for services desc.

FieldTypeDescription
struct_sizeuint32_tThe struct size.
struct_versionuint32_tThe struct version.
preferred_backendmk_services_backendAUTO probes; anything else must succeed.
steam_app_iduint32_tZero uses steam_appid.txt or the launch env.
auto_sign_inboolAttempt a silent sign-in during init.
web_base_urlconst char *Endpoint for the web backend.
achievement_idsconst mk_services_id_map *The achievement IDs.
achievement_id_countuint32_tThe achievement ID count.
stat_idsconst mk_services_id_map *The stat IDs.
stat_id_countuint32_tThe stat ID count.
leaderboard_idsconst mk_services_id_map *The leaderboard IDs.
leaderboard_id_countuint32_tThe leaderboard ID count.
auth_changedmk_services_auth_changed_fnThe auth changed.
auth_changed_user_datavoid *The auth changed user data.
fake_latency_msuint32_tFAKE backend only; delays completions to expose ordering bugs.

mk_services_errorstruct

Detail carried alongside mk_result on every completion.

FieldTypeDescription
codemk_services_error_codeThe code.
platform_codeint32_tBackend error value, or zero if unavailable.
messagecharNull-terminated diagnostic text.

mk_services_id_mapstruct

Maps an id the game uses to the id a store uses.

The same achievement is "ACH_WIN" on Steam, "grp.win" on Game Center, and an opaque string on Play. Supply the mapping once at init and use the logical id everywhere else. An id with no mapping is passed through unchanged.

FieldTypeDescription
logical_idconst char *The logical ID.
platform_idconst char *The platform ID.

mk_services_player_infostruct

Data for services player info.

FieldTypeDescription
struct_sizeuint32_tThe struct size.
struct_versionuint32_tThe struct version.
availableuint32_tmk_services_player_field bits.
idcharThe ID.
display_namecharThe display name.
countrycharThe country.
languagecharThe language.

mk_services_scorestruct

Data for services score.

FieldTypeDescription
struct_sizeuint32_tThe struct size.
struct_versionuint32_tThe struct version.
availableuint32_tThe available.
player_idcharThe player ID.
display_namecharThe display name.
scoreint64_tThe score.
rankuint32_tOne-based; zero if unknown.
timestampuint64_tUnix seconds.

mk_services_score_querystruct

Data for services score query.

FieldTypeDescription
struct_sizeuint32_tThe struct size.
struct_versionuint32_tThe struct version.
idconst char *Logical leaderboard id.
scopemk_services_score_scopeThe scope.
windowmk_services_score_windowThe window.
start_rankuint32_tOne-based; ignored for AROUND_PLAYER.
max_entriesuint32_tBackends clamp this.

mk_services_slotstruct

Data for services slot.

FieldTypeDescription
struct_sizeuint32_tThe struct size.
struct_versionuint32_tThe struct version.
availableuint32_tThe available.
namecharThe name.
sizeuint64_tThe size.
modified_timeuint64_tUnix seconds.
descriptioncharPlay Snapshots only.
has_conflictboolThe has conflict.

mk_services_submit_descstruct

Data for services submit desc.

FieldTypeDescription
struct_sizeuint32_tThe struct size.
struct_versionuint32_tThe struct version.
idconst char *The ID.
scoreint64_tThe score.
windowmk_services_score_windowThe window.
policymk_services_submit_policyThe policy.

mk_services_write_descstruct

Data for services write desc.

FieldTypeDescription
struct_sizeuint32_tThe struct size.
struct_versionuint32_tThe struct version.
dataconst void *The data.
sizesize_tThe size.
descriptionconst char *Play Snapshots only; ignored elsewhere.
expected_modified_timeuint64_tThe modified_time the app last saw for this slot, or zero to write unconditionally.

Enums

mk_services_achievement_fieldenum

Which mk_services_achievement fields the backend filled in.

ValueDescription
MK_SERVICES_ACHIEVEMENT_NAMESelects name.
MK_SERVICES_ACHIEVEMENT_DESCRIPTIONSelects description.
MK_SERVICES_ACHIEVEMENT_HIDDENSelects hidden.
MK_SERVICES_ACHIEVEMENT_PROGRESSSelects progress.
MK_SERVICES_ACHIEVEMENT_UNLOCK_TIMESelects unlock time.

mk_services_auth_stateenum

Sign-in state.

Mirrors the audio capture-permission shape.

ValueDescription
MK_SERVICES_AUTH_UNKNOWNSelects unknown.
MK_SERVICES_AUTH_PENDINGSelects pending.
MK_SERVICES_AUTH_SIGNED_INSelects signed in.
MK_SERVICES_AUTH_SIGNED_OUTSelects signed out.
MK_SERVICES_AUTH_UNAVAILABLESelects unavailable.

mk_services_backendenum

Which implementation is (or should be) running.

ValueDescription
MK_SERVICES_BACKEND_AUTOProbe the platform, then web, then none.
MK_SERVICES_BACKEND_NONEEverything reports unsupported.
MK_SERVICES_BACKEND_FAKEIn-memory; for tests and offline development.
MK_SERVICES_BACKEND_STEAMSelects steam.
MK_SERVICES_BACKEND_GAME_CENTERSelects game center.
MK_SERVICES_BACKEND_PLAY_GAMESSelects play games.
MK_SERVICES_BACKEND_WEBSelects web.

mk_services_capabilityenum

Runtime capability bits for the selected backend.

ValueDescription
MK_SERVICES_CAP_IDENTITYLocal player is readable.
MK_SERVICES_CAP_SIGN_IN_INTERACTIVESign-in may present platform UI.
MK_SERVICES_CAP_SIGN_OUTSelects sign out.
MK_SERVICES_CAP_AUTH_TICKETServer-verifiable identity token.
MK_SERVICES_CAP_ACHIEVEMENTSSelects achievements.
MK_SERVICES_CAP_ACHIEVEMENT_PROGRESSSelects achievement progress.
MK_SERVICES_CAP_ACHIEVEMENT_METADATANames/descriptions readable.
MK_SERVICES_CAP_ACHIEVEMENT_RESETSelects achievement reset.
MK_SERVICES_CAP_STATSSelects stats.
MK_SERVICES_CAP_STATS_FLOATSelects stats float.
MK_SERVICES_CAP_STATS_READClear on write-only backends.
MK_SERVICES_CAP_LEADERBOARDSSelects leaderboards.
MK_SERVICES_CAP_LEADERBOARD_FRIENDSSelects leaderboard friends.
MK_SERVICES_CAP_LEADERBOARD_WINDOWSDaily/weekly scopes.
MK_SERVICES_CAP_CLOUD_SAVESelects cloud save.
MK_SERVICES_CAP_CLOUD_LISTSelects cloud list.
MK_SERVICES_CAP_CLOUD_CONFLICTSClear on Steam.
MK_SERVICES_CAP_CLOUD_QUOTASelects cloud quota.
MK_SERVICES_CAP_NATIVE_UIOverlay / Game Center UI.

mk_services_error_codeenum

Portable category for the most recent services failure.

ValueDescription
MK_SERVICES_ERROR_NONESelects none.
MK_SERVICES_ERROR_UNSUPPORTEDCapability bit is clear on this backend.
MK_SERVICES_ERROR_NOT_SIGNED_INSelects not signed in.
MK_SERVICES_ERROR_SIGN_IN_CANCELLEDSelects sign in cancelled.
MK_SERVICES_ERROR_NETWORKSelects network.
MK_SERVICES_ERROR_TIMEOUTSelects timeout.
MK_SERVICES_ERROR_RATE_LIMITEDSelects rate limited.
MK_SERVICES_ERROR_NOT_FOUNDUnknown achievement, leaderboard, or slot.
MK_SERVICES_ERROR_CONFLICTCloud slot diverged; resolve it.
MK_SERVICES_ERROR_QUOTASelects quota.
MK_SERVICES_ERROR_PERMISSIONUnderage, parental, or privacy restriction.
MK_SERVICES_ERROR_BACKEND_MISSINGPlatform library or service unavailable.
MK_SERVICES_ERROR_PLATFORMNative failure; see platform_code.

mk_services_player_fieldenum

Which mk_services_player_info fields the backend filled in.

ValueDescription
MK_SERVICES_PLAYER_IDSelects ID.
MK_SERVICES_PLAYER_DISPLAY_NAMESelects display name.
MK_SERVICES_PLAYER_COUNTRYSelects country.
MK_SERVICES_PLAYER_LANGUAGESelects language.

mk_services_score_fieldenum

Which mk_services_score fields the backend filled in.

ValueDescription
MK_SERVICES_SCORE_PLAYER_IDSelects player ID.
MK_SERVICES_SCORE_DISPLAY_NAMESelects display name.
MK_SERVICES_SCORE_RANKSelects rank.
MK_SERVICES_SCORE_TIMESTAMPSelects timestamp.

mk_services_score_scopeenum

Values for services score scope.

ValueDescription
MK_SERVICES_SCOPE_GLOBALSelects global.
MK_SERVICES_SCOPE_FRIENDSSelects friends.
MK_SERVICES_SCOPE_AROUND_PLAYERSelects around player.

mk_services_score_windowenum

Values for services score window.

ValueDescription
MK_SERVICES_WINDOW_ALL_TIMESelects all time.
MK_SERVICES_WINDOW_WEEKLYSelects weekly.
MK_SERVICES_WINDOW_DAILYSelects daily.

mk_services_slot_fieldenum

Which mk_services_slot fields the backend filled in.

ValueDescription
MK_SERVICES_SLOT_SIZESelects size.
MK_SERVICES_SLOT_MODIFIED_TIMESelects modified time.
MK_SERVICES_SLOT_DESCRIPTIONSelects description.
MK_SERVICES_SLOT_CONFLICTSelects conflict.

mk_services_submit_policyenum

Values for services submit policy.

ValueDescription
MK_SERVICES_SUBMIT_KEEP_BESTSelects keep best.
MK_SERVICES_SUBMIT_OVERWRITESelects overwrite.

mk_services_uienum

Values for services UI.

ValueDescription
MK_SERVICES_UI_ACHIEVEMENTSSelects achievements.
MK_SERVICES_UI_LEADERBOARDSelects leaderboard.
MK_SERVICES_UI_PLAYER_PROFILESelects player profile.
MK_SERVICES_UI_FRIENDSSelects friends.

Typedefs

mk_services_achievementtypedef

typedef struct mk_services_achievement mk_services_achievement

Data for services achievement.

mk_services_auth_changed_fntypedef

typedef void(*) mk_services_auth_changed_fn(mk_services_auth_state state, void *user_data)

Sign-in state changed.

Invoked from mk_services_poll(). Not optional polish: Game Center can sign the player out mid-session.

mk_services_auth_statetypedef

typedef enum mk_services_auth_state mk_services_auth_state

Sign-in state.

Mirrors the audio capture-permission shape.

mk_services_backendtypedef

typedef enum mk_services_backend mk_services_backend

Which implementation is (or should be) running.

mk_services_capabilities_ttypedef

typedef uint64_t mk_services_capabilities_t

Bitmask returned by mk_services_capabilities().

mk_services_desctypedef

typedef struct mk_services_desc mk_services_desc

Data for services desc.

mk_services_done_fntypedef

typedef void(*) mk_services_done_fn(mk_async_request_t request, mk_result result, const mk_services_error *error, void *user_data)

Completion with no payload.

error is NULL on success.

mk_services_errortypedef

typedef struct mk_services_error mk_services_error

Detail carried alongside mk_result on every completion.

mk_services_error_codetypedef

typedef enum mk_services_error_code mk_services_error_code

Portable category for the most recent services failure.

mk_services_id_maptypedef

typedef struct mk_services_id_map mk_services_id_map

Maps an id the game uses to the id a store uses.

The same achievement is "ACH_WIN" on Steam, "grp.win" on Game Center, and an opaque string on Play. Supply the mapping once at init and use the logical id everywhere else. An id with no mapping is passed through unchanged.

mk_services_list_fntypedef

typedef void(*) mk_services_list_fn(mk_async_request_t request, mk_result result, const mk_services_error *error, const mk_services_slot *slots, uint32_t count, void *user_data)

Slot listing.

slots is valid for the duration of the callback only.

mk_services_player_infotypedef

typedef struct mk_services_player_info mk_services_player_info

Data for services player info.

mk_services_read_fntypedef

typedef void(*) mk_services_read_fn(mk_async_request_t request, mk_result result, const mk_services_error *error, const char *slot, const void *data, size_t size, void *user_data)

Slot contents.

data is valid for the duration of the callback only.

mk_services_scoretypedef

typedef struct mk_services_score mk_services_score

Data for services score.

mk_services_score_querytypedef

typedef struct mk_services_score_query mk_services_score_query

Data for services score query.

mk_services_score_scopetypedef

typedef enum mk_services_score_scope mk_services_score_scope

Values for services score scope.

mk_services_score_windowtypedef

typedef enum mk_services_score_window mk_services_score_window

Values for services score window.

mk_services_scores_fntypedef

typedef void(*) mk_services_scores_fn(mk_async_request_t request, mk_result result, const mk_services_error *error, const mk_services_score *scores, uint32_t count, void *user_data)

Score list.

scores is valid for the duration of the callback only.

mk_services_slottypedef

typedef struct mk_services_slot mk_services_slot

Data for services slot.

mk_services_submit_desctypedef

typedef struct mk_services_submit_desc mk_services_submit_desc

Data for services submit desc.

mk_services_submit_fntypedef

typedef void(*) mk_services_submit_fn(mk_async_request_t request, mk_result result, const mk_services_error *error, const mk_services_score *score, bool changed, void *user_data)

Submit result.

changed is false when a keep-best policy rejected the score.

mk_services_submit_policytypedef

typedef enum mk_services_submit_policy mk_services_submit_policy

Values for services submit policy.

mk_services_ticket_fntypedef

typedef void(*) mk_services_ticket_fn(mk_async_request_t request, mk_result result, const mk_services_error *error, const void *ticket, size_t size, void *user_data)

Completion for mk_services_auth_ticket_async().

Bytes are valid for the call only.

mk_services_uitypedef

typedef enum mk_services_ui mk_services_ui

Values for services UI.

mk_services_write_desctypedef

typedef struct mk_services_write_desc mk_services_write_desc

Data for services write desc.

Macros

MK_SERVICES_ACHIEVEMENT_VERSIONdefine

MK_SERVICES_ACHIEVEMENT_VERSION

ABI or format version for services achievement.

MK_SERVICES_DESC_VERSIONdefine

MK_SERVICES_DESC_VERSION

ABI or format version for services desc.

MK_SERVICES_MAX_IDdefine

MK_SERVICES_MAX_ID

Maximum supported services ID.

MK_SERVICES_MAX_NAMEdefine

MK_SERVICES_MAX_NAME

Maximum supported services name.

MK_SERVICES_PLAYER_INFO_VERSIONdefine

MK_SERVICES_PLAYER_INFO_VERSION

ABI or format version for services player info.

MK_SERVICES_QUERY_VERSIONdefine

MK_SERVICES_QUERY_VERSION

ABI or format version for services query.

MK_SERVICES_SCORE_VERSIONdefine

MK_SERVICES_SCORE_VERSION

ABI or format version for services score.

MK_SERVICES_SLOT_VERSIONdefine

MK_SERVICES_SLOT_VERSION

ABI or format version for services slot.

MK_SERVICES_SUBMIT_VERSIONdefine

MK_SERVICES_SUBMIT_VERSION

ABI or format version for services submit.

MK_SERVICES_WRITE_VERSIONdefine

MK_SERVICES_WRITE_VERSION

ABI or format version for services write.