libnx  v4.8.0
avm.h
Go to the documentation of this file.
1 /**
2  * @file avm.h
3  * @brief AVM services IPC wrapper. Only available on [6.0.0+].
4  * @author Behemoth
5  * @copyright libnx Authors
6  */
7 #pragma once
8 
9 #include "../types.h"
10 #include "../sf/service.h"
11 
12 typedef struct {
13  u64 application_id;
14  u32 version;
15  u32 required;
17 
18 typedef struct {
19  u64 application_id;
20  u32 version;
22 
23 typedef struct {
24  Service s;
26 
27 Result avmInitialize(void);
28 void avmExit(void);
29 
30 Service *avmGetServiceSession(void);
31 
32 Result avmGetHighestAvailableVersion(u64 id_1, u64 id_2, u32 *version);
33 Result avmGetHighestRequiredVersion(u64 id_1, u64 id_2, u32 *version);
34 Result avmGetVersionListEntry(u64 application_id, AvmVersionListEntry *entry);
35 Result avmGetVersionListImporter(AvmVersionListImporter *out);
36 Result avmGetLaunchRequiredVersion(u64 application_id, u32 *version);
37 Result avmUpgradeLaunchRequiredVersion(u64 application_id, u32 version);
38 Result avmPushLaunchVersion(u64 application_id, u32 version);
39 Result avmListVersionList(AvmVersionListEntry *buffer, size_t count, u32 *out);
40 Result avmListRequiredVersion(AvmRequiredVersionEntry *buffer, size_t count, u32 *out);
41 
42 void avmVersionListImporterClose(AvmVersionListImporter *srv);
43 Result avmVersionListImporterSetTimestamp(AvmVersionListImporter *srv, u64 timestamp);
44 Result avmVersionListImporterSetData(AvmVersionListImporter *srv, const AvmVersionListEntry *entries, u32 count);
45 Result avmVersionListImporterFlush(AvmVersionListImporter *srv);
Definition: avm.h:18
Definition: avm.h:12
Definition: avm.h:23
Service object structure.
Definition: service.h:14
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
u32 Result
Function error code result type.
Definition: types.h:44
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21