mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-29 00:02:39 +02:00
Added webConfigSetAdditionalCommentText, webConfigSetAdditionalMediaData, and webConfigSetMediaCreatorApplicationRatingAge. Improved web docs.
This commit is contained in:
parent
166652a0eb
commit
bc7b178036
@ -227,7 +227,7 @@ Result webConfigSetWhitelist(WebCommonConfig* config, const char* whitelist);
|
||||
Result webConfigSetUserID(WebCommonConfig* config, u128 userID);
|
||||
|
||||
/**
|
||||
* @brief Sets the CapsAlbumEntry.
|
||||
* @brief Sets the Share CapsAlbumEntry.
|
||||
* @note Only available with config created by \ref webShareCreate.
|
||||
* @param config WebCommonConfig object.
|
||||
* @param entry \ref CapsAlbumEntry
|
||||
@ -349,7 +349,7 @@ Result webConfigSetMediaPlayerUserGestureRestriction(WebCommonConfig* config, bo
|
||||
Result webConfigSetLobbyParameter(WebCommonConfig* config, const char* str);
|
||||
|
||||
/**
|
||||
* @brief Sets the CapsApplicationAlbumEntry.
|
||||
* @brief Sets the Share CapsApplicationAlbumEntry.
|
||||
* @note Only available with config created by \ref webShareCreate on [3.0.0+].
|
||||
* @param config WebCommonConfig object.
|
||||
* @param entry \ref CapsApplicationAlbumEntry
|
||||
@ -364,6 +364,14 @@ Result webConfigSetApplicationAlbumEntry(WebCommonConfig* config, CapsApplicatio
|
||||
*/
|
||||
Result webConfigSetJsExtension(WebCommonConfig* config, bool flag);
|
||||
|
||||
/**
|
||||
* @brief Sets the Share AdditionalCommentText.
|
||||
* @note Only available with config created by \ref webShareCreate on [4.0.0+].
|
||||
* @param config WebCommonConfig object.
|
||||
* @param str String
|
||||
*/
|
||||
Result webConfigSetAdditionalCommentText(WebCommonConfig* config, const char* str);
|
||||
|
||||
/**
|
||||
* @brief Sets the TouchEnabledOnContents flag.
|
||||
* @note Only available with config created by \ref webPageCreate or with Offline-applet, on [4.0.0+].
|
||||
@ -380,6 +388,15 @@ Result webConfigSetTouchEnabledOnContents(WebCommonConfig* config, bool flag);
|
||||
*/
|
||||
Result webConfigSetUserAgentAdditionalString(WebCommonConfig* config, const char* str);
|
||||
|
||||
/**
|
||||
* @brief Sets the Share AdditionalMediaData.
|
||||
* @note Only available with config created by \ref webShareCreate on [4.0.0+].
|
||||
* @param config WebCommonConfig object.
|
||||
* @param data Input data
|
||||
* @param size Size of the input data, max size is 0x10.
|
||||
*/
|
||||
Result webConfigSetAdditionalMediaData(WebCommonConfig* config, const u8* data, size_t size);
|
||||
|
||||
/**
|
||||
* @brief Sets the MediaPlayerAutoClose flag.
|
||||
* @note Only available with config created by \ref webPageCreate on [4.0.0+].
|
||||
@ -420,6 +437,14 @@ Result webConfigSetFooterFixedKind(WebCommonConfig* config, u32 kind);
|
||||
*/
|
||||
Result webConfigSetPageFade(WebCommonConfig* config, bool flag);
|
||||
|
||||
/**
|
||||
* @brief Sets the Share MediaCreatorApplicationRatingAge.
|
||||
* @note Only available with config created by \ref webShareCreate on [5.0.0+].
|
||||
* @param config WebCommonConfig object.
|
||||
* @param data 0x20-byte input data
|
||||
*/
|
||||
Result webConfigSetMediaCreatorApplicationRatingAge(WebCommonConfig* config, const s8 *data);
|
||||
|
||||
/**
|
||||
* @brief Sets the BootLoadingIcon flag.
|
||||
* @note Only available with Offline-applet on [5.0.0+].
|
||||
|
@ -429,6 +429,12 @@ Result webConfigSetJsExtension(WebCommonConfig* config, bool flag) {
|
||||
return _webConfigSetFlag(config, WebArgType_JsExtension, flag);
|
||||
}
|
||||
|
||||
Result webConfigSetAdditionalCommentText(WebCommonConfig* config, const char* str) {
|
||||
if (_webGetShimKind(config) != WebShimKind_Share) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
if (hosversionBefore(4,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
return _webConfigSetString(config, WebArgType_AdditionalCommentText, str, 0x100);
|
||||
}
|
||||
|
||||
Result webConfigSetTouchEnabledOnContents(WebCommonConfig* config, bool flag) {
|
||||
WebShimKind shim = _webGetShimKind(config);
|
||||
if (shim != WebShimKind_Offline && shim != WebShimKind_Web) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
@ -442,6 +448,12 @@ Result webConfigSetUserAgentAdditionalString(WebCommonConfig* config, const char
|
||||
return _webConfigSetString(config, WebArgType_UserAgentAdditionalString, str, 0x80);
|
||||
}
|
||||
|
||||
Result webConfigSetAdditionalMediaData(WebCommonConfig* config, const u8* data, size_t size) {
|
||||
if (_webGetShimKind(config) != WebShimKind_Share) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
if (hosversionBefore(4,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
return _webTLVWrite(&config->arg, WebArgType_AdditionalMediaData, data, size, 0x10);
|
||||
}
|
||||
|
||||
Result webConfigSetMediaPlayerAutoClose(WebCommonConfig* config, bool flag) {
|
||||
if (_webGetShimKind(config) != WebShimKind_Web) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
if (hosversionBefore(4,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
@ -475,6 +487,12 @@ Result webConfigSetPageFade(WebCommonConfig* config, bool flag) {
|
||||
return _webConfigSetFlag(config, WebArgType_PageFade, flag);
|
||||
}
|
||||
|
||||
Result webConfigSetMediaCreatorApplicationRatingAge(WebCommonConfig* config, const s8 *data) {
|
||||
if (_webGetShimKind(config) != WebShimKind_Share) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
if (hosversionBefore(5,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
return _webTLVSet(config, WebArgType_MediaCreatorApplicationRatingAge, data, 0x20);
|
||||
}
|
||||
|
||||
Result webConfigSetBootLoadingIcon(WebCommonConfig* config, bool flag) {
|
||||
if (_webGetShimKind(config) != WebShimKind_Offline) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
if (hosversionBefore(5,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
Loading…
Reference in New Issue
Block a user