libnx
v4.8.0
|
Wrapper for using the web LibraryApplets. More...
#include "../types.h"
#include "../services/applet.h"
#include "../services/caps.h"
#include "../services/acc.h"
#include "../kernel/mutex.h"
Go to the source code of this file.
Data Structures | |
struct | WebWifiPageArg |
Struct for the WebWifi applet input storage. More... | |
struct | WebWifiReturnValue |
Struct for the WebWifi applet output storage. More... | |
struct | WebWifiConfig |
Config for WebWifi. More... | |
struct | WebCommonTLVStorage |
TLV storage, starts with WebArgHeader followed by WebArgTLV entries. More... | |
struct | WebCommonReturnValue |
Common struct for the applet output storage, for non-TLV-storage. More... | |
struct | WebArgHeader |
Header struct at offset 0 in the web Arg storage (non-webWifi). More... | |
struct | WebArgTLV |
Web TLV used in the web Arg storage. More... | |
struct | WebCommonConfig |
Config struct for web applets, non-WebWifi. More... | |
struct | WebCommonReply |
Common container struct for applets' reply data, from the output storage. More... | |
struct | WebBootFooterButtonEntry |
Entry data for WebArgType_BootFooterButton. More... | |
struct | WebSessionStorageHandleQueue |
StorageHandleQueue. More... | |
struct | WebSession |
WebSession. More... | |
struct | WebSessionMessageHeader |
SessionMessageHeader. More... | |
Functions | |
void | webWifiCreate (WebWifiConfig *config, const char *conntest_url, const char *initial_url, Uuid uuid, u32 rev) |
Creates the config for WifiWebAuthApplet. More... | |
Result | webWifiShow (WebWifiConfig *config, WebWifiReturnValue *out) |
Launches WifiWebAuthApplet with the specified config and waits for it to exit. More... | |
Result | webPageCreate (WebCommonConfig *config, const char *url) |
Creates the config for WebApplet. More... | |
Result | webNewsCreate (WebCommonConfig *config, const char *url) |
Creates the config for WebApplet. More... | |
Result | webYouTubeVideoCreate (WebCommonConfig *config, const char *url) |
Creates the config for WebApplet. More... | |
Result | webOfflineCreate (WebCommonConfig *config, WebDocumentKind docKind, u64 id, const char *docPath) |
Creates the config for Offline-applet. More... | |
Result | webShareCreate (WebCommonConfig *config, WebShareStartPage page) |
Creates the config for ShareApplet. More... | |
Result | webLobbyCreate (WebCommonConfig *config) |
Creates the config for LobbyApplet. More... | |
Result | webConfigSetCallbackUrl (WebCommonConfig *config, const char *url) |
Sets the CallbackUrl. More... | |
Result | webConfigSetCallbackableUrl (WebCommonConfig *config, const char *url) |
Sets the CallbackableUrl. More... | |
Result | webConfigSetWhitelist (WebCommonConfig *config, const char *whitelist) |
Sets the whitelist. More... | |
Result | webConfigSetUid (WebCommonConfig *config, AccountUid uid) |
Sets the account uid. More... | |
Result | webConfigSetAlbumEntry (WebCommonConfig *config, const CapsAlbumEntry *entry) |
Sets the Share CapsAlbumEntry. More... | |
Result | webConfigSetScreenShot (WebCommonConfig *config, bool flag) |
Sets the ScreenShot flag, which controls whether screen-shot capture is allowed. More... | |
Result | webConfigSetEcClientCert (WebCommonConfig *config, bool flag) |
Sets the EcClientCert flag. More... | |
Result | webConfigSetPlayReport (WebCommonConfig *config, bool flag) |
Sets whether PlayReport is enabled. More... | |
Result | webConfigSetBootDisplayKind (WebCommonConfig *config, WebBootDisplayKind kind) |
Sets the BootDisplayKind. More... | |
Result | webConfigSetBackgroundKind (WebCommonConfig *config, WebBackgroundKind kind) |
Sets the BackgroundKind. More... | |
Result | webConfigSetFooter (WebCommonConfig *config, bool flag) |
Sets the whether the UI footer is enabled. More... | |
Result | webConfigSetPointer (WebCommonConfig *config, bool flag) |
Sets the whether the Pointer is enabled. More... | |
Result | webConfigSetLeftStickMode (WebCommonConfig *config, WebLeftStickMode mode) |
Sets the LeftStickMode. More... | |
Result | webConfigSetKeyRepeatFrame (WebCommonConfig *config, s32 inval0, s32 inval1) |
Sets the KeyRepeatFrame. More... | |
Result | webConfigSetDisplayUrlKind (WebCommonConfig *config, bool kind) |
Sets the DisplayUrlKind. More... | |
Result | webConfigSetBootAsMediaPlayer (WebCommonConfig *config, bool flag) |
Sets the BootAsMediaPlayer flag. More... | |
Result | webConfigSetShopJump (WebCommonConfig *config, bool flag) |
Sets the ShopJump flag. More... | |
Result | webConfigSetMediaPlayerUserGestureRestriction (WebCommonConfig *config, bool flag) |
Sets the MediaPlayerUserGestureRestriction flag. More... | |
Result | webConfigSetMediaAutoPlay (WebCommonConfig *config, bool flag) |
Sets whether MediaAutoPlay is enabled. More... | |
Result | webConfigSetLobbyParameter (WebCommonConfig *config, const char *str) |
Sets the LobbyParameter. More... | |
Result | webConfigSetApplicationAlbumEntry (WebCommonConfig *config, CapsApplicationAlbumEntry *entry) |
Sets the Share CapsApplicationAlbumEntry. More... | |
Result | webConfigSetJsExtension (WebCommonConfig *config, bool flag) |
Sets whether JsExtension is enabled. More... | |
Result | webConfigSetAdditionalCommentText (WebCommonConfig *config, const char *str) |
Sets the Share AdditionalCommentText. More... | |
Result | webConfigSetTouchEnabledOnContents (WebCommonConfig *config, bool flag) |
Sets the TouchEnabledOnContents flag. More... | |
Result | webConfigSetUserAgentAdditionalString (WebCommonConfig *config, const char *str) |
Sets the UserAgentAdditionalString. More... | |
Result | webConfigSetAdditionalMediaData (WebCommonConfig *config, const u8 *data, size_t size) |
Sets the Share AdditionalMediaData. More... | |
Result | webConfigSetMediaPlayerAutoClose (WebCommonConfig *config, bool flag) |
Sets the MediaPlayerAutoClose flag. More... | |
Result | webConfigSetPageCache (WebCommonConfig *config, bool flag) |
Sets whether PageCache is enabled. More... | |
Result | webConfigSetWebAudio (WebCommonConfig *config, bool flag) |
Sets whether WebAudio is enabled. More... | |
Result | webConfigSetFooterFixedKind (WebCommonConfig *config, WebFooterFixedKind kind) |
Sets the FooterFixedKind. More... | |
Result | webConfigSetPageFade (WebCommonConfig *config, bool flag) |
Sets the PageFade flag. More... | |
Result | webConfigSetMediaCreatorApplicationRatingAge (WebCommonConfig *config, const s8 *data) |
Sets the Share MediaCreatorApplicationRatingAge. More... | |
Result | webConfigSetBootLoadingIcon (WebCommonConfig *config, bool flag) |
Sets the BootLoadingIcon flag. More... | |
Result | webConfigSetPageScrollIndicator (WebCommonConfig *config, bool flag) |
Sets the PageScrollIndicator flag. More... | |
Result | webConfigSetMediaPlayerSpeedControl (WebCommonConfig *config, bool flag) |
Sets whether MediaPlayerSpeedControl is enabled. More... | |
Result | webConfigAddAlbumEntryAndMediaData (WebCommonConfig *config, const CapsAlbumEntry *entry, const u8 *data, size_t size) |
Adds a pair of Share CapsAlbumEntry + optionally AdditionalMediaData. More... | |
Result | webConfigSetBootFooterButtonVisible (WebCommonConfig *config, WebFooterButtonId button, bool visible) |
Sets whether the specified BootFooterButton is visible. More... | |
Result | webConfigSetOverrideWebAudioVolume (WebCommonConfig *config, float value) |
Sets OverrideWebAudioVolume. More... | |
Result | webConfigSetOverrideMediaAudioVolume (WebCommonConfig *config, float value) |
Sets OverrideMediaAudioVolume. More... | |
Result | webConfigSetBootMode (WebCommonConfig *config, WebSessionBootMode mode) |
Sets WebSessionBootMode. More... | |
Result | webConfigSetMediaPlayerUi (WebCommonConfig *config, bool flag) |
Sets whether MediaPlayerUi is enabled. More... | |
Result | webConfigSetTransferMemory (WebCommonConfig *config, bool flag) |
Sets whether TransferMemory is enabled. More... | |
Result | webConfigShow (WebCommonConfig *config, WebCommonReply *out) |
Launches the {web applet} with the specified config and waits for it to exit. More... | |
Result | webConfigRequestExit (WebCommonConfig *config) |
Request the applet to exit after webConfigShow was used, while the applet is still running. More... | |
Result | webReplyGetExitReason (WebCommonReply *reply, WebExitReason *exitReason) |
Gets the ExitReason from the specified reply. More... | |
Result | webReplyGetLastUrl (WebCommonReply *reply, char *outstr, size_t outstr_maxsize, size_t *out_size) |
Gets the LastUrl from the specified reply. More... | |
Result | webReplyGetSharePostResult (WebCommonReply *reply, u32 *sharePostResult) |
Gets the SharePostResult from the specified reply. More... | |
Result | webReplyGetPostServiceName (WebCommonReply *reply, char *outstr, size_t outstr_maxsize, size_t *out_size) |
Gets the PostServiceName from the specified reply. More... | |
Result | webReplyGetPostId (WebCommonReply *reply, char *outstr, size_t outstr_maxsize, size_t *out_size) |
Gets the PostId from the specified reply. More... | |
Result | webReplyGetMediaPlayerAutoClosedByCompletion (WebCommonReply *reply, bool *flag) |
Gets the MediaPlayerAutoClosedByCompletion flag from the specified reply. More... | |
void | webSessionCreate (WebSession *s, WebCommonConfig *config) |
Creates a WebSession object. More... | |
void | webSessionClose (WebSession *s) |
Closes a WebSession object. More... | |
Result | webSessionStart (WebSession *s, Event **out_event) |
Launches the applet for WebSession. More... | |
Result | webSessionWaitForExit (WebSession *s, WebCommonReply *out) |
Waits for the applet to exit. More... | |
Result | webSessionRequestExit (WebSession *s) |
Request the applet to exit. More... | |
Result | webSessionAppear (WebSession *s, bool *flag) |
Request the applet to Appear, this is only needed with WebSessionBootMode_AllForegroundInitiallyHidden. More... | |
Result | webSessionTrySendContentMessage (WebSession *s, const char *content, u32 size, bool *flag) |
TrySendContentMessage. More... | |
Result | webSessionTryReceiveContentMessage (WebSession *s, char *content, u64 size, u64 *out_size, bool *flag) |
TryReceiveContentMessage. More... | |
Wrapper for using the web LibraryApplets.
See also: https://switchbrew.org/wiki/Internet_Browser
enum WebArgType |
Types for WebArgTLV, input storage.
Enumerator | |
---|---|
WebArgType_Url | [1.0.0+] String, size 0xC00. Initial URL. |
WebArgType_CallbackUrl | [1.0.0+] String, size 0x400. |
WebArgType_CallbackableUrl | [1.0.0+] String, size 0x400. |
WebArgType_ApplicationId | [1.0.0+] Offline-applet, u64 ApplicationId |
WebArgType_DocumentPath | [1.0.0+] Offline-applet, string with size 0xC00. |
WebArgType_DocumentKind | [1.0.0+] Offline-applet, u32 enum \WebDocumentKind. |
WebArgType_SystemDataId | [1.0.0+] Offline-applet, u64 SystemDataId |
WebArgType_ShareStartPage | [1.0.0+] u32 enum \WebShareStartPage |
WebArgType_Whitelist | [1.0.0+] String, size 0x1000. |
WebArgType_NewsFlag | [1.0.0+] u8 bool |
WebArgType_UnknownC | [1.0.0+] u8 |
WebArgType_UnknownD | [1.0.0+] u8 |
WebArgType_Uid | [1.0.0+] AccountUid, controls which user-specific savedata to mount. |
WebArgType_AlbumEntry0 | [1.0.0+] Share-applet caps AlbumEntry, entry 0. |
WebArgType_ScreenShot | [1.0.0+] u8 bool |
WebArgType_EcClientCert | [1.0.0+] u8 bool |
WebArgType_Unknown12 | [1.0.0+] u8 |
WebArgType_PlayReport | [1.0.0+] u8 bool |
WebArgType_Unknown14 | [1.0.0+] u8 |
WebArgType_Unknown15 | [1.0.0+] u8 |
WebArgType_BootDisplayKind | [1.0.0+] u32 enum WebBootDisplayKind |
WebArgType_BackgroundKind | [1.0.0+] u32 enum WebBackgroundKind |
WebArgType_Footer | [1.0.0+] u8 bool |
WebArgType_Pointer | [1.0.0+] u8 bool |
WebArgType_LeftStickMode | [1.0.0+] u32 enum WebLeftStickMode |
WebArgType_KeyRepeatFrame0 | [1.0.0+] s32 KeyRepeatFrame, first param |
WebArgType_KeyRepeatFrame1 | [1.0.0+] s32 KeyRepeatFrame, second param |
WebArgType_BootAsMediaPlayerInverted | [1.0.0+] u8 bool. With News on [3.0.0+] this is set after BootAsMediaPlayer with the value inverted. |
WebArgType_DisplayUrlKind | [1.0.0+] u8 bool, DisplayUrlKind (value = (input_enumval==0x1)). |
WebArgType_BootAsMediaPlayer | [2.0.0+] u8 bool |
WebArgType_ShopJump | [2.0.0+] u8 bool |
WebArgType_MediaPlayerUserGestureRestriction | [2.0.0-5.1.0] u8 bool |
WebArgType_MediaAutoPlay | [6.0.0+] u8 bool |
WebArgType_LobbyParameter | [2.0.0+] String, size 0x100. |
WebArgType_ApplicationAlbumEntry | [3.0.0+] Share-applet caps ApplicationAlbumEntry |
WebArgType_JsExtension | [3.0.0+] u8 bool |
WebArgType_AdditionalCommentText | [4.0.0+] String, size 0x100. Share-applet AdditionalCommentText. |
WebArgType_TouchEnabledOnContents | [4.0.0+] u8 bool |
WebArgType_UserAgentAdditionalString | [4.0.0+] String, size 0x80. |
WebArgType_AdditionalMediaData0 | [4.0.0+] Share-applet 0x10-byte u8 array, AdditionalMediaData. Entry 0. If the user-input size is less than 0x10, the remaining data used for the TLV is cleared. |
WebArgType_MediaPlayerAutoClose | [4.0.0+] u8 bool |
WebArgType_PageCache | [4.0.0+] u8 bool |
WebArgType_WebAudio | [4.0.0+] u8 bool |
WebArgType_2F | [5.0.0+] u8 |
WebArgType_YouTubeVideoFlag | [5.0.0+] u8 bool Indicates that the built-in whitelist for YouTubeVideo should be used. |
WebArgType_FooterFixedKind | [5.0.0+] u32 enum WebFooterFixedKind |
WebArgType_PageFade | [5.0.0+] u8 bool |
WebArgType_MediaCreatorApplicationRatingAge | [5.0.0+] Share-applet 0x20-byte s8 array, MediaCreatorApplicationRatingAge. |
WebArgType_BootLoadingIcon | [5.0.0+] u8 bool |
WebArgType_PageScrollIndicator | [5.0.0+] u8 bool |
WebArgType_MediaPlayerSpeedControl | [6.0.0+] u8 bool |
WebArgType_AlbumEntry1 | [6.0.0+] Share-applet caps AlbumEntry, entry 1. |
WebArgType_AlbumEntry2 | [6.0.0+] Share-applet caps AlbumEntry, entry 2. |
WebArgType_AlbumEntry3 | [6.0.0+] Share-applet caps AlbumEntry, entry 3. |
WebArgType_AdditionalMediaData1 | [6.0.0+] Share-applet 0x10-byte u8 array, AdditionalMediaData. Entry 1. |
WebArgType_AdditionalMediaData2 | [6.0.0+] Share-applet 0x10-byte u8 array, AdditionalMediaData. Entry 2. |
WebArgType_AdditionalMediaData3 | [6.0.0+] Share-applet 0x10-byte u8 array, AdditionalMediaData. Entry 3. |
WebArgType_BootFooterButton | [6.0.0+] Array of WebBootFooterButtonEntry with 0x10 entries. |
WebArgType_OverrideWebAudioVolume | [6.0.0+] float |
WebArgType_OverrideMediaAudioVolume | [6.0.0+] float |
WebArgType_SessionBootMode | [7.0.0+] u32 enum WebSessionBootMode |
WebArgType_SessionFlag | [7.0.0+] u8 bool, enables using WebSession when set. |
WebArgType_MediaPlayerUi | [8.0.0+] u8 bool |
WebArgType_TransferMemory | [11.0.0+] u8 bool |
enum WebBackgroundKind |
Kind values for webConfigSetBackgroundKind. Controls the background color while displaying the loading screen during applet boot. Only used when WebBootDisplayKind is WebBootDisplayKind_Default. If the applet was not launched by an Application, the applet will only use WebBackgroundKind_Default.
Enumerator | |
---|---|
WebBackgroundKind_Default | Default. Same as WebBootDisplayKind_White/WebBootDisplayKind_Black, determined via WebArgType_BootAsMediaPlayer. |
WebBackgroundKind_Unknown1 | Unknown. Same as WebBootDisplayKind_Unknown3. |
WebBackgroundKind_Unknown2 | Unknown. Same as WebBootDisplayKind_Unknown4. Used by webLobbyCreate. |
enum WebBootDisplayKind |
Kind values for webConfigSetBootDisplayKind. Controls the background color while displaying the loading screen during applet boot. Also controls the BackgroundKind when value is non-zero.
Enumerator | |
---|---|
WebBootDisplayKind_Default | Default. BackgroundKind is controlled by WebBackgroundKind. |
WebBootDisplayKind_White | White background. Used by webOfflineCreate for docKind WebDocumentKind_ApplicationLegalInformation/WebDocumentKind_SystemDataPage. |
WebBootDisplayKind_Black | Black background. |
WebBootDisplayKind_Unknown3 | Unknown. Used by webShareCreate. |
WebBootDisplayKind_Unknown4 | Unknown. Used by webLobbyCreate. |
enum WebDocumentKind |
This controls the kind of content to mount with Offline-applet.
Enumerator | |
---|---|
WebDocumentKind_OfflineHtmlPage | Use the HtmlDocument NCA content from the application. |
WebDocumentKind_ApplicationLegalInformation | Use the LegalInformation NCA content from the application. |
WebDocumentKind_SystemDataPage | Use the Data NCA content from the specified SystemData, see also: https://switchbrew.org/wiki/Title_list#System_Data_Archives. |
enum WebExitReason |
ExitReason.
Enumerator | |
---|---|
WebExitReason_ExitButton | User pressed the X button to exit. |
WebExitReason_BackButton | User pressed the B button to exit, on the initial page. |
WebExitReason_Requested | The applet exited since webConfigRequestExit was used. |
WebExitReason_LastUrl | The applet exited due to LastUrl handling, see webReplyGetLastUrl. |
WebExitReason_ErrorDialog | The applet exited after displaying an error dialog. |
WebExitReason_UnknownE | Unknown. |
enum WebFooterButtonId |
Button values for webConfigSetBootFooterButtonVisible.
Enumerator | |
---|---|
WebFooterButtonId_None | None, for empty WebBootFooterButtonEntry. Invalid for webConfigSetBootFooterButtonVisible input. |
WebFooterButtonId_Type1 | Unknown button Id 1. |
WebFooterButtonId_Type2 | Unknown button Id 2. |
WebFooterButtonId_Type3 | Unknown button Id 3. |
WebFooterButtonId_Type4 | Unknown button Id 4. |
WebFooterButtonId_Type5 | Unknown button Id 5. |
WebFooterButtonId_Type6 | Unknown button Id 6. |
WebFooterButtonId_Max | Values starting with this are invalid. |
enum WebFooterFixedKind |
Kind values for webConfigSetFooterFixedKind. Controls UI footer display behaviour.
enum WebLeftStickMode |
Mode values for webConfigSetLeftStickMode. Controls the initial mode, this can be toggled by the user via the pressing the left-stick button. If the Pointer flag is set to false (webConfigSetPointer), only WebLeftStickMode_Cursor will be used and mode toggle by the user is disabled (input value ignored).
Enumerator | |
---|---|
WebLeftStickMode_Pointer | The user can directly control the pointer via the left-stick. |
WebLeftStickMode_Cursor | The user can only select elements on the page via the left-stick. |
enum WebReplyType |
Types for WebArgTLV, output storage.
enum WebSessionBootMode |
enum WebShareStartPage |
This controls the initial page for ShareApplet, used by webShareCreate.
Enumerator | |
---|---|
WebShareStartPage_Default | The default "/" page. |
WebShareStartPage_Settings | The "/settings/" page. |
Result webConfigAddAlbumEntryAndMediaData | ( | WebCommonConfig * | config, |
const CapsAlbumEntry * | entry, | ||
const u8 * | data, | ||
size_t | size | ||
) |
Adds a pair of Share CapsAlbumEntry + optionally AdditionalMediaData.
This can be used up to 4 times, for setting multiple pairs.
config | WebCommonConfig object. |
entry | CapsAlbumEntry |
data | Input data for AdditionalMediaData. Optional, can be NULL. |
size | Size of the input data, max size is 0x10. Optional, can be 0. |
Result webConfigRequestExit | ( | WebCommonConfig * | config | ) |
Request the applet to exit after webConfigShow was used, while the applet is still running.
This is for use from another thread.
config | WebCommonConfig object. |
Result webConfigSetAdditionalCommentText | ( | WebCommonConfig * | config, |
const char * | str | ||
) |
Sets the Share AdditionalCommentText.
config | WebCommonConfig object. |
str | String |
Result webConfigSetAdditionalMediaData | ( | WebCommonConfig * | config, |
const u8 * | data, | ||
size_t | size | ||
) |
Sets the Share AdditionalMediaData.
config | WebCommonConfig object. |
data | Input data |
size | Size of the input data, max size is 0x10. |
Result webConfigSetAlbumEntry | ( | WebCommonConfig * | config, |
const CapsAlbumEntry * | entry | ||
) |
Sets the Share CapsAlbumEntry.
config | WebCommonConfig object. |
entry | CapsAlbumEntry |
Result webConfigSetApplicationAlbumEntry | ( | WebCommonConfig * | config, |
CapsApplicationAlbumEntry * | entry | ||
) |
Sets the Share CapsApplicationAlbumEntry.
config | WebCommonConfig object. |
entry | CapsApplicationAlbumEntry, see also capssu.h. |
Result webConfigSetBackgroundKind | ( | WebCommonConfig * | config, |
WebBackgroundKind | kind | ||
) |
Sets the BackgroundKind.
config | WebCommonConfig object. |
kind | WebBackgroundKind |
Result webConfigSetBootAsMediaPlayer | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the BootAsMediaPlayer flag.
config | WebCommonConfig object. |
flag | Flag. true = BootAsMediaPlayer, false = BootAsWebPage. |
Result webConfigSetBootDisplayKind | ( | WebCommonConfig * | config, |
WebBootDisplayKind | kind | ||
) |
Sets the BootDisplayKind.
config | WebCommonConfig object. |
kind | WebBootDisplayKind |
Result webConfigSetBootFooterButtonVisible | ( | WebCommonConfig * | config, |
WebFooterButtonId | button, | ||
bool | visible | ||
) |
Sets whether the specified BootFooterButton is visible.
config | WebCommonConfig object. |
button | WebFooterButtonId |
visible | Visible flag. |
Result webConfigSetBootLoadingIcon | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the BootLoadingIcon flag.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetBootMode | ( | WebCommonConfig * | config, |
WebSessionBootMode | mode | ||
) |
Sets WebSessionBootMode.
config | WebCommonConfig object. |
mode | WebSessionBootMode |
Result webConfigSetCallbackableUrl | ( | WebCommonConfig * | config, |
const char * | url | ||
) |
Sets the CallbackableUrl.
config | WebCommonConfig object. |
url | URL |
Result webConfigSetCallbackUrl | ( | WebCommonConfig * | config, |
const char * | url | ||
) |
Sets the CallbackUrl.
See also webReplyGetLastUrl.
config | WebCommonConfig object. |
url | URL |
Result webConfigSetDisplayUrlKind | ( | WebCommonConfig * | config, |
bool | kind | ||
) |
Sets the DisplayUrlKind.
config | WebCommonConfig object. |
kind | Kind |
Result webConfigSetEcClientCert | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the EcClientCert flag.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetFooter | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the whether the UI footer is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetFooterFixedKind | ( | WebCommonConfig * | config, |
WebFooterFixedKind | kind | ||
) |
Sets the FooterFixedKind.
config | WebCommonConfig object. |
kind | WebFooterFixedKind |
Result webConfigSetJsExtension | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets whether JsExtension is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetKeyRepeatFrame | ( | WebCommonConfig * | config, |
s32 | inval0, | ||
s32 | inval1 | ||
) |
Sets the KeyRepeatFrame.
config | WebCommonConfig object. |
inval0 | First input param. |
inval1 | Second input param. |
Result webConfigSetLeftStickMode | ( | WebCommonConfig * | config, |
WebLeftStickMode | mode | ||
) |
Sets the LeftStickMode.
config | WebCommonConfig object. |
mode | Mode, different enums for Web and Offline. |
Result webConfigSetLobbyParameter | ( | WebCommonConfig * | config, |
const char * | str | ||
) |
Sets the LobbyParameter.
config | WebCommonConfig object. |
str | String |
Result webConfigSetMediaAutoPlay | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets whether MediaAutoPlay is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetMediaCreatorApplicationRatingAge | ( | WebCommonConfig * | config, |
const s8 * | data | ||
) |
Sets the Share MediaCreatorApplicationRatingAge.
config | WebCommonConfig object. |
data | 0x20-byte input data |
Result webConfigSetMediaPlayerAutoClose | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the MediaPlayerAutoClose flag.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetMediaPlayerSpeedControl | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets whether MediaPlayerSpeedControl is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetMediaPlayerUi | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets whether MediaPlayerUi is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetMediaPlayerUserGestureRestriction | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the MediaPlayerUserGestureRestriction flag.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetOverrideMediaAudioVolume | ( | WebCommonConfig * | config, |
float | value | ||
) |
Sets OverrideMediaAudioVolume.
config | WebCommonConfig object. |
value | Value |
Result webConfigSetOverrideWebAudioVolume | ( | WebCommonConfig * | config, |
float | value | ||
) |
Sets OverrideWebAudioVolume.
config | WebCommonConfig object. |
value | Value |
Result webConfigSetPageCache | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets whether PageCache is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetPageFade | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the PageFade flag.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetPageScrollIndicator | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the PageScrollIndicator flag.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetPlayReport | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets whether PlayReport is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetPointer | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the whether the Pointer is enabled.
See also WebLeftStickMode.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetScreenShot | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the ScreenShot flag, which controls whether screen-shot capture is allowed.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetShopJump | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the ShopJump flag.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetTouchEnabledOnContents | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets the TouchEnabledOnContents flag.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetTransferMemory | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets whether TransferMemory is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetUid | ( | WebCommonConfig * | config, |
AccountUid | uid | ||
) |
Sets the account uid.
Controls which user-specific savedata to mount.
config | WebCommonConfig object. |
uid | AccountUid |
Result webConfigSetUserAgentAdditionalString | ( | WebCommonConfig * | config, |
const char * | str | ||
) |
Sets the UserAgentAdditionalString.
" " followed by this string are appended to the normal User-Agent string.
config | WebCommonConfig object. |
str | String |
Result webConfigSetWebAudio | ( | WebCommonConfig * | config, |
bool | flag | ||
) |
Sets whether WebAudio is enabled.
config | WebCommonConfig object. |
flag | Flag |
Result webConfigSetWhitelist | ( | WebCommonConfig * | config, |
const char * | whitelist | ||
) |
Sets the whitelist.
config | WebCommonConfig object. |
whitelist | Whitelist string, each line is a regex for each whitelisted URL. |
Result webConfigShow | ( | WebCommonConfig * | config, |
WebCommonReply * | out | ||
) |
Launches the {web applet} with the specified config and waits for it to exit.
config | WebCommonConfig object. |
out | Optional output applet reply data, can be NULL. |
Result webLobbyCreate | ( | WebCommonConfig * | config | ) |
Creates the config for LobbyApplet.
This applet is for "Nintendo Switch Online Lounge".
config | WebCommonConfig object. |
Result webNewsCreate | ( | WebCommonConfig * | config, |
const char * | url | ||
) |
Creates the config for WebApplet.
This is based on webPageCreate, for News. Hence other functions referencing webPageCreate also apply to this.
config | WebCommonConfig object. |
url | Initial URL navigated to by the applet. |
Result webOfflineCreate | ( | WebCommonConfig * | config, |
WebDocumentKind | docKind, | ||
u64 | id, | ||
const char * | docPath | ||
) |
Creates the config for Offline-applet.
This applet uses data loaded from content.
config | WebCommonConfig object. |
docKind | WebDocumentKind |
id | Id to load the content from. With docKind = WebDocumentKind_OfflineHtmlPage, id=0 should be used to specify the user-process application (non-zero is ignored with this docKind). |
docPath | Initial document path in RomFS, without the leading '/'. For WebDocumentKind_OfflineHtmlPage, this is relative to "html-document/" in RomFS. For the other docKind values, this is relative to "/" in RomFS. This path must contain ".htdocs/". |
Result webPageCreate | ( | WebCommonConfig * | config, |
const char * | url | ||
) |
Creates the config for WebApplet.
This applet uses an URL whitelist loaded from the user-process host Application, which is only loaded when running under an Application.
config | WebCommonConfig object. |
url | Initial URL navigated to by the applet. |
Result webReplyGetExitReason | ( | WebCommonReply * | reply, |
WebExitReason * | exitReason | ||
) |
Gets the ExitReason from the specified reply.
reply | WebCommonReply object. |
exitReason | Output WebExitReason |
Result webReplyGetLastUrl | ( | WebCommonReply * | reply, |
char * | outstr, | ||
size_t | outstr_maxsize, | ||
size_t * | out_size | ||
) |
Gets the LastUrl from the specified reply.
When the applet loads a page where the beginning of the URL matches the URL from webConfigSetCallbackUrl, the applet will exit and set LastUrl to that URL (exit doesn't occur when webConfigSetCallbackableUrl was used).
reply | WebCommonReply object. |
outstr | Output string buffer. If NULL, the string is not loaded. |
outstr_maxsize | Size of the buffer, including NUL-terminator. If outstr is set, this size must be >1. The size used for the actual string-copy is this size-1, to make sure the output is NUL-terminated (the entire buffer is cleared first). |
out_size | Output string length including NUL-terminator, for the original input string in the reply loaded from a separate size field. |
Result webReplyGetMediaPlayerAutoClosedByCompletion | ( | WebCommonReply * | reply, |
bool * | flag | ||
) |
Gets the MediaPlayerAutoClosedByCompletion flag from the specified reply.
reply | WebCommonReply object. |
flag | Output flag |
Result webReplyGetPostId | ( | WebCommonReply * | reply, |
char * | outstr, | ||
size_t | outstr_maxsize, | ||
size_t * | out_size | ||
) |
Gets the PostId from the specified reply.
reply | WebCommonReply object. |
outstr | Output string buffer. If NULL, the string is not loaded. |
outstr_maxsize | Size of the buffer, including NUL-terminator. If outstr is set, this size must be >1. The size used for the actual string-copy is this size-1, to make sure the output is NUL-terminated (the entire buffer is cleared first). |
out_size | Output string length including NUL-terminator, for the original input string in the reply loaded from a separate size field. |
Result webReplyGetPostServiceName | ( | WebCommonReply * | reply, |
char * | outstr, | ||
size_t | outstr_maxsize, | ||
size_t * | out_size | ||
) |
Gets the PostServiceName from the specified reply.
reply | WebCommonReply object. |
outstr | Output string buffer. If NULL, the string is not loaded. |
outstr_maxsize | Size of the buffer, including NUL-terminator. If outstr is set, this size must be >1. The size used for the actual string-copy is this size-1, to make sure the output is NUL-terminated (the entire buffer is cleared first). |
out_size | Output string length including NUL-terminator, for the original input string in the reply loaded from a separate size field. |
Result webReplyGetSharePostResult | ( | WebCommonReply * | reply, |
u32 * | sharePostResult | ||
) |
Gets the SharePostResult from the specified reply.
reply | WebCommonReply object. |
sharePostResult | Output sharePostResult |
Result webSessionAppear | ( | WebSession * | s, |
bool * | flag | ||
) |
Request the applet to Appear, this is only needed with WebSessionBootMode_AllForegroundInitiallyHidden.
s | WebSession | |
[out] | flag | Whether the message was sent successfully. |
void webSessionClose | ( | WebSession * | s | ) |
Closes a WebSession object.
s | WebSession |
void webSessionCreate | ( | WebSession * | s, |
WebCommonConfig * | config | ||
) |
Creates a WebSession object.
s | WebSession |
config | WebCommonConfig object. |
Result webSessionRequestExit | ( | WebSession * | s | ) |
Request the applet to exit.
s | WebSession |
Result webSessionStart | ( | WebSession * | s, |
Event ** | out_event | ||
) |
Launches the applet for WebSession.
s | WebSession | |
[out] | out_event | Output Event with autoclear=false, from appletHolderGetExitEvent. Optional, can be NULL. |
Result webSessionTryReceiveContentMessage | ( | WebSession * | s, |
char * | content, | ||
u64 | size, | ||
u64 * | out_size, | ||
bool * | flag | ||
) |
TryReceiveContentMessage.
s | WebSession | |
[out] | content | Output content string, always NUL-terminated. |
[in] | size | Max size of content. |
[out] | out_size | Original content size, prior to being clamped to the specified size param. |
[out] | flag | Whether the message was received successfully. |
Result webSessionTrySendContentMessage | ( | WebSession * | s, |
const char * | content, | ||
u32 | size, | ||
bool * | flag | ||
) |
TrySendContentMessage.
s | WebSession | |
[in] | content | Input content NUL-terminated string. |
[in] | size | Size of content. |
[out] | flag | Whether the message was sent successfully. |
Result webSessionWaitForExit | ( | WebSession * | s, |
WebCommonReply * | out | ||
) |
Waits for the applet to exit.
s | WebSession |
out | Optional output applet reply data, can be NULL. |
Result webShareCreate | ( | WebCommonConfig * | config, |
WebShareStartPage | page | ||
) |
Creates the config for ShareApplet.
This applet is for social media posting/settings.
config | WebCommonConfig object. |
page | WebShareStartPage |
void webWifiCreate | ( | WebWifiConfig * | config, |
const char * | conntest_url, | ||
const char * | initial_url, | ||
Uuid | uuid, | ||
u32 | rev | ||
) |
Creates the config for WifiWebAuthApplet.
This is the captive portal applet.
config | WebWifiConfig object. |
conntest_url | URL used for the connection-test requests. When empty/NULL the applet will test the connection with nifm and throw an error on failure. |
initial_url | Initial URL navigated to by the applet. |
uuid | NIFM Network UUID, for nifm cmd SetNetworkProfileId. Value 0 can be used. Only used by the applet when conntest_url is set. |
rev | Input value for nifm cmd SetRequirementByRevision. Value 0 can be used. Only used by the applet when conntest_url is set. |
Result webWifiShow | ( | WebWifiConfig * | config, |
WebWifiReturnValue * | out | ||
) |
Launches WifiWebAuthApplet with the specified config and waits for it to exit.
config | WebWifiConfig object. |
out | Optional output applet reply data, can be NULL. |
Result webYouTubeVideoCreate | ( | WebCommonConfig * | config, |
const char * | url | ||
) |
Creates the config for WebApplet.
This is based on webPageCreate, for YouTubeVideo. Hence other functions referencing webPageCreate also apply to this. This uses a whitelist which essentially only allows youtube embed/ URLs (without mounting content from the host Application).
config | WebCommonConfig object. |
url | Initial URL navigated to by the applet. |