libnx  v4.2.2
Data Structures | Enumerations | Functions
web.h File Reference

Wrapper for using the web LibraryApplets. See also: https://switchbrew.org/wiki/Internet_Browser. 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...
 

Enumerations

enum  WebShimKind {
  WebShimKind_Shop = 1,
  WebShimKind_Login = 2,
  WebShimKind_Offline = 3,
  WebShimKind_Share = 4,
  WebShimKind_Web = 5,
  WebShimKind_Wifi = 6,
  WebShimKind_Lobby = 7
}
 This indicates the type of web-applet.
 
enum  WebExitReason {
  WebExitReason_ExitButton = 0x0,
  WebExitReason_BackButton = 0x1,
  WebExitReason_Requested = 0x2,
  WebExitReason_LastUrl = 0x3,
  WebExitReason_ErrorDialog = 0x7,
  WebExitReason_UnknownE = 0xE
}
 ExitReason. More...
 
enum  WebFooterButtonId {
  WebFooterButtonId_None = 0,
  WebFooterButtonId_Type1 = 1,
  WebFooterButtonId_Type2 = 2,
  WebFooterButtonId_Type3 = 3,
  WebFooterButtonId_Type4 = 4,
  WebFooterButtonId_Type5 = 5,
  WebFooterButtonId_Type6 = 6,
  WebFooterButtonId_Max
}
 Button values for webConfigSetBootFooterButtonVisible. More...
 
enum  WebSessionBootMode {
  WebSessionBootMode_AllForeground = 0,
  WebSessionBootMode_AllForegroundInitiallyHidden = 1
}
 WebSessionBootMode. More...
 
enum  WebSessionSendMessageKind {
  WebSessionSendMessageKind_BrowserEngineContent = 0x0,
  WebSessionSendMessageKind_SystemMessageAppear = 0x100,
  WebSessionSendMessageKind_Ack = 0x1000
}
 WebSessionSendMessageKind. More...
 
enum  WebSessionReceiveMessageKind {
  WebSessionReceiveMessageKind_BrowserEngineContent = 0x0,
  WebSessionReceiveMessageKind_AckBrowserEngine = 0x1000,
  WebSessionReceiveMessageKind_AckSystemMessage = 0x1001
}
 WebSessionReceiveMessageKind. More...
 
enum  WebArgType {
  WebArgType_Url = 0x1,
  WebArgType_CallbackUrl = 0x3,
  WebArgType_CallbackableUrl = 0x4,
  WebArgType_ApplicationId = 0x5,
  WebArgType_DocumentPath = 0x6,
  WebArgType_DocumentKind = 0x7,
  WebArgType_SystemDataId = 0x8,
  WebArgType_ShareStartPage = 0x9,
  WebArgType_Whitelist = 0xA,
  WebArgType_NewsFlag = 0xB,
  WebArgType_UnknownC = 0xC,
  WebArgType_UnknownD = 0xD,
  WebArgType_Uid = 0xE,
  WebArgType_AlbumEntry0 = 0xF,
  WebArgType_ScreenShot = 0x10,
  WebArgType_EcClientCert = 0x11,
  WebArgType_Unknown12 = 0x12,
  WebArgType_PlayReport = 0x13,
  WebArgType_Unknown14 = 0x14,
  WebArgType_Unknown15 = 0x15,
  WebArgType_BootDisplayKind = 0x17,
  WebArgType_BackgroundKind = 0x18,
  WebArgType_Footer = 0x19,
  WebArgType_Pointer = 0x1A,
  WebArgType_LeftStickMode = 0x1B,
  WebArgType_KeyRepeatFrame0 = 0x1C,
  WebArgType_KeyRepeatFrame1 = 0x1D,
  WebArgType_BootAsMediaPlayerInverted = 0x1E,
  WebArgType_DisplayUrlKind = 0x1F,
  WebArgType_BootAsMediaPlayer = 0x21,
  WebArgType_ShopJump = 0x22,
  WebArgType_MediaPlayerUserGestureRestriction = 0x23,
  WebArgType_MediaAutoPlay = 0x23,
  WebArgType_LobbyParameter = 0x24,
  WebArgType_ApplicationAlbumEntry = 0x26,
  WebArgType_JsExtension = 0x27,
  WebArgType_AdditionalCommentText = 0x28,
  WebArgType_TouchEnabledOnContents = 0x29,
  WebArgType_UserAgentAdditionalString = 0x2A,
  WebArgType_AdditionalMediaData0 = 0x2B,
  WebArgType_MediaPlayerAutoClose = 0x2C,
  WebArgType_PageCache = 0x2D,
  WebArgType_WebAudio = 0x2E,
  WebArgType_2F = 0x2F,
  WebArgType_YouTubeVideoFlag = 0x31,
  WebArgType_FooterFixedKind = 0x32,
  WebArgType_PageFade = 0x33,
  WebArgType_MediaCreatorApplicationRatingAge = 0x34,
  WebArgType_BootLoadingIcon = 0x35,
  WebArgType_PageScrollIndicator = 0x36,
  WebArgType_MediaPlayerSpeedControl = 0x37,
  WebArgType_AlbumEntry1 = 0x38,
  WebArgType_AlbumEntry2 = 0x39,
  WebArgType_AlbumEntry3 = 0x3A,
  WebArgType_AdditionalMediaData1 = 0x3B,
  WebArgType_AdditionalMediaData2 = 0x3C,
  WebArgType_AdditionalMediaData3 = 0x3D,
  WebArgType_BootFooterButton = 0x3E,
  WebArgType_OverrideWebAudioVolume = 0x3F,
  WebArgType_OverrideMediaAudioVolume = 0x40,
  WebArgType_SessionBootMode = 0x41,
  WebArgType_SessionFlag = 0x42,
  WebArgType_MediaPlayerUi = 0x43,
  WebArgType_TransferMemory = 0x44
}
 Types for WebArgTLV, input storage. More...
 
enum  WebReplyType {
  WebReplyType_ExitReason = 0x1,
  WebReplyType_LastUrl = 0x2,
  WebReplyType_LastUrlSize = 0x3,
  WebReplyType_SharePostResult = 0x4,
  WebReplyType_PostServiceName = 0x5,
  WebReplyType_PostServiceNameSize = 0x6,
  WebReplyType_PostId = 0x7,
  WebReplyType_PostIdSize = 0x8,
  WebReplyType_MediaPlayerAutoClosedByCompletion = 0x9
}
 Types for WebArgTLV, output storage. More...
 
enum  WebDocumentKind {
  WebDocumentKind_OfflineHtmlPage = 0x1,
  WebDocumentKind_ApplicationLegalInformation = 0x2,
  WebDocumentKind_SystemDataPage = 0x3
}
 This controls the kind of content to mount with Offline-applet. More...
 
enum  WebShareStartPage {
  WebShareStartPage_Default = 0,
  WebShareStartPage_Settings = 1
}
 This controls the initial page for ShareApplet, used by webShareCreate. More...
 
enum  WebBootDisplayKind {
  WebBootDisplayKind_Default = 0,
  WebBootDisplayKind_White = 1,
  WebBootDisplayKind_Black = 2,
  WebBootDisplayKind_Unknown3 = 3,
  WebBootDisplayKind_Unknown4 = 4
}
 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. More...
 
enum  WebBackgroundKind {
  WebBackgroundKind_Default = 0,
  WebBackgroundKind_Unknown1 = 1,
  WebBackgroundKind_Unknown2 = 2
}
 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. More...
 
enum  WebLeftStickMode {
  WebLeftStickMode_Pointer = 0,
  WebLeftStickMode_Cursor = 1
}
 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). More...
 
enum  WebFooterFixedKind {
  WebFooterFixedKind_Default = 0,
  WebFooterFixedKind_Always = 1,
  WebFooterFixedKind_Hidden = 2
}
 Kind values for webConfigSetFooterFixedKind. Controls UI footer display behaviour. 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...
 

Detailed Description

Wrapper for using the web LibraryApplets. See also: https://switchbrew.org/wiki/Internet_Browser.

Author
p-sam, yellows8

Enumeration Type Documentation

◆ WebArgType

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

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ WebFooterFixedKind

Kind values for webConfigSetFooterFixedKind. Controls UI footer display behaviour.

Enumerator
WebFooterFixedKind_Default 

Default. Footer is hidden while scrolling.

WebFooterFixedKind_Always 

Footer is always displayed regardless of scrolling.

WebFooterFixedKind_Hidden 

Footer is hidden regardless of scrolling.

◆ 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.

◆ WebReplyType

Types for WebArgTLV, output storage.

Enumerator
WebReplyType_ExitReason 

[3.0.0+] u32 ExitReason

WebReplyType_LastUrl 

[3.0.0+] string

WebReplyType_LastUrlSize 

[3.0.0+] u64

WebReplyType_SharePostResult 

[3.0.0+] u32 SharePostResult

WebReplyType_PostServiceName 

[3.0.0+] string

WebReplyType_PostServiceNameSize 

[3.0.0+] u64

WebReplyType_PostId 

[3.0.0+] string

WebReplyType_PostIdSize 

[3.0.0+] u64

WebReplyType_MediaPlayerAutoClosedByCompletion 

[8.0.0+] u8 bool

◆ WebSessionBootMode

WebSessionBootMode.

Enumerator
WebSessionBootMode_AllForeground 

AllForeground. This is the default.

WebSessionBootMode_AllForegroundInitiallyHidden 

AllForegroundInitiallyHidden.

◆ WebSessionReceiveMessageKind

WebSessionReceiveMessageKind.

Enumerator
WebSessionReceiveMessageKind_BrowserEngineContent 

BrowserEngine Content.

WebSessionReceiveMessageKind_AckBrowserEngine 

Ack BrowserEngine.

WebSessionReceiveMessageKind_AckSystemMessage 

Ack SystemMessage.

◆ WebSessionSendMessageKind

WebSessionSendMessageKind.

Enumerator
WebSessionSendMessageKind_BrowserEngineContent 

BrowserEngine Content.

WebSessionSendMessageKind_SystemMessageAppear 

SystemMessage Appear.

WebSessionSendMessageKind_Ack 

Ack.

◆ WebShareStartPage

This controls the initial page for ShareApplet, used by webShareCreate.

Enumerator
WebShareStartPage_Default 

The default "/" page.

WebShareStartPage_Settings 

The "/settings/" page.

Function Documentation

◆ webConfigAddAlbumEntryAndMediaData()

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.

Note
Only available with config created by webShareCreate on [6.0.0+].
Parameters
configWebCommonConfig object.
entryCapsAlbumEntry
dataInput data for AdditionalMediaData. Optional, can be NULL.
sizeSize of the input data, max size is 0x10. Optional, can be 0.

◆ webConfigRequestExit()

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.

Parameters
configWebCommonConfig object.

◆ webConfigSetAdditionalCommentText()

Result webConfigSetAdditionalCommentText ( WebCommonConfig config,
const char *  str 
)

Sets the Share AdditionalCommentText.

Note
Only available with config created by webShareCreate on [4.0.0+].
Parameters
configWebCommonConfig object.
strString

◆ webConfigSetAdditionalMediaData()

Result webConfigSetAdditionalMediaData ( WebCommonConfig config,
const u8 data,
size_t  size 
)

Sets the Share AdditionalMediaData.

Note
Only available with config created by webShareCreate on [4.0.0+].
Parameters
configWebCommonConfig object.
dataInput data
sizeSize of the input data, max size is 0x10.

◆ webConfigSetAlbumEntry()

Result webConfigSetAlbumEntry ( WebCommonConfig config,
const CapsAlbumEntry entry 
)

Sets the Share CapsAlbumEntry.

Note
Only available with config created by webShareCreate.
Parameters
configWebCommonConfig object.
entryCapsAlbumEntry

◆ webConfigSetApplicationAlbumEntry()

Result webConfigSetApplicationAlbumEntry ( WebCommonConfig config,
CapsApplicationAlbumEntry entry 
)

Sets the Share CapsApplicationAlbumEntry.

Note
Only available with config created by webShareCreate on [3.0.0+].
Parameters
configWebCommonConfig object.
entryCapsApplicationAlbumEntry, see also capssu.h.

◆ webConfigSetBackgroundKind()

Result webConfigSetBackgroundKind ( WebCommonConfig config,
WebBackgroundKind  kind 
)

Sets the BackgroundKind.

Note
Only available with config created by webOfflineCreate, webPageCreate, or webLobbyCreate.
Used automatically by webOfflineCreate, depending on the docKind.
Used automatically by webLobbyCreate with kind=2.
Parameters
configWebCommonConfig object.
kindWebBackgroundKind

◆ webConfigSetBootAsMediaPlayer()

Result webConfigSetBootAsMediaPlayer ( WebCommonConfig config,
bool  flag 
)

Sets the BootAsMediaPlayer flag.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [2.0.0+].
With config created by webNewsCreate on [3.0.0+], this also sets WebArgType_BootAsMediaPlayerInverted to !flag.
Parameters
configWebCommonConfig object.
flagFlag. true = BootAsMediaPlayer, false = BootAsWebPage.

◆ webConfigSetBootDisplayKind()

Result webConfigSetBootDisplayKind ( WebCommonConfig config,
WebBootDisplayKind  kind 
)

Sets the BootDisplayKind.

Note
Only available with config created by webOfflineCreate, webShareCreate, webPageCreate, or webLobbyCreate..
Used automatically by webOfflineCreate, depending on the docKind.
Used automatically by webShareCreate with kind=WebBootDisplayKind_Unknown3.
Used automatically by webLobbyCreate with kind=WebBootDisplayKind_Unknown4.
Parameters
configWebCommonConfig object.
kindWebBootDisplayKind

◆ webConfigSetBootFooterButtonVisible()

Result webConfigSetBootFooterButtonVisible ( WebCommonConfig config,
WebFooterButtonId  button,
bool  visible 
)

Sets whether the specified BootFooterButton is visible.

Note
Only available with config created by webOfflineCreate on [6.0.0+].
Parameters
configWebCommonConfig object.
buttonWebFooterButtonId
visibleVisible flag.

◆ webConfigSetBootLoadingIcon()

Result webConfigSetBootLoadingIcon ( WebCommonConfig config,
bool  flag 
)

Sets the BootLoadingIcon flag.

Note
Only available with config created by webOfflineCreate on [5.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetBootMode()

Result webConfigSetBootMode ( WebCommonConfig config,
WebSessionBootMode  mode 
)

Sets WebSessionBootMode.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [7.0.0+].
Parameters
configWebCommonConfig object.
modeWebSessionBootMode

◆ webConfigSetCallbackableUrl()

Result webConfigSetCallbackableUrl ( WebCommonConfig config,
const char *  url 
)

Sets the CallbackableUrl.

Note
Only available with config created by webPageCreate.
Parameters
configWebCommonConfig object.
urlURL

◆ webConfigSetCallbackUrl()

Result webConfigSetCallbackUrl ( WebCommonConfig config,
const char *  url 
)

Sets the CallbackUrl.

See also webReplyGetLastUrl.

Note
With Offline-applet for LastUrl handling, it compares the domain with "localhost" instead.
Only available with config created by webPageCreate or with Share-applet.
Parameters
configWebCommonConfig object.
urlURL

◆ webConfigSetDisplayUrlKind()

Result webConfigSetDisplayUrlKind ( WebCommonConfig config,
bool  kind 
)

Sets the DisplayUrlKind.

Note
Only available with config created by webShareCreate or webPageCreate.
Parameters
configWebCommonConfig object.
Note
Used automatically by webShareCreate with kind=true.
Parameters
kindKind

◆ webConfigSetEcClientCert()

Result webConfigSetEcClientCert ( WebCommonConfig config,
bool  flag 
)

Sets the EcClientCert flag.

Note
Only available with config created by webOfflineCreate or webPageCreate.
Used automatically by webOfflineCreate, depending on the docKind.
Used automatically by webNewsCreate with flag=true.
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetFooter()

Result webConfigSetFooter ( WebCommonConfig config,
bool  flag 
)

Sets the whether the UI footer is enabled.

Note
Only available with config created by webOfflineCreate or webPageCreate.
Used automatically by webOfflineCreate, depending on the docKind.
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetFooterFixedKind()

Result webConfigSetFooterFixedKind ( WebCommonConfig config,
WebFooterFixedKind  kind 
)

Sets the FooterFixedKind.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [5.0.0+].
Parameters
configWebCommonConfig object.
kindWebFooterFixedKind

◆ webConfigSetJsExtension()

Result webConfigSetJsExtension ( WebCommonConfig config,
bool  flag 
)

Sets whether JsExtension is enabled.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [3.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetKeyRepeatFrame()

Result webConfigSetKeyRepeatFrame ( WebCommonConfig config,
s32  inval0,
s32  inval1 
)

Sets the KeyRepeatFrame.

Note
Only available with config created by webOfflineCreate.
Parameters
configWebCommonConfig object.
inval0First input param.
inval1Second input param.

◆ webConfigSetLeftStickMode()

Result webConfigSetLeftStickMode ( WebCommonConfig config,
WebLeftStickMode  mode 
)

Sets the LeftStickMode.

Note
Only available with config created by webOfflineCreate, webShareCreate, webPageCreate, or webLobbyCreate.
Used automatically by webOfflineCreate, webShareCreate, and webLobbyCreate with WebLeftStickMode_Cursor.
Parameters
configWebCommonConfig object.
modeMode, different enums for Web and Offline.

◆ webConfigSetLobbyParameter()

Result webConfigSetLobbyParameter ( WebCommonConfig config,
const char *  str 
)

Sets the LobbyParameter.

Note
Only available with config created by webLobbyCreate.
Parameters
configWebCommonConfig object.
strString

◆ webConfigSetMediaAutoPlay()

Result webConfigSetMediaAutoPlay ( WebCommonConfig config,
bool  flag 
)

Sets whether MediaAutoPlay is enabled.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [6.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetMediaCreatorApplicationRatingAge()

Result webConfigSetMediaCreatorApplicationRatingAge ( WebCommonConfig config,
const s8 data 
)

Sets the Share MediaCreatorApplicationRatingAge.

Note
Only available with config created by webShareCreate on [5.0.0+].
Parameters
configWebCommonConfig object.
data0x20-byte input data

◆ webConfigSetMediaPlayerAutoClose()

Result webConfigSetMediaPlayerAutoClose ( WebCommonConfig config,
bool  flag 
)

Sets the MediaPlayerAutoClose flag.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [4.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetMediaPlayerSpeedControl()

Result webConfigSetMediaPlayerSpeedControl ( WebCommonConfig config,
bool  flag 
)

Sets whether MediaPlayerSpeedControl is enabled.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [6.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetMediaPlayerUi()

Result webConfigSetMediaPlayerUi ( WebCommonConfig config,
bool  flag 
)

Sets whether MediaPlayerUi is enabled.

Note
Only available with config created by webOfflineCreate on [8.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetMediaPlayerUserGestureRestriction()

Result webConfigSetMediaPlayerUserGestureRestriction ( WebCommonConfig config,
bool  flag 
)

Sets the MediaPlayerUserGestureRestriction flag.

Note
Only available with config created by webPageCreate on [2.0.0-5.1.0].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetOverrideMediaAudioVolume()

Result webConfigSetOverrideMediaAudioVolume ( WebCommonConfig config,
float  value 
)

Sets OverrideMediaAudioVolume.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [6.0.0+].
Parameters
configWebCommonConfig object.
valueValue

◆ webConfigSetOverrideWebAudioVolume()

Result webConfigSetOverrideWebAudioVolume ( WebCommonConfig config,
float  value 
)

Sets OverrideWebAudioVolume.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [6.0.0+].
Parameters
configWebCommonConfig object.
valueValue

◆ webConfigSetPageCache()

Result webConfigSetPageCache ( WebCommonConfig config,
bool  flag 
)

Sets whether PageCache is enabled.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [4.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetPageFade()

Result webConfigSetPageFade ( WebCommonConfig config,
bool  flag 
)

Sets the PageFade flag.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [5.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetPageScrollIndicator()

Result webConfigSetPageScrollIndicator ( WebCommonConfig config,
bool  flag 
)

Sets the PageScrollIndicator flag.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [5.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetPlayReport()

Result webConfigSetPlayReport ( WebCommonConfig config,
bool  flag 
)

Sets whether PlayReport is enabled.

Note
Only available with config created by webOfflineCreate.
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetPointer()

Result webConfigSetPointer ( WebCommonConfig config,
bool  flag 
)

Sets the whether the Pointer is enabled.

See also WebLeftStickMode.

Note
Only available with config created by webOfflineCreate, webPageCreate, or webLobbyCreate.
Used automatically by webOfflineCreate.
Used automatically by webLobbyCreate with flag=false on [3.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetScreenShot()

Result webConfigSetScreenShot ( WebCommonConfig config,
bool  flag 
)

Sets the ScreenShot flag, which controls whether screen-shot capture is allowed.

Note
Only available with config created by webPageCreate.
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetShopJump()

Result webConfigSetShopJump ( WebCommonConfig config,
bool  flag 
)

Sets the ShopJump flag.

Note
Only available with config created by webPageCreate on [2.0.0+].
Used automatically by webNewsCreate with flag=true.
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetTouchEnabledOnContents()

Result webConfigSetTouchEnabledOnContents ( WebCommonConfig config,
bool  flag 
)

Sets the TouchEnabledOnContents flag.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [4.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetTransferMemory()

Result webConfigSetTransferMemory ( WebCommonConfig config,
bool  flag 
)

Sets whether TransferMemory is enabled.

Note
Only available with config created by webPageCreate on [11.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetUid()

Result webConfigSetUid ( WebCommonConfig config,
AccountUid  uid 
)

Sets the account uid.

Controls which user-specific savedata to mount.

Note
Only available with config created by webPageCreate, webLobbyCreate, or with Share-applet.
Used automatically by webShareCreate and webLobbyCreate with uid=0.
Parameters
configWebCommonConfig object.
uidAccountUid

◆ webConfigSetUserAgentAdditionalString()

Result webConfigSetUserAgentAdditionalString ( WebCommonConfig config,
const char *  str 
)

Sets the UserAgentAdditionalString.

" " followed by this string are appended to the normal User-Agent string.

Note
Only available with config created by webPageCreate on [4.0.0+].
Parameters
configWebCommonConfig object.
strString

◆ webConfigSetWebAudio()

Result webConfigSetWebAudio ( WebCommonConfig config,
bool  flag 
)

Sets whether WebAudio is enabled.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [4.0.0+].
Parameters
configWebCommonConfig object.
flagFlag

◆ webConfigSetWhitelist()

Result webConfigSetWhitelist ( WebCommonConfig config,
const char *  whitelist 
)

Sets the whitelist.

Note
Only available with config created by webPageCreate.
If the whitelist isn't formatted properly, the applet will exit briefly after the applet is launched.
Parameters
configWebCommonConfig object.
whitelistWhitelist string, each line is a regex for each whitelisted URL.

◆ webConfigShow()

Result webConfigShow ( WebCommonConfig config,
WebCommonReply out 
)

Launches the {web applet} with the specified config and waits for it to exit.

Parameters
configWebCommonConfig object.
outOptional output applet reply data, can be NULL.

◆ webLobbyCreate()

Result webLobbyCreate ( WebCommonConfig config)

Creates the config for LobbyApplet.

This applet is for "Nintendo Switch Online Lounge".

Note
Only available on [2.0.0+].
If a non-zero uid isn't set with webConfigSetUid prior to using webConfigShow, the applet will launch the profile-selector applet to select an account.
Uses webConfigSetLeftStickMode with WebLeftStickMode_Cursor, webConfigSetPointer with flag=false on [3.0.0+], webConfigSetUid with uid=0, and sets WebArgType_Unknown14/WebArgType_Unknown15 to value 1. Uses webConfigSetBootDisplayKind with WebBootDisplayKind_Unknown4, webConfigSetBackgroundKind with WebBackgroundKind_Unknown2, and sets WebArgType_BootAsMediaPlayerInverted to false.
Parameters
configWebCommonConfig object.

◆ webNewsCreate()

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.

Note
The domain from the input URL is automatically whitelisted, in addition to any already loaded whitelist.
Sets WebArgType_UnknownD to value 1, and sets WebArgType_NewsFlag to true. Also uses webConfigSetEcClientCert and webConfigSetShopJump with flag=true.
Parameters
configWebCommonConfig object.
urlInitial URL navigated to by the applet.

◆ webOfflineCreate()

Result webOfflineCreate ( WebCommonConfig config,
WebDocumentKind  docKind,
u64  id,
const char *  docPath 
)

Creates the config for Offline-applet.

This applet uses data loaded from content.

Note
Uses webConfigSetLeftStickMode with WebLeftStickMode_Cursor and sets WebArgType_BootAsMediaPlayerInverted to false. Uses webConfigSetPointer with flag = docKind == WebDocumentKind_OfflineHtmlPage.
For docKind WebDocumentKind_ApplicationLegalInformation / WebDocumentKind_SystemDataPage, uses webConfigSetFooter with flag=true and webConfigSetBackgroundKind with WebBackgroundKind_Default.
For docKind WebDocumentKind_SystemDataPage, uses webConfigSetBootDisplayKind with WebBootDisplayKind_White.
Sets WebArgType_Unknown14/WebArgType_Unknown15 to value 1. With docKind WebDocumentKind_ApplicationLegalInformation, uses webConfigSetBootDisplayKind with WebBootDisplayKind_White.
Sets WebArgType_UnknownC to value 1.
With docKind WebDocumentKind_ApplicationLegalInformation, uses webConfigSetEcClientCert with flag=true.
With docKind WebDocumentKind_OfflineHtmlPage on pre-3.0.0, sets WebArgType_Unknown12 to value 1.
Lastly, sets the TLVs as needed for the input params.
Parameters
configWebCommonConfig object.
docKindWebDocumentKind
idId 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).
docPathInitial 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/".

◆ webPageCreate()

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.

Note
Sets WebArgType_UnknownD, and WebArgType_Unknown12 on pre-3.0.0, to value 1.
Parameters
configWebCommonConfig object.
urlInitial URL navigated to by the applet.

◆ webReplyGetExitReason()

Result webReplyGetExitReason ( WebCommonReply reply,
WebExitReason exitReason 
)

Gets the ExitReason from the specified reply.

Parameters
replyWebCommonReply object.
exitReasonOutput WebExitReason

◆ webReplyGetLastUrl()

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).

Note
This is only available with WebExitReason_LastUrl (string is empty otherwise).
If you want to allocate a string buffer on heap, you can call this with outstr=NULL/outstr_maxsize=0 to get the out_size, then call it again with the allocated buffer.
Parameters
replyWebCommonReply object.
outstrOutput string buffer. If NULL, the string is not loaded.
outstr_maxsizeSize 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_sizeOutput string length including NUL-terminator, for the original input string in the reply loaded from a separate size field.

◆ webReplyGetMediaPlayerAutoClosedByCompletion()

Result webReplyGetMediaPlayerAutoClosedByCompletion ( WebCommonReply reply,
bool *  flag 
)

Gets the MediaPlayerAutoClosedByCompletion flag from the specified reply.

Note
Only available with reply data from Web on [8.0.0+].
Parameters
replyWebCommonReply object.
flagOutput flag

◆ webReplyGetPostId()

Result webReplyGetPostId ( WebCommonReply reply,
char *  outstr,
size_t  outstr_maxsize,
size_t *  out_size 
)

Gets the PostId from the specified reply.

Note
Only available with reply data from ShareApplet on [3.0.0+].
If you want to allocate a string buffer on heap, you can call this with outstr=NULL/outstr_maxsize=0 to get the out_size, then call it again with the allocated buffer.
Parameters
replyWebCommonReply object.
outstrOutput string buffer. If NULL, the string is not loaded.
outstr_maxsizeSize 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_sizeOutput string length including NUL-terminator, for the original input string in the reply loaded from a separate size field.

◆ webReplyGetPostServiceName()

Result webReplyGetPostServiceName ( WebCommonReply reply,
char *  outstr,
size_t  outstr_maxsize,
size_t *  out_size 
)

Gets the PostServiceName from the specified reply.

Note
Only available with reply data from ShareApplet on [3.0.0+].
If you want to allocate a string buffer on heap, you can call this with outstr=NULL/outstr_maxsize=0 to get the out_size, then call it again with the allocated buffer.
Parameters
replyWebCommonReply object.
outstrOutput string buffer. If NULL, the string is not loaded.
outstr_maxsizeSize 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_sizeOutput string length including NUL-terminator, for the original input string in the reply loaded from a separate size field.

◆ webReplyGetSharePostResult()

Result webReplyGetSharePostResult ( WebCommonReply reply,
u32 sharePostResult 
)

Gets the SharePostResult from the specified reply.

Note
Only available with reply data from ShareApplet on [3.0.0+].
Parameters
replyWebCommonReply object.
sharePostResultOutput sharePostResult

◆ webSessionAppear()

Result webSessionAppear ( WebSession s,
bool *  flag 
)

Request the applet to Appear, this is only needed with WebSessionBootMode_AllForegroundInitiallyHidden.

Note
This should not be used before webSessionStart.
Parameters
sWebSession
[out]flagWhether the message was sent successfully.

◆ webSessionClose()

void webSessionClose ( WebSession s)

Closes a WebSession object.

Parameters
sWebSession

◆ webSessionCreate()

void webSessionCreate ( WebSession s,
WebCommonConfig config 
)

Creates a WebSession object.

Parameters
sWebSession
configWebCommonConfig object.

◆ webSessionRequestExit()

Result webSessionRequestExit ( WebSession s)

Request the applet to exit.

Note
Use this instead of webConfigRequestExit, when using WebSession.
Parameters
sWebSession

◆ webSessionStart()

Result webSessionStart ( WebSession s,
Event **  out_event 
)

Launches the applet for WebSession.

Note
Only available with config created by webOfflineCreate or webPageCreate, on [7.0.0+].
Do not use webConfigShow when using WebSession.
Parameters
sWebSession
[out]out_eventOutput Event with autoclear=false, from appletHolderGetExitEvent. Optional, can be NULL.

◆ webSessionTryReceiveContentMessage()

Result webSessionTryReceiveContentMessage ( WebSession s,
char *  content,
u64  size,
u64 out_size,
bool *  flag 
)

TryReceiveContentMessage.

Note
This should not be used before webSessionStart.
The JS-side for this is only available when JsExtension is enabled via webConfigSetJsExtension.
Parameters
sWebSession
[out]contentOutput content string, always NUL-terminated.
[in]sizeMax size of content.
[out]out_sizeOriginal content size, prior to being clamped to the specified size param.
[out]flagWhether the message was received successfully.

◆ webSessionTrySendContentMessage()

Result webSessionTrySendContentMessage ( WebSession s,
const char *  content,
u32  size,
bool *  flag 
)

TrySendContentMessage.

Note
This should not be used before webSessionStart.
The JS-side for this is only available when JsExtension is enabled via webConfigSetJsExtension.
The JS-side may ignore this if it's sent too soon after the applet launches.
Parameters
sWebSession
[in]contentInput content NUL-terminated string.
[in]sizeSize of content.
[out]flagWhether the message was sent successfully.

◆ webSessionWaitForExit()

Result webSessionWaitForExit ( WebSession s,
WebCommonReply out 
)

Waits for the applet to exit.

Note
This must be used before webSessionClose, when webSessionStart was used successfully.
Parameters
sWebSession
outOptional output applet reply data, can be NULL.

◆ webShareCreate()

Result webShareCreate ( WebCommonConfig config,
WebShareStartPage  page 
)

Creates the config for ShareApplet.

This applet is for social media posting/settings.

Note
If a non-zero uid isn't set with webConfigSetUid prior to using webConfigShow, the applet will launch the profile-selector applet to select an account.
An error will be displayed if neither webConfigSetAlbumEntry, nor webConfigSetApplicationAlbumEntry, nor webConfigAddAlbumEntryAndMediaData are used prior to using webConfigShow, with WebShareStartPage_Default.
Uses webConfigSetLeftStickMode with WebLeftStickMode_Cursor, webConfigSetUid with uid=0, webConfigSetDisplayUrlKind with kind=true, and sets WebArgType_Unknown14/WebArgType_Unknown15 to value 1. Uses webConfigSetBootDisplayKind with WebBootDisplayKind_Unknown3.
Parameters
configWebCommonConfig object.
pageWebShareStartPage

◆ webWifiCreate()

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.

Parameters
configWebWifiConfig object.
conntest_urlURL used for the connection-test requests. When empty/NULL the applet will test the connection with nifm and throw an error on failure.
initial_urlInitial URL navigated to by the applet.
uuidNIFM Network UUID, for nifm cmd SetNetworkProfileId. Value 0 can be used. Only used by the applet when conntest_url is set.
revInput value for nifm cmd SetRequirementByRevision. Value 0 can be used. Only used by the applet when conntest_url is set.

◆ webWifiShow()

Result webWifiShow ( WebWifiConfig config,
WebWifiReturnValue out 
)

Launches WifiWebAuthApplet with the specified config and waits for it to exit.

Parameters
configWebWifiConfig object.
outOptional output applet reply data, can be NULL.

◆ webYouTubeVideoCreate()

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).

Note
This is only available on [5.0.0+].
Sets WebArgType_UnknownD to value 1, and sets WebArgType_YouTubeVideoFlag to true. Also uses webConfigSetBootAsMediaPlayer with flag=true.
Parameters
configWebCommonConfig object.
urlInitial URL navigated to by the applet.