libnx  v4.2.2
switch.h
Go to the documentation of this file.
1 /**
2  * @file switch.h
3  * @brief Central Switch header. Includes all others.
4  * @copyright libnx Authors
5  */
6 #pragma once
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include "switch/types.h"
13 #include "switch/result.h"
14 
15 #include "switch/nro.h"
16 #include "switch/nacp.h"
17 
18 #include "switch/arm/tls.h"
19 #include "switch/arm/cache.h"
20 #include "switch/arm/counter.h"
21 
22 #include "switch/kernel/svc.h"
23 #include "switch/kernel/wait.h"
24 #include "switch/kernel/tmem.h"
25 #include "switch/kernel/shmem.h"
26 #include "switch/kernel/mutex.h"
27 #include "switch/kernel/event.h"
28 #include "switch/kernel/levent.h"
29 #include "switch/kernel/uevent.h"
30 #include "switch/kernel/utimer.h"
31 #include "switch/kernel/rwlock.h"
32 #include "switch/kernel/condvar.h"
33 #include "switch/kernel/thread.h"
35 #include "switch/kernel/virtmem.h"
36 #include "switch/kernel/detect.h"
37 #include "switch/kernel/random.h"
38 #include "switch/kernel/jit.h"
39 #include "switch/kernel/barrier.h"
40 
41 #include "switch/sf/hipc.h"
42 #include "switch/sf/cmif.h"
43 #include "switch/sf/service.h"
44 #include "switch/sf/sessionmgr.h"
45 #include "switch/sf/tipc.h"
46 
47 #include "switch/services/sm.h"
48 #include "switch/services/smm.h"
49 #include "switch/services/fs.h"
50 #include "switch/services/fsldr.h"
51 #include "switch/services/fspr.h"
52 #include "switch/services/acc.h"
53 #include "switch/services/apm.h"
54 #include "switch/services/applet.h"
55 #include "switch/services/async.h"
56 #include "switch/services/audctl.h"
57 #include "switch/services/audin.h"
58 #include "switch/services/audout.h"
59 #include "switch/services/audrec.h"
60 #include "switch/services/audren.h"
61 #include "switch/services/auddev.h"
62 #include "switch/services/hwopus.h"
63 #include "switch/services/csrng.h"
64 #include "switch/services/lbl.h"
65 #include "switch/services/i2c.h"
66 #include "switch/services/gpio.h"
67 #include "switch/services/uart.h"
68 #include "switch/services/bpc.h"
69 #include "switch/services/pcv.h"
70 #include "switch/services/clkrst.h"
71 #include "switch/services/fan.h"
72 #include "switch/services/pgl.h"
73 #include "switch/services/psm.h"
74 #include "switch/services/spsm.h"
75 //#include "switch/services/bsd.h" Use <sys/socket.h> instead
76 //#include "switch/services/sfdnsres.h" Use <netdb.h> instead
77 //#include "switch/services/htcs.h"
78 #include "switch/services/fatal.h"
79 #include "switch/services/time.h"
80 #include "switch/services/usb.h"
81 #include "switch/services/usbds.h"
82 #include "switch/services/usbhs.h"
83 #include "switch/services/hid.h"
84 #include "switch/services/hidbus.h"
85 #include "switch/services/hiddbg.h"
86 #include "switch/services/hidsys.h"
87 #include "switch/services/irs.h"
88 #include "switch/services/pl.h"
89 #include "switch/services/vi.h"
90 #include "switch/services/nv.h"
91 #include "switch/services/nifm.h"
92 #include "switch/services/nim.h"
93 #include "switch/services/ns.h"
94 #include "switch/services/ldr.h"
95 #include "switch/services/ro.h"
96 #include "switch/services/tc.h"
97 #include "switch/services/ts.h"
98 #include "switch/services/pm.h"
99 #include "switch/services/set.h"
100 #include "switch/services/ssl.h"
101 #include "switch/services/lr.h"
102 #include "switch/services/bt.h"
103 #include "switch/services/btdrv.h"
104 #include "switch/services/btm.h"
105 #include "switch/services/btmu.h"
106 #include "switch/services/btmsys.h"
107 #include "switch/services/spl.h"
108 #include "switch/services/ncm.h"
109 #include "switch/services/psc.h"
110 #include "switch/services/caps.h"
111 #include "switch/services/capsa.h"
112 #include "switch/services/capsc.h"
113 #include "switch/services/capsdc.h"
114 #include "switch/services/capsu.h"
115 #include "switch/services/capssc.h"
116 #include "switch/services/capssu.h"
117 #include "switch/services/capmtp.h"
118 #include "switch/services/nfc.h"
119 #include "switch/services/wlaninf.h"
120 #include "switch/services/pctl.h"
121 #include "switch/services/pdm.h"
122 #include "switch/services/grc.h"
123 #include "switch/services/friends.h"
124 #include "switch/services/notif.h"
125 #include "switch/services/mii.h"
126 #include "switch/services/miiimg.h"
127 #include "switch/services/ldn.h"
128 #include "switch/services/lp2p.h"
129 #include "switch/services/news.h"
130 #include "switch/services/ins.h"
131 #include "switch/services/ectx.h"
132 #include "switch/services/avm.h"
133 #include "switch/services/mm.h"
134 
135 #include "switch/display/binder.h"
136 #include "switch/display/parcel.h"
137 #include "switch/display/buffer_producer.h"
140 
141 #include "switch/nvidia/ioctl.h"
142 #include "switch/nvidia/graphic_buffer.h"
143 #include "switch/nvidia/fence.h"
144 #include "switch/nvidia/map.h"
145 #include "switch/nvidia/address_space.h"
146 #include "switch/nvidia/channel.h"
147 #include "switch/nvidia/gpu.h"
148 #include "switch/nvidia/gpu_channel.h"
149 
150 #include "switch/audio/driver.h"
151 
153 #include "switch/applets/album_la.h"
155 #include "switch/applets/hid_la.h"
156 #include "switch/applets/mii_la.h"
157 #include "switch/applets/nfp_la.h"
158 #include "switch/applets/nifm_la.h"
159 #include "switch/applets/pctlauth.h"
160 #include "switch/applets/psel.h"
161 #include "switch/applets/error.h"
162 #include "switch/applets/swkbd.h"
163 #include "switch/applets/web.h"
164 
165 #include "switch/runtime/env.h"
167 #include "switch/runtime/diag.h"
168 #include "switch/runtime/nxlink.h"
169 #include "switch/runtime/resolver.h"
170 #include "switch/runtime/pad.h"
171 #include "switch/runtime/ringcon.h"
172 #include "switch/runtime/btdev.h"
173 
174 #include "switch/runtime/util/utf.h"
175 
180 #include "switch/runtime/devices/socket.h"
181 
182 #include "switch/crypto/aes.h"
183 #include "switch/crypto/aes_cbc.h"
184 #include "switch/crypto/aes_ctr.h"
185 #include "switch/crypto/aes_xts.h"
186 #include "switch/crypto/cmac.h"
187 
188 #include "switch/crypto/sha256.h"
189 #include "switch/crypto/sha1.h"
190 #include "switch/crypto/hmac.h"
191 
192 #include "switch/crypto/crc.h"
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
hid_la.h
Wrapper for using the controller LibraryApplet.
grc.h
GRC Game Recording (grc:*) service IPC wrapper.
ins.h
INS services IPC wrapper.
capssc.h
Screenshot control (caps:sc) service IPC wrapper.
fs_dev.h
FS driver, using devoptab.
pad.h
Simple wrapper for the HID Npad API.
audrec.h
Audio Recorder IPC wrapper.
hid.h
Human input device (hid) service IPC wrapper.
smm.h
ServiceManager-IManager (sm:m) service IPC wrapper.
ro.h
Relocatable Objects (ro) service IPC wrapper.
audout.h
Audio output service.
fs.h
Filesystem (fsp-srv) service IPC wrapper. Normally applications should just use standard stdio not FS...
btmu.h
btm:u (btm user) service IPC wrapper.
types.h
Various system types.
sha1.h
Hardware accelerated SHA1 implementation.
driver.h
Audio driver (audren wrapper).
hosversion.h
Horizon OS (HOS) version detection utilities.
service.h
Service wrapper object.
shmem.h
Shared memory object handling.
lp2p.h
lp2p service IPC wrapper, for local-WLAN communications with accessories. See also: https://switchbre...
diag.h
Debugging and diagnostics utilities.
async.h
NS/NIM IAsync* IPC wrapper.
web.h
Wrapper for using the web LibraryApplets. See also: https://switchbrew.org/wiki/Internet_Browser.
audren.h
Audio renderer service.
fan.h
Fan service IPC wrapper.
lr.h
Location Resolver (lr) service IPC wrapper.
crc.h
Hardware accelerated CRC32 implementation.
avm.h
AVM services IPC wrapper. Only available on [6.0.0+].
env.h
Homebrew environment definitions and utilities.
aes_cbc.h
Hardware accelerated AES-CBC implementation.
utf.h
UTF conversion functions.
capsc.h
Album Control (caps:c) service IPC wrapper.
console.h
Framebuffer text console.
swkbd.h
Wrapper for using the swkbd (software keyboard) LibraryApplet.
hidsys.h
hid:sys service IPC wrapper.
nfp_la.h
Wrapper for using the cabinet (amiibo) LibraryApplet.
fspr.h
FilesystemProxy-ProgramRegistry (fsp-pr) service IPC wrapper.
tipc.h
Tiny IPC protocol.
usbhs.h
USB (usb:hs) devices service IPC wrapper.
semaphore.h
Thread synchronization based on Mutex.
condvar.h
Condition variable synchronization primitive.
hidbus.h
hidbus service IPC wrapper, for using external devices attached to HID controllers....
tc.h
Temperature control (tc) service IPC wrapper.
pgl.h
PGL service IPC wrapper.
caps.h
Common caps (caps:*) service IPC header.
random.h
OS-seeded pseudo-random number generation support (ChaCha algorithm).
wait.h
User mode synchronization primitive waiting operations.
bpc.h
Board power control (bpc) service IPC wrapper.
btdrv.h
Bluetooth driver (btdrv) service IPC wrapper.
irs.h
HID IR sensor (irs) service IPC wrapper.
uart.h
UART service IPC wrapper.
capsa.h
Album Accessor (caps:a) service IPC wrapper.
ns.h
NS services IPC wrapper.
ectx.h
[11.0.0+] Error Context services IPC wrapper.
audctl.h
Audio Control IPC wrapper.
aes.h
Hardware accelerated AES-ECB implementation.
hwopus.h
Hardware Opus audio service IPC wrapper.
jit.h
Just-in-time compilation support.
detect.h
Kernel capability detection.
libapplet.h
LibraryApplet wrapper.
nim.h
Network Install Manager (nim) service IPC wrapper.
psm.h
PSM service IPC wrapper.
btm.h
btm service IPC wrapper.
nv.h
NVIDIA low level driver (nvdrv*) service IPC wrapper.
time.h
Time services IPC wrapper.
auddev.h
IAudioDevice IPC wrapper.
capssu.h
Application screenshot saving (caps:su) service IPC wrapper.
sm.h
Service manager (sm) IPC wrapper.
error.h
Wrapper for using the error LibraryApplet.
romfs_dev.h
RomFS driver.
mii.h
Mii services (mii:*) IPC wrapper.
capmtp.h
capmtp service IPC wrapper.
mii_la.h
Wrapper for using the MiiEdit LibraryApplet.
usb.h
Common USB (usb:*) service IPC header.
tmem.h
Transfer memory handling.
event.h
Kernel-mode event synchronization primitive.
pctlauth.h
Wrapper for using the Parental Controls authentication LibraryApplet. This applet is used by qlaunch.
native_window.h
Native window (NWindow) wrapper object, used for presenting images to the display (or other sinks).
news.h
News service IPC wrapper.
vi.h
Display (vi:*) service IPC wrapper.
aes_ctr.h
Hardware accelerated AES-CTR implementation.
capsdc.h
Jpeg Decoder (caps:dc) service IPC wrapper. Only available on [4.0.0+].
applet.h
Applet (applet) service IPC wrapper.
csrng.h
Cryptographically-Secure Random Number Generation (csrng) service IPC wrapper.
nacp.h
Control.nacp structure / related code for nacp.
lbl.h
LBL service IPC wrapper.
pdm.h
PDM (pdm:*) service IPC wrapper.
fsldr.h
FilesystemProxy-ForLoader (fsp-ldr) service IPC wrapper.
sha256.h
Hardware accelerated SHA256 implementation.
ldr.h
Loader (ldr*) service IPC wrapper.
result.h
Switch result code tools.
barrier.h
Multi-threading Barrier.
nifm_la.h
Wrapper for using the nifm LibraryApplet (the launched applet varies).
svc.h
Wrappers for kernel syscalls.
clkrst.h
Clkrst service IPC wrapper.
bt.h
Bluetooth user (bt) service IPC wrapper.
rwlock.h
Read/write lock synchronization primitive.
acc.h
Account (acc:*) service IPC wrapper.
hiddbg.h
hid:dbg service IPC wrapper.
cache.h
AArch64 cache operations.
apm.h
Performance management (apm) service IPC wrapper. This is used internally by applet with __nx_applet_...
cmif.h
Common Message Interface Framework protocol.
friends_la.h
Wrapper for using the MyPage (friends) LibraryApplet.
virtmem.h
Virtual memory mapping utilities.
mutex.h
Mutex synchronization primitive.
nifm.h
Network interface service IPC wrapper.
btdev.h
Wrapper around the bt/btmu services for using bluetooth BLE.
pl.h
pl:u service IPC wrapper.
gpio.h
GPIO service IPC wrapper.
psc.h
PSC service IPC wrapper.
pm.h
Process management (pm*) service IPC wrapper.
levent.h
Light event synchronization primitive [4.0.0+].
uevent.h
User-mode event synchronization primitive.
tls.h
AArch64 thread local storage.
aes_xts.h
Hardware accelerated AES-XTS implementation.
pctl.h
Parental Controls service IPC wrapper.
notif.h
Alarm notification (notif:*) service IPC wrapper.
ringcon.h
Wrapper for using the Ring-Con attached to a Joy-Con, with hidbus. See also: https://switchbrew....
hipc.h
Horizon Inter-Process Communication protocol.
spl.h
Security Processor Liaison (spl*) service IPC wrapper.
btmsys.h
btm:sys (btm system) service IPC wrapper.
framebuffer.h
Framebuffer wrapper object, providing support for software rendered graphics.
counter.h
AArch64 system counter-timer.
cmac.h
Hardware accelerated AES-CMAC implementation.
usb_comms.h
USB comms.
capsu.h
Application Album (caps:u) service IPC wrapper. This is only usable with AlbumFiles associated with t...
miiimg.h
Mii image (miiimg) service IPC wrapper.
thread.h
Multi-threading support.
i2c.h
I2C service IPC wrapper.
wlaninf.h
WLAN InfraManager service IPC wrapper.
set.h
Settings services IPC wrapper.
album_la.h
Wrapper for using the Album LibraryApplet.
ncm.h
Content Manager (ncm) service IPC wrapper.
audin.h
Audio input service.
utimer.h
User-mode timer synchronization primitive.
ldn.h
LDN (local network communications) IPC wrapper. See also: https://switchbrew.org/wiki/LDN_services.
nro.h
NRO headers.
usbds.h
USB (usb:ds) service IPC wrapper.
ts.h
Temperature measurement (ts) service IPC wrapper.
pcv.h
PCV service IPC wrapper.
hmac.h
Hardware accelerated HMAC-SHA(1, 256) implementation.
nfc.h
Nintendo Figurine (amiibo) Platform (nfp:user) service IPC wrapper.
psel.h
Wrapper for using the playerSelect (user selection) LibraryApplet.
spsm.h
SPSM service IPC wrapper.
fatal.h
Fatal error (fatal:u) service IPC wrapper.