libctru  v1.6.0
ac.h
Go to the documentation of this file.
1 /**
2  * @file ac.h
3  * @brief AC service.
4  */
5 #pragma once
6 
7 /// Wifi security modes.
8 typedef enum {
9  AC_OPEN = 0, ///< Open authentication.
10  AC_WEP_40BIT = 1, ///< WEP 40-bit authentication.
11  AC_WEP_104BIT = 2, ///< WEP 104-bit authentication.
12  AC_WEP_128BIT = 3, ///< WEP 128-bit authentication.
13  AC_WPA_TKIP = 4, ///< WPA TKIP authentication.
14  AC_WPA2_TKIP = 5, ///< WPA2 TKIP authentication.
15  AC_WPA_AES = 6, ///< WPA AES authentication.
16  AC_WPA2_AES = 7, ///< WPA2 AES authentication.
18 
19 /// Initializes AC.
20 Result acInit(void);
21 
22 /// Exits AC.
23 void acExit(void);
24 
25 /// Waits for the system to connect to the internet.
27 
28 /**
29  * @brief Gets the connected Wifi status.
30  * @param out Pointer to output the connected Wifi status to. (0 = not connected, 1 = O3DS Internet, 2 = N3DS Internet)
31  */
33 
34 /**
35  * @brief Gets the connected Wifi status.
36  * @param out Pointer to output the connected Wifi status to. (1 = not connected, 3 = connected)
37  */
39 
40 /**
41  * @brief Gets the connected Wifi security mode.
42  * @param mode Pointer to output the connected Wifi security mode to. (0 = Open Authentication, 1 = WEP 40-bit, 2 = WEP 104-bit, 3 = WEP 128-bit, 4 = WPA TKIP, 5 = WPA2 TKIP, 6 = WPA AES, 7 = WPA2 AES)
43  */
45 
46 /**
47  * @brief Gets the connected Wifi SSID.
48  * @param SSID Pointer to output the connected Wifi SSID to.
49  */
50 Result ACU_GetSSID(char *SSID);
51 
52 /**
53  * @brief Gets the connected Wifi SSID length.
54  * @param out Pointer to output the connected Wifi SSID length to.
55  */
57 
58 /**
59  * @brief Determines whether proxy is enabled for the connected network.
60  * @param enable Pointer to output the proxy status to.
61  */
62 Result ACU_GetProxyEnable(bool *enable);
63 
64 /**
65  * @brief Gets the connected network's proxy port.
66  * @param out Pointer to output the proxy port to.
67  */
69 
70 /**
71  * @brief Gets the connected network's proxy username.
72  * @param username Pointer to output the proxy username to. (The size must be at least 0x20-bytes)
73  */
74 Result ACU_GetProxyUserName(char *username);
75 
76 /**
77  * @brief Gets the connected network's proxy password.
78  * @param password Pointer to output the proxy password to. (The size must be at least 0x20-bytes)
79  */
80 Result ACU_GetProxyPassword(char *password);
81 
82 /**
83  * @brief Gets the last error to occur during a connection.
84  * @param errorCode Pointer to output the error code to.
85  */
87 
88 /**
89  * @brief Gets the last detailed error to occur during a connection.
90  * @param errorCode Pointer to output the error code to.
91  */
void errorCode(errorConf *err, int error)
Sets error code to display.
s32 Result
Function result.
Definition: types.h:42
Result acInit(void)
Initializes AC.
Result ACU_GetProxyPassword(char *password)
Gets the connected network's proxy password.
Open authentication.
Definition: ac.h:9
void acExit(void)
Exits AC.
Result ACU_GetProxyEnable(bool *enable)
Determines whether proxy is enabled for the connected network.
Result ACU_GetSSIDLength(u32 *out)
Gets the connected Wifi SSID length.
Result ACU_GetProxyUserName(char *username)
Gets the connected network's proxy username.
WPA AES authentication.
Definition: ac.h:15
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
Result ACU_GetStatus(u32 *out)
Gets the connected Wifi status.
Result acWaitInternetConnection(void)
Waits for the system to connect to the internet.
WPA2 AES authentication.
Definition: ac.h:16
Result ACU_GetProxyPort(u32 *out)
Gets the connected network's proxy port.
WEP 104-bit authentication.
Definition: ac.h:11
Result ACU_GetSSID(char *SSID)
Gets the connected Wifi SSID.
WEP 40-bit authentication.
Definition: ac.h:10
Result ACU_GetWifiStatus(u32 *out)
Gets the connected Wifi status.
Result ACU_GetSecurityMode(acSecurityMode *mode)
Gets the connected Wifi security mode.
Result ACU_GetLastErrorCode(u32 *errorCode)
Gets the last error to occur during a connection.
WEP 128-bit authentication.
Definition: ac.h:12
Result ACU_GetLastDetailErrorCode(u32 *errorCode)
Gets the last detailed error to occur during a connection.
acSecurityMode
Wifi security modes.
Definition: ac.h:8
WPA2 TKIP authentication.
Definition: ac.h:14
WPA TKIP authentication.
Definition: ac.h:13