mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Added type Uuid and use it where needed. Renamed the c field in NcmPlaceHolderId to uuid. Removed PACKED from WebWifiPageArg/WebWifiReturnValue.
This commit is contained in:
parent
afe030f08b
commit
c4bc7b24a0
@ -47,15 +47,15 @@ typedef struct {
|
||||
u32 unk_x0; ///< Official sw sets this to 0 with appletStorageWrite, separately from the rest of the config struct.
|
||||
char conntest_url[0x100]; ///< Connection-test URL.
|
||||
char initial_url[0x400]; ///< Initial URL navigated to by the applet.
|
||||
u128 uuid; ///< NIFM Network UUID. Only used by the applet when conntest_url is set.
|
||||
Uuid uuid; ///< NIFM Network UUID. Only used by the applet when conntest_url is set.
|
||||
u32 rev; ///< Input value for nifm cmd SetRequirementByRevision. Only used by the applet when conntest_url is set.
|
||||
} PACKED WebWifiPageArg;
|
||||
} WebWifiPageArg;
|
||||
|
||||
/// Struct for the WebWifi applet output storage.
|
||||
typedef struct {
|
||||
u32 unk_x0; ///< Unknown.
|
||||
Result res; ///< Result
|
||||
} PACKED WebWifiReturnValue;
|
||||
} WebWifiReturnValue;
|
||||
|
||||
/// Config for WebWifi.
|
||||
typedef struct {
|
||||
@ -243,7 +243,7 @@ typedef enum {
|
||||
* @param uuid NIFM Network UUID, for nifm cmd SetNetworkProfileId. Value 0 can be used. Only used by the applet when conntest_url is set.
|
||||
* @param rev Input value for nifm cmd SetRequirementByRevision. Value 0 can be used. Only used by the applet when conntest_url is set.
|
||||
*/
|
||||
void webWifiCreate(WebWifiConfig* config, const char* conntest_url, const char* initial_url, u128 uuid, u32 rev);
|
||||
void webWifiCreate(WebWifiConfig* config, const char* conntest_url, const char* initial_url, Uuid uuid, u32 rev);
|
||||
|
||||
/**
|
||||
* @brief Launches WifiWebAuthApplet with the specified config and waits for it to exit.
|
||||
|
@ -1347,7 +1347,7 @@ void appletNotifyRunning(bool *out);
|
||||
* @note Only available with AppletType_*Application on [2.0.0+].
|
||||
* @param[out] out Output PseudoDeviceId.
|
||||
*/
|
||||
Result appletGetPseudoDeviceId(u128 *out);
|
||||
Result appletGetPseudoDeviceId(Uuid *out);
|
||||
|
||||
/// Set media playback state.
|
||||
/// If state is set to true, screen dimming and auto sleep is disabled.
|
||||
|
@ -65,7 +65,7 @@ typedef struct {
|
||||
|
||||
/// PlaceHolderId
|
||||
typedef struct {
|
||||
alignas(8) u8 c[0x10]; ///< Id
|
||||
alignas(8) Uuid uuid; ///< UUID
|
||||
} NcmPlaceHolderId;
|
||||
|
||||
/// ContentMetaKey
|
||||
|
@ -48,6 +48,8 @@ typedef u32 Result; ///< Function error code result type.
|
||||
typedef void (*ThreadFunc)(void *); ///< Thread entrypoint function.
|
||||
typedef void (*VoidFn)(void); ///< Function without arguments nor return value.
|
||||
|
||||
typedef struct { u8 uuid[0x10]; } Uuid; ///< Unique identifier.
|
||||
|
||||
/// Creates a bitmask from a bit number.
|
||||
#ifndef BIT
|
||||
#define BIT(n) (1U<<(n))
|
||||
|
@ -52,7 +52,7 @@ static Result _webShow(AppletHolder *holder, AppletId id, u32 version, void* arg
|
||||
return rc;
|
||||
}
|
||||
|
||||
void webWifiCreate(WebWifiConfig* config, const char* conntest_url, const char* initial_url, u128 uuid, u32 rev) {
|
||||
void webWifiCreate(WebWifiConfig* config, const char* conntest_url, const char* initial_url, Uuid uuid, u32 rev) {
|
||||
memset(config, 0, sizeof(*config));
|
||||
|
||||
if (conntest_url) strncpy(config->arg.conntest_url, conntest_url, sizeof(config->arg.conntest_url)-1);
|
||||
|
@ -2005,7 +2005,7 @@ void appletNotifyRunning(bool *out) {
|
||||
if (R_FAILED(rc)) fatalThrow(MAKERESULT(Module_Libnx, LibnxError_BadAppletNotifyRunning));
|
||||
}
|
||||
|
||||
Result appletGetPseudoDeviceId(u128 *out) {
|
||||
Result appletGetPseudoDeviceId(Uuid *out) {
|
||||
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
if (hosversionBefore(2,0,0))
|
||||
|
Loading…
Reference in New Issue
Block a user