diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h
index 6f9c77cd10db63df4a881208561c118d5622847c..f9d1acd1486bd5c8e17aa7f6cf7a2f43e88d56b3 100644
--- a/ark_runtime/jsvm/jsvm.h
+++ b/ark_runtime/jsvm/jsvm.h
@@ -112,7 +112,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Init(const JSVM_InitOptions* options);
*
* @param options: The options for create the VM instance.
* @param result: The new VM instance.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateVM(const JSVM_CreateVMOptions* options,
@@ -122,7 +123,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateVM(const JSVM_CreateVMOptions* options,
* @brief Destroys VM instance.
*
* @param vm: The VM instance to be Destroyed.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DestroyVM(JSVM_VM vm);
@@ -132,7 +134,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DestroyVM(JSVM_VM vm);
*
* @param vm: The VM instance to open scope for.
* @param result: The new VM scope.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_OpenVMScope(JSVM_VM vm,
@@ -143,7 +146,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenVMScope(JSVM_VM vm,
*
* @param vm: The VM instance to close scope for.
* @param scope: The VM scope to be closed.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CloseVMScope(JSVM_VM vm,
@@ -156,7 +160,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CloseVMScope(JSVM_VM vm,
* @param propertyCount: The number of elements in the properties array.
* @param properties: The array of property descriptor.
* @param result: The new environment created.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateEnv(JSVM_VM vm,
@@ -170,7 +175,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateEnv(JSVM_VM vm,
* @param vm: The VM instance that the env will be created in.
* @param index: The index of the environment in the snapshot.
* @param result: The new environment created.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateEnvFromSnapshot(JSVM_VM vm,
@@ -181,7 +187,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateEnvFromSnapshot(JSVM_VM vm,
* @brief This function destroys the environment.
*
* @param env: The environment to be destroyed.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DestroyEnv(JSVM_Env env);
@@ -191,7 +198,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DestroyEnv(JSVM_Env env);
*
* @param env: The environment that the JSVM-API call is invoked under.
* @param result: The new environment scope.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_OpenEnvScope(JSVM_Env env,
@@ -202,7 +210,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenEnvScope(JSVM_Env env,
*
* @param env: The environment that the JSVM-API call is invoked under.
* @param scope: The environment scope to be closed.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CloseEnvScope(JSVM_Env env,
@@ -229,7 +238,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetVM(JSVM_Env env,
* @param eagerCompile: Whether to compile the script eagerly.
* @param cacheRejected: Whether the code cache rejected by compilation.
* @param result: The compiled script.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CompileScript(JSVM_Env env,
@@ -252,7 +262,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CompileScript(JSVM_Env env,
* @param cacheRejected: Whether the code cache rejected by compilation.
* @param origin: The information of source code.
* @param result: The compiled script.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CompileScriptWithOrigin(JSVM_Env env,
@@ -271,7 +282,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CompileScriptWithOrigin(JSVM_Env env,
* @param script: A compiled script to create code cache for.
* @param data: The data of the code cache.
* @param length: The length of the code cache data.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateCodeCache(JSVM_Env env,
@@ -305,7 +317,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_RunScript(JSVM_Env env,
* @param finalizeCb: The function to call when the environment is being torn down. The function receives
* data so that it might free it. JSVM_Finalize provides more details.
* @param finalizeHint: Optional hint to pass to the finalize callback during collection.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_SetInstanceData(JSVM_Env env,
@@ -320,7 +333,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetInstanceData(JSVM_Env env,
* @param env: The environment that the JSVM-API call is invoked under.
* @param data: The data item that was previously associated with the currently running JSVM environment by
* a call to OH_JSVM_SetInstanceData().
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetInstanceData(JSVM_Env env,
@@ -332,7 +346,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetInstanceData(JSVM_Env env,
*
* @param env: The environment that the JSVM-API call is invoked under.
* @param result: The JSVM_ExtendedErrorInfo structure with more information about the error.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetLastErrorInfo(JSVM_Env env,
@@ -343,7 +358,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetLastErrorInfo(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param error: The JavaScript value to be thrown.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_Throw(JSVM_Env env,
@@ -355,7 +371,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Throw(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param code: Optional error code to be set on the error.
* @param msg: C string representing the text to be associated with the error.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ThrowError(JSVM_Env env,
@@ -368,7 +385,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ThrowError(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param code: Optional error code to be set on the error.
* @param msg: C string representing the text to be associated with the error.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ThrowTypeError(JSVM_Env env,
@@ -381,7 +399,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ThrowTypeError(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param code: Optional error code to be set on the error.
* @param msg: C string representing the text to be associated with the error.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ThrowRangeError(JSVM_Env env,
@@ -394,7 +413,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ThrowRangeError(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param code: Optional error code to be set on the error.
* @param msg: C string representing the text to be associated with the error.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ThrowSyntaxError(JSVM_Env env,
@@ -408,7 +428,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ThrowSyntaxError(JSVM_Env env,
* @param value: The JSVM_Value to be checked.
* @param result: Boolean value that is set to true if JSVM_Value represents an error,
* false otherwise.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsError(JSVM_Env env,
@@ -422,7 +443,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsError(JSVM_Env env,
* @param code: Optional JSVM_Value with the string for the error code to be associated with the error.
* @param msg: JSVM_Value that references a JavaScript string to be used as the message for the Error.
* @param result: JSVM_Value representing the error created.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateError(JSVM_Env env,
@@ -437,7 +459,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateError(JSVM_Env env,
* @param code: Optional JSVM_Value with the string for the error code to be associated with the error.
* @param msg: JSVM_Value that references a JavaScript string to be used as the message for the Error.
* @param result: JSVM_Value representing the error created.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateTypeError(JSVM_Env env,
@@ -452,7 +475,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateTypeError(JSVM_Env env,
* @param code: Optional JSVM_Value with the string for the error code to be associated with the error.
* @param msg: JSVM_Value that references a JavaScript string to be used as the message for the Error.
* @param result: JSVM_Value representing the error created.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateRangeError(JSVM_Env env,
@@ -467,7 +491,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateRangeError(JSVM_Env env,
* @param code: Optional JSVM_Value with the string for the error code to be associated with the error.
* @param msg: JSVM_Value that references a JavaScript string to be used as the message for the Error.
* @param result: JSVM_Value representing the error created.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateSyntaxError(JSVM_Env env,
@@ -480,7 +505,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateSyntaxError(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: The exception if one is pending, NULL otherwise.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetAndClearLastException(JSVM_Env env,
@@ -491,7 +517,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetAndClearLastException(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: Boolean value that is set to true if an exception is pending.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsExceptionPending(JSVM_Env env,
@@ -502,7 +529,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsExceptionPending(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: JSVM_Value representing the new scope.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_OpenHandleScope(JSVM_Env env,
@@ -514,7 +542,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenHandleScope(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param scope: JSVM_Value representing the scope to be closed.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CloseHandleScope(JSVM_Env env,
@@ -525,7 +554,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CloseHandleScope(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: JSVM_Value representing the new scope.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_OpenEscapableHandleScope(JSVM_Env env,
@@ -537,7 +567,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_OpenEscapableHandleScope(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param scope: JSVM_Value representing the scope to be closed.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CloseEscapableHandleScope(JSVM_Env env,
@@ -552,7 +583,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CloseEscapableHandleScope(JSVM_Env env,
* @param scope: JSVM_Value representing the current scope.
* @param escapee: JSVM_Value representing the JavaScript Object to be escaped.
* @param result: JSVM_Value representing the handle to the escaped Object in the outer scope.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_EscapeHandle(JSVM_Env env,
@@ -567,7 +599,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_EscapeHandle(JSVM_Env env,
* @param value: The JSVM_Value for which a reference is being created.
* @param initialRefcount: Initial reference count for the new reference.
* @param result: JSVM_Ref pointing to the new reference.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateReference(JSVM_Env env,
@@ -580,7 +613,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateReference(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param ref: JSVM_Ref to be deleted.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DeleteReference(JSVM_Env env,
@@ -593,7 +627,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DeleteReference(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param ref: JSVM_Ref for which the reference count will be incremented.
* @param result: The new reference count.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ReferenceRef(JSVM_Env env,
@@ -607,7 +642,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReferenceRef(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param ref: JSVM_Ref for which the reference count will be decremented.
* @param result: The new reference count.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ReferenceUnref(JSVM_Env env,
@@ -621,7 +657,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReferenceUnref(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param ref: The JSVM_Ref for which the corresponding value is being requested.
* @param result: The JSVM_Value referenced by the JSVM_Ref.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetReferenceValue(JSVM_Env env,
@@ -633,7 +670,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetReferenceValue(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: A JSVM_Value representing a JavaScript Array.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateArray(JSVM_Env env,
@@ -648,7 +686,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateArray(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param length: The initial length of the Array.
* @param result: A JSVM_Value representing a JavaScript Array.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateArrayWithLength(JSVM_Env env,
@@ -667,7 +706,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateArrayWithLength(JSVM_Env env,
* @param byteLength: The length in bytes of the array buffer to create.
* @param data: Pointer to the underlying byte buffer of the ArrayBuffer.data can optionally be ignored by passing NULL.
* @param result: A JSVM_Value representing a JavaScript Array.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateArraybuffer(JSVM_Env env,
@@ -682,7 +722,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateArraybuffer(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param time: ECMAScript time value in milliseconds since 01 January, 1970 UTC.
* @param result: A JSVM_Value representing a JavaScript Date.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateDate(JSVM_Env env,
@@ -702,7 +743,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDate(JSVM_Env env,
* more details.
* @param finalizeHint: Optional hint to pass to the finalize callback during collection.
* @param result: A JSVM_Value representing an external value.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternal(JSVM_Env env,
@@ -716,7 +758,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateExternal(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: A JSVM_Value representing a JavaScript Object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateObject(JSVM_Env env,
@@ -729,7 +772,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateObject(JSVM_Env env,
* @param description: Optional JSVM_Value which refers to a JavaScript string to be set as the description
* for the symbol.
* @param result: A JSVM_Value representing a JavaScript symbol.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateSymbol(JSVM_Env env,
@@ -744,7 +788,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateSymbol(JSVM_Env env,
* @param utf8description: UTF-8 C string representing the text to be used as the description for the symbol.
* @param length: The length of the description string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated.
* @param result: A JSVM_Value representing a JavaScript symbol.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_SymbolFor(JSVM_Env env,
@@ -764,7 +809,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SymbolFor(JSVM_Env env,
* @param arraybuffer: ArrayBuffer underlying the typed array.
* @param byteOffset: The byte offset within the ArrayBuffer from which to start projecting the TypedArray.
* @param result: A JSVM_Value representing a JavaScript TypedArray
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateTypedarray(JSVM_Env env,
@@ -786,7 +832,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateTypedarray(JSVM_Env env,
* @param arraybuffer: ArrayBuffer underlying the DataView.
* @param byteOffset: The byte offset within the ArrayBuffer from which to start projecting the DataView.
* @param result:A JSVM_Value representing a JavaScript DataView.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateDataview(JSVM_Env env,
@@ -801,7 +848,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDataview(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: Integer value to be represented in JavaScript.
* @param result: A JSVM_Value representing a JavaScript number.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateInt32(JSVM_Env env,
@@ -814,7 +862,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateInt32(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: Unsigned integer value to be represented in JavaScript.
* @param result: A JSVM_Value representing a JavaScript number.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateUint32(JSVM_Env env,
@@ -827,7 +876,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateUint32(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: Integer value to be represented in JavaScript.
* @param result: A JSVM_Value representing a JavaScript number.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateInt64(JSVM_Env env,
@@ -840,7 +890,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateInt64(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: Double-precision value to be represented in JavaScript.
* @param result: A JSVM_Value representing a JavaScript number.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateDouble(JSVM_Env env,
@@ -853,7 +904,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateDouble(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: Integer value to be represented in JavaScript.
* @param result: A JSVM_Value representing a JavaScript BigInt.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintInt64(JSVM_Env env,
@@ -866,7 +918,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintInt64(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: Unsigned integer value to be represented in JavaScript.
* @param result: A JSVM_Value representing a JavaScript BigInt.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintUint64(JSVM_Env env,
@@ -882,7 +935,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintUint64(JSVM_Env env,
* @param wordCount: The length of the words array.
* @param words: An array of uint64_t little-endian 64-bit words.
* @param result: A JSVM_Value representing a JavaScript BigInt.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintWords(JSVM_Env env,
@@ -899,7 +953,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateBigintWords(JSVM_Env env,
* @param str: Character buffer representing an ISO-8859-1-encoded string.
* @param length: The length of the string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated.
* @param result: A JSVM_Value representing a JavaScript string.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringLatin1(JSVM_Env env,
@@ -916,7 +971,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringLatin1(JSVM_Env env,
* @param length: The length of the string in two-byte code units, or JSVM_AUTO_LENGTH
* if it is null-terminated.
* @param result: A JSVM_Value representing a JavaScript string.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringUtf16(JSVM_Env env,
@@ -932,7 +988,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringUtf16(JSVM_Env env,
* @param str: Character buffer representing a UTF8-encoded string.
* @param length: The length of the string in bytes, or JSVM_AUTO_LENGTH if it is null-terminated.
* @param result: A JSVM_Value representing a JavaScript string.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringUtf8(JSVM_Env env,
@@ -946,7 +1003,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateStringUtf8(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: JSVM_Value representing the JavaScript Array whose length is being queried.
* @param result: uint32 representing length of the array.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetArrayLength(JSVM_Env env,
@@ -961,7 +1019,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetArrayLength(JSVM_Env env,
* @param data: The underlying data buffer of the ArrayBuffer. If byte_length is 0, this may be NULL
* or any other pointer value.
* @param byteLength: Length in bytes of the underlying data buffer.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetArraybufferInfo(JSVM_Env env,
@@ -976,7 +1035,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetArraybufferInfo(JSVM_Env env,
* @param object: JSVM_Value representing JavaScript Object whose prototype to return. This returns
* the equivalent of Object.getPrototypeOf (which is not the same as the function's prototype property).
* @param result: JSVM_Value representing prototype of the given object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetPrototype(JSVM_Env env,
@@ -997,7 +1057,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetPrototype(JSVM_Env env,
* @param byteOffset: The byte offset within the underlying native array at which the first element of
* the arrays is located. The value for the data parameter has already been adjusted so that data points
* to the first element in the array. Therefore, the first byte of the native array would be at data - byte_offset.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetTypedarrayInfo(JSVM_Env env,
@@ -1019,7 +1080,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetTypedarrayInfo(JSVM_Env env,
* If byte_length is 0, this may be NULL or any other pointer value.
* @param arraybuffer: ArrayBuffer underlying the DataView.
* @param byteOffset: The byte offset within the data buffer from which to start projecting the DataView.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetDataviewInfo(JSVM_Env env,
@@ -1038,7 +1100,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetDataviewInfo(JSVM_Env env,
* @param value: JSVM_Value representing a JavaScript Date.
* @param result: Time value as a double represented as milliseconds
* since midnight at the beginning of 01 January, 1970 UTC.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_DATE_EXPECTED } If a non-date JSVM_Value is passed in it.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetDateValue(JSVM_Env env,
@@ -1051,8 +1115,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetDateValue(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: JSVM_Value representing JavaScript Boolean.
* @param result: C boolean primitive equivalent of the given JavaScript Boolean.
- * @return Returns JSVM_OK if the API succeeded.
- * If a non-boolean JSVM_Value is passed in it returns JSVM_BOOLEAN_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_BOOLEAN_EXPECTED }If a non-boolean JSVM_Value is passed in it.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBool(JSVM_Env env,
@@ -1065,8 +1130,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBool(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: JSVM_Value representing JavaScript number.
* @param result: C double primitive equivalent of the given JavaScript number.
- * @return Returns JSVM_OK if the API succeeded.
- * If a non-number JSVM_Value is passed in it returns JSVM_NUMBER_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueDouble(JSVM_Env env,
@@ -1081,7 +1147,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueDouble(JSVM_Env env,
* @param value: JSVM_Value representing JavaScript BigInt.
* @param result: C int64_t primitive equivalent of the given JavaScript BigInt.
* @param lossless: Indicates whether the BigInt value was converted losslessly.
- * @return Returns JSVM_OK if the API succeeded. If a non-BigInt is passed in it returns JSVM_BIGINT_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_BIGINT_EXPECTED } If a non-BigInt is passed in it.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintInt64(JSVM_Env env,
@@ -1097,7 +1165,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintInt64(JSVM_Env env,
* @param value: JSVM_Value representing JavaScript BigInt.
* @param result: C uint64_t primitive equivalent of the given JavaScript BigInt.
* @param lossless: Indicates whether the BigInt value was converted losslessly.
- * @return Returns JSVM_OK if the API succeeded. If a non-BigInt is passed in it returns JSVM_BIGINT_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_BIGINT_EXPECTED } If a non-BigInt is passed in it.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintUint64(JSVM_Env env,
@@ -1115,7 +1185,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintUint64(JSVM_Env env,
* @param wordCount: Must be initialized to the length of the words array. Upon return, it will be set to
* the actual number of words that would be needed to store this BigInt.
* @param words: Pointer to a pre-allocated 64-bit word array.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintWords(JSVM_Env env,
@@ -1130,7 +1201,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueBigintWords(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: JSVM_Value representing JavaScript external value.
* @param result: Pointer to the data wrapped by the JavaScript external value.
- * @return Returns JSVM_OK if the API succeeded. If a non-external JSVM_Value is passed in it returns JSVM_INVALID_ARG.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_INVALID_ARG } If a non-external JSVM_Value is passed in it.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueExternal(JSVM_Env env,
@@ -1143,7 +1216,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueExternal(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: JSVM_Value representing JavaScript number.
* @param result: C int32 primitive equivalent of the given JavaScript number.
- * @return Returns JSVM_OK if the API succeeded. If a non-number JSVM_Value is passed in JSVM_NUMBER_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueInt32(JSVM_Env env,
@@ -1156,7 +1231,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueInt32(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: JSVM_Value representing JavaScript number.
* @param result: C int64 primitive equivalent of the given JavaScript number.
- * @return Returns JSVM_OK if the API succeeded. If a non-number JSVM_Value is passed in JSVM_NUMBER_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueInt64(JSVM_Env env,
@@ -1173,7 +1250,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueInt64(JSVM_Env env,
* @param bufsize: Size of the destination buffer. When this value is insufficient, the returned string
* is truncated and null-terminated.
* @param result: Number of bytes copied into the buffer, excluding the null terminator.
- * @return Returns JSVM_OK if the API succeeded. If a non-number JSVM_Value is passed in JSVM_NUMBER_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringLatin1(JSVM_Env env,
@@ -1192,7 +1271,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringLatin1(JSVM_Env env,
* @param bufsize: Size of the destination buffer. When this value is insufficient, the returned
* string is truncated and null-terminated.
* @param result: Number of bytes copied into the buffer, excluding the null terminator.
- * @return Returns JSVM_OK if the API succeeded. If a non-number JSVM_Value is passed in JSVM_NUMBER_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf8(JSVM_Env env,
@@ -1211,7 +1292,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf8(JSVM_Env env,
* @param bufsize: Size of the destination buffer. When this value is insufficient,
* the returned string is truncated and null-terminated.
* @param result: Number of 2-byte code units copied into the buffer, excluding the null terminator.
- * @return Returns JSVM_OK if the API succeeded. If a non-number JSVM_Value is passed in JSVM_NUMBER_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf16(JSVM_Env env,
@@ -1226,8 +1309,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf16(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: JSVM_Value representing JavaScript number.
* @param result: C primitive equivalent of the given JSVM_Value as a uint32_t.
- * @return Returns JSVM_OK if the API succeeded.
- * If a non-number JSVM_Value is passed in it returns JSVM_NUMBER_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in it.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetValueUint32(JSVM_Env env,
@@ -1240,7 +1324,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueUint32(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The value of the boolean to retrieve.
* @param result: JSVM_Value representing JavaScript Boolean singleton to retrieve.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetBoolean(JSVM_Env env,
@@ -1252,7 +1337,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetBoolean(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: JSVM_Value representing JavaScript global object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetGlobal(JSVM_Env env,
@@ -1263,7 +1349,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetGlobal(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: JSVM_Value representing JavaScript null object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetNull(JSVM_Env env,
@@ -1274,7 +1361,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetNull(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param result: JSVM_Value representing JavaScript Undefined value.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetUndefined(JSVM_Env env,
@@ -1286,7 +1374,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetUndefined(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to coerce.
* @param result: JSVM_Value representing the coerced JavaScript Boolean.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToBool(JSVM_Env env,
@@ -1300,7 +1389,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToBool(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to coerce.
* @param result: JSVM_Value representing the coerced JavaScript number.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToNumber(JSVM_Env env,
@@ -1313,7 +1403,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToNumber(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to coerce.
* @param result: JSVM_Value representing the coerced JavaScript Object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToObject(JSVM_Env env,
@@ -1327,7 +1418,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToObject(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to coerce.
* @param result: JSVM_Value representing the coerced JavaScript string.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToString(JSVM_Env env,
@@ -1344,7 +1436,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CoerceToString(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value whose type to query.
* @param result: The type of the JavaScript value.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_Typeof(JSVM_Env env,
@@ -1359,7 +1452,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Typeof(JSVM_Env env,
* @param constructor: The JavaScript function object of the constructor function
* to check against.
* @param result: Boolean that is set to true if object instanceof constructor is true.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_Instanceof(JSVM_Env env,
@@ -1373,7 +1467,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Instanceof(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to check.
* @param result: Whether the given object is an array.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsArray(JSVM_Env env,
@@ -1386,7 +1481,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsArray(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to check.
* @param result: Whether the given object is an ArrayBuffer.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsArraybuffer(JSVM_Env env,
@@ -1399,7 +1495,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsArraybuffer(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to check.
* @param result: Whether the given JSVM_Value represents a JavaScript Date object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsDate(JSVM_Env env,
@@ -1412,7 +1509,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsDate(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to check.
* @param result: Whether the given JSVM_Value represents a TypedArray.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsTypedarray(JSVM_Env env,
@@ -1425,7 +1523,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsTypedarray(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript value to check.
* @param result: Whether the given JSVM_Value represents a DataView.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsDataview(JSVM_Env env,
@@ -1439,7 +1538,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsDataview(JSVM_Env env,
* @param lhs: The JavaScript value to check.
* @param rhs: The JavaScript value to check against.
* @param result: Whether the two JSVM_Value objects are equal.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_StrictEquals(JSVM_Env env,
@@ -1455,7 +1555,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_StrictEquals(JSVM_Env env,
* @param lhs: The JavaScript value to check.
* @param rhs: The JavaScript value to check against.
* @param result: Whether the two JSVM_Value objects are relaxed equal.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_Equals(JSVM_Env env,
@@ -1468,8 +1569,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Equals(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param arraybuffer: The JavaScript ArrayBuffer to be detached.
- * @return Returns JSVM_OK if the API succeeded.If a non-detachable ArrayBuffer
- * is passed in it returns JSVM_DETACHABLE_ARRAYBUFFER_EXPECTED.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_DETACHABLE_ARRAYBUFFER_EXPECTED } If a non-detachable ArrayBuffer is passed in it.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DetachArraybuffer(JSVM_Env env,
@@ -1481,7 +1583,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DetachArraybuffer(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript ArrayBuffer to be checked.
* @param result: Whether the arraybuffer is detached.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsDetachedArraybuffer(JSVM_Env env,
@@ -1497,7 +1600,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsDetachedArraybuffer(JSVM_Env env,
* @param result: A JSVM_Value representing an array of JavaScript values that represent
* the property names of the object. The API can be used to iterate over result using
* OH_JSVM_GetArrayLength and OH_JSVM_GetElement.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetPropertyNames(JSVM_Env env,
@@ -1516,7 +1620,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetPropertyNames(JSVM_Env env,
* @param result: result: A JSVM_Value representing an array of JavaScript values
* that represent the property names of the object. OH_JSVM_GetArrayLength and
* OH_JSVM_GetElement can be used to iterate over result.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetAllPropertyNames(JSVM_Env env,
@@ -1533,7 +1638,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetAllPropertyNames(JSVM_Env env,
* @param object: The object on which to set the property.
* @param key: The name of the property to set.
* @param value: The property value.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_SetProperty(JSVM_Env env,
@@ -1548,7 +1654,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetProperty(JSVM_Env env,
* @param object: The object from which to retrieve the property.
* @param key: The name of the property to retrieve.
* @param result: The value of the property.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetProperty(JSVM_Env env,
@@ -1563,7 +1670,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetProperty(JSVM_Env env,
* @param object: The object to query.
* @param key: The name of the property whose existence to check.
* @param result: Whether the property exists on the object or not.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_HasProperty(JSVM_Env env,
@@ -1579,7 +1687,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_HasProperty(JSVM_Env env,
* @param key: The name of the property to delete.
* @param result: Whether the property deletion succeeded or not. result
* can optionally be ignored by passing NULL.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DeleteProperty(JSVM_Env env,
@@ -1596,7 +1705,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DeleteProperty(JSVM_Env env,
* @param object: The object to query.
* @param key: The name of the own property whose existence to check.
* @param result: Whether the own property exists on the object or not.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_HasOwnProperty(JSVM_Env env,
@@ -1612,7 +1722,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_HasOwnProperty(JSVM_Env env,
* @param object: The object on which to set the property.
* @param utf8Name: The name of the property to set.
* @param value: The property value.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_SetNamedProperty(JSVM_Env env,
@@ -1628,7 +1739,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetNamedProperty(JSVM_Env env,
* @param object: The object from which to retrieve the property.
* @param utf8Name: The name of the property to get.
* @param result: The value of the property.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetNamedProperty(JSVM_Env env,
@@ -1644,7 +1756,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetNamedProperty(JSVM_Env env,
* @param object: The object to query.
* @param utf8Name: The name of the property whose existence to check.
* @param result: Whether the property exists on the object or not.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_HasNamedProperty(JSVM_Env env,
@@ -1659,7 +1772,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_HasNamedProperty(JSVM_Env env,
* @param object: The object from which to set the properties.
* @param index: The index of the property to set.
* @param value: The property value.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_SetElement(JSVM_Env env,
@@ -1674,7 +1788,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_SetElement(JSVM_Env env,
* @param object: The object from which to retrieve the property.
* @param index: The index of the property to get.
* @param result: The value of the property.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetElement(JSVM_Env env,
@@ -1690,7 +1805,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetElement(JSVM_Env env,
* @param object: The object to query.
* @param index: The index of the property whose existence to check.
* @param result: Whether the property exists on the object or not.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_HasElement(JSVM_Env env,
@@ -1706,7 +1822,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_HasElement(JSVM_Env env,
* @param index: The index of the property to delete.
* @param result: Whether the element deletion succeeded or not. result
* can optionally be ignored by passing NULL.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DeleteElement(JSVM_Env env,
@@ -1724,7 +1841,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DeleteElement(JSVM_Env env,
* @param object: The object from which to retrieve the properties.
* @param propertyCount: The number of elements in the properties array.
* @param properties: The array of property descriptors.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DefineProperties(JSVM_Env env,
@@ -1741,7 +1859,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DefineProperties(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param object: The object to freeze.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ObjectFreeze(JSVM_Env env,
@@ -1753,7 +1872,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ObjectFreeze(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param object: The object to seal.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ObjectSeal(JSVM_Env env,
@@ -1770,7 +1890,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ObjectSeal(JSVM_Env env,
* @param argc: The count of elements in the argv array.
* @param argv: Array of JSVM_values representing JavaScript values passed in as arguments to the function.
* @param result: JSVM_Value representing the JavaScript object returned.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CallFunction(JSVM_Env env,
@@ -1797,7 +1918,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CallFunction(JSVM_Env env,
* object is invoked and data. JSVM_Callback provides more details.
* @param result: JSVM_Value representing the JavaScript function object for the newly
* created function.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateFunction(JSVM_Env env,
@@ -1823,7 +1945,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateFunction(JSVM_Env env,
* can optionally be ignored by passing NULL.
* @param data: Receives the data pointer for the callback. data can optionally
* be ignored by passing NULL.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetCbInfo(JSVM_Env env,
@@ -1840,7 +1963,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetCbInfo(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param cbinfo: The callback info passed into the callback function.
* @param result: The new.target of the constructor call.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetNewTarget(JSVM_Env env,
@@ -1858,7 +1982,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetNewTarget(JSVM_Env env,
* the constructor. If argc is zero this parameter may be omitted by passing in NULL.
* @param result: JSVM_Value representing the JavaScript object returned, which
* in this case is the constructed object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_NewInstance(JSVM_Env env,
@@ -1886,7 +2011,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_NewInstance(JSVM_Env env,
* @param properties: Array of property descriptors describing static and instance data
* properties, accessors, and methods on the class See JSVM_PropertyDescriptor.
* @param result: A JSVM_Value representing the constructor function for the class.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DefineClass(JSVM_Env env,
@@ -1909,7 +2035,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DefineClass(JSVM_Env env,
* @param finalizeHint: Optional contextual hint that is passed to the finalize callback.
* properties, accessors, and methods on the class See JSVM_PropertyDescriptor.
* @param result: Optional reference to the wrapped object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_Wrap(JSVM_Env env,
@@ -1928,7 +2055,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Wrap(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param jsObject: The object associated with the native instance.
* @param result: Pointer to the wrapped native instance.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_Unwrap(JSVM_Env env,
@@ -1943,7 +2071,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_Unwrap(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param jsObject: The object associated with the native instance.
* @param result: Pointer to the wrapped native instance.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_RemoveWrap(JSVM_Env env,
@@ -1959,7 +2088,9 @@ JSVM_EXTERN JSVM_Status OH_JSVM_RemoveWrap(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The JavaScript object or external to be marked.
* @param typeTag: The tag with which the object is to be marked.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
+ * {@link JSVM_INVALID_ARG } If the object already has an associated type tag.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_TypeTagObject(JSVM_Env env,
@@ -1976,7 +2107,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_TypeTagObject(JSVM_Env env,
* @param typeTag: The tag with which to compare any tag found on the object.
* @param result: Whether the type tag given matched the type tag on the object. false is also returned
* if no type tag was found on the object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CheckObjectTypeTag(JSVM_Env env,
@@ -1994,7 +2126,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CheckObjectTypeTag(JSVM_Env env,
* JavaScript object has been garbage-collected. JSVM_Finalize provides more details.
* @param finalizeHint: Optional contextual hint that is passed to the finalize callback.
* @param result: Optional reference to the JavaScript object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_AddFinalizer(JSVM_Env env,
@@ -2013,7 +2146,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_AddFinalizer(JSVM_Env env,
* versions that don't support it.
* @param env: The environment that the API is invoked under.
* @param result: The highest version of JSVM-API supported.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetVersion(JSVM_Env env,
@@ -2023,7 +2157,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetVersion(JSVM_Env env,
* @brief Return information of the VM.
*
* @param result: The information of the VM.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_GetVMInfo(JSVM_VMInfo* result);
@@ -2039,7 +2174,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetVMInfo(JSVM_VMInfo* result);
* @param changeInBytes: The change in externally allocated memory that is kept
* alive by JavaScript objects.
* @param result: The adjusted value
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_AdjustExternalMemory(JSVM_Env env,
@@ -2052,7 +2188,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_AdjustExternalMemory(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param level: The memory pressure level set to the current VM.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_MemoryPressureNotification(JSVM_Env env,
@@ -2066,7 +2203,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_MemoryPressureNotification(JSVM_Env env,
* passed to OH_JSVM_ResolveDeferred() or OH_JSVM_RejectDeferred() to resolve
* resp. reject the associated promise.
* @param promise: The JavaScript promise associated with the deferred object.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreatePromise(JSVM_Env env,
@@ -2083,7 +2221,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreatePromise(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param deferred: The deferred object whose associated promise to resolve.
* @param resolution: The value with which to resolve the promise.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ResolveDeferred(JSVM_Env env,
@@ -2100,7 +2239,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ResolveDeferred(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param deferred: The deferred object whose associated promise to resolve.
* @param rejection: The value with which to reject the promise.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_RejectDeferred(JSVM_Env env,
@@ -2112,7 +2252,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_RejectDeferred(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param value: The value to examine
* @param isPromise: Flag indicating whether promise is a native promise object
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsPromise(JSVM_Env env,
@@ -2124,7 +2265,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsPromise(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param jsonString: The string to parse.
* @param result: The parse value if successful.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_JsonParse(JSVM_Env env,
@@ -2136,7 +2278,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_JsonParse(JSVM_Env env,
* @param env: The environment that the API is invoked under.
* @param jsonObject: The object to stringify.
* @param result: The string if successfully stringified.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_JsonStringify(JSVM_Env env,
@@ -2150,7 +2293,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_JsonStringify(JSVM_Env env,
* @param contexts: The array of contexts to add to the snapshot.
* @param blobData: The snapshot data.
* @param blobSize: The size of snapshot data.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 11
*/
JSVM_EXTERN JSVM_Status OH_JSVM_CreateSnapshot(JSVM_VM vm,
@@ -2263,7 +2407,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_WaitForDebugger(JSVM_Env env,
* @param propertyHandlerCfg: The instance object triggers the corresponding callback function.
* @param callAsFunctionCallback: Calling an instance object as a function will trigger this callback.
* @param result: A JSVM_Value representing the constructor function for the class.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_DefineClassWithPropertyHandler(JSVM_Env env,
@@ -2282,7 +2427,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_DefineClassWithPropertyHandler(JSVM_Env env,
*
* @param env: The environment that the API is invoked under.
* @param isLocked: Flag indicating whether the current thread holds the lock for the specified environment.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsLocked(JSVM_Env env,
@@ -2292,7 +2438,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsLocked(JSVM_Env env,
* @brief Acquire the lock for the specified environment. Only threads that hold locks can use the environment.
*
* @param env: The environment that the API is invoked under.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_AcquireLock(JSVM_Env env);
@@ -2301,7 +2448,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_AcquireLock(JSVM_Env env);
* @brief Release the lock for the specified environment. Only threads that hold locks can use the environment.
*
* @param env: The environment that the API is invoked under.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_ReleaseLock(JSVM_Env env);
@@ -2312,7 +2460,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_ReleaseLock(JSVM_Env env);
*
* @param env: The VM instance on which to start the task queue.
* @param result: Whether the task queue was successfully started.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_PumpMessageLoop(JSVM_VM vm,
@@ -2322,7 +2471,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_PumpMessageLoop(JSVM_VM vm,
* @brief Check to see if there are any microtasks waiting in the queue, and if there are, execute them.
*
* @param env: The VM instance on which to check microtasks.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_PerformMicrotaskCheckpoint(JSVM_VM vm);
@@ -2333,7 +2483,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_PerformMicrotaskCheckpoint(JSVM_VM vm);
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isCallable: Whether the given value is callable.
- * @return Returns JSVM_OK if the API succeeded.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } If the API succeeded.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsCallable(JSVM_Env env,
@@ -2347,7 +2498,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsCallable(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isUndefined: Whether the given value is Undefined.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsUndefined(JSVM_Env env,
@@ -2361,7 +2513,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsUndefined(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isNull: Whether the given value is Null.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsNull(JSVM_Env env,
@@ -2375,7 +2528,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsNull(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isNullOrUndefined: Whether the given value is Null or Undefined.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsNullOrUndefined(JSVM_Env env,
@@ -2389,7 +2543,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsNullOrUndefined(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isBoolean: Whether the given value is Boolean.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsBoolean(JSVM_Env env,
@@ -2403,7 +2558,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsBoolean(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isNumber: Whether the given value is Number.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsNumber(JSVM_Env env,
@@ -2417,7 +2573,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsNumber(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isString: Whether the given value is String.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsString(JSVM_Env env,
@@ -2431,7 +2588,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsString(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isSymbol: Whether the given value is Symbol.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsSymbol(JSVM_Env env,
@@ -2445,7 +2603,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsSymbol(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isFunction: Whether the given value is Function.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsFunction(JSVM_Env env,
@@ -2458,7 +2617,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsFunction(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isObject: Whether the given value is Object.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsObject(JSVM_Env env,
@@ -2472,7 +2632,8 @@ JSVM_EXTERN JSVM_Status OH_JSVM_IsObject(JSVM_Env env,
* @param env: The VM instance on which to check microtasks.
* @param value: The JavaScript value to check.
* @param isBigInt: Whether the given value is BigInt.
- * @return Only returns JSVM_OK, because this API will not trigger any exception.
+ * @return Only returns JSVM funtions result code.
+ * {@link JSVM_OK } This API will not trigger any exception.\n
* @since 12
*/
JSVM_EXTERN JSVM_Status OH_JSVM_IsBigInt(JSVM_Env env,
diff --git a/arkui/ace_engine/native/BUILD.gn b/arkui/ace_engine/native/BUILD.gn
index 024c38820107138ac373d6bccaeac3e9c1ce87fc..46ff70046e603d3ad39f46f20e6d960b1da4905e 100644
--- a/arkui/ace_engine/native/BUILD.gn
+++ b/arkui/ace_engine/native/BUILD.gn
@@ -34,6 +34,7 @@ if (!is_arkui_x) {
"native_node.h",
"native_node_napi.h",
"native_type.h",
+ "styled_string.h",
"ui_input_event.h",
]
}
diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json
index e880238e0011ec4f2d59c2b1648313421234daab..c7a351af811460bd109eb9fac33d8116f0525842 100644
--- a/arkui/ace_engine/native/libace.ndk.json
+++ b/arkui/ace_engine/native/libace.ndk.json
@@ -615,6 +615,10 @@
"first_introduced": "12",
"name": "OH_ArkUI_WaterFlowSectionOption_SetMargin"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_WaterFlowSectionOption_GetSize"
+ },
{
"first_introduced": "12",
"name": "OH_ArkUI_WaterFlowSectionOption_GetItemCount"
@@ -635,6 +639,14 @@
"first_introduced": "12",
"name": "OH_ArkUI_WaterFlowSectionOption_GetMargin"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData"
+ },
{
"first_introduced": "12",
"name": "OH_ArkUI_AnimateOption_Create"
@@ -1058,5 +1070,177 @@
{
"first_introduced": "12",
"name": "OH_ArkUI_GetDrawableDescriptorFromResourceNapiValue"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_Destroy"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_PushTextStyle"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_AddText"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_PopTextStyle"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_CreateTypography"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_AddPlaceholder"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_Dispose"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetContent"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnAction"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_Dispose"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetStart"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetEnd"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetLayoutSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetLayoutPosition"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetLayoutPositionInWindow"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetLayoutPositionInScreen"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_Dispose"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_Resize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_Splice"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_UpdateSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_GetMainSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_List_CloseAllSwipeActions"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData"
}
]
\ No newline at end of file
diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h
index fbafc396fba73d771c4b67c49591091af895dfdd..dfef24f5e2479b71163bd58ba3a7cdb7e8764333 100644
--- a/arkui/ace_engine/native/native_animate.h
+++ b/arkui/ace_engine/native/native_animate.h
@@ -76,7 +76,9 @@ typedef struct {
* @param update Indicates the animation closure. The system automatically inserts a transition animation
* for the state change caused by the closure.
* @param complete Indicates the callback to be invoked when the animation playback is complete.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*animateTo)(ArkUI_ContextHandle context, ArkUI_AnimateOption* option, ArkUI_ContextCallback* update,
ArkUI_AnimateCompleteCallback* complete);
diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h
index 73e35a6b2e9aae403790a976761567299495fd71..efa5cf998d40a96f9d8ff846d0c4d73d68115895 100644
--- a/arkui/ace_engine/native/native_dialog.h
+++ b/arkui/ace_engine/native/native_dialog.h
@@ -67,7 +67,9 @@ typedef struct {
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
* @param content Indicates the pointer to the root node of the custom dialog box content.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setContent)(ArkUI_NativeDialogHandle handle, ArkUI_NodeHandle content);
/**
@@ -75,7 +77,9 @@ typedef struct {
*
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*removeContent)(ArkUI_NativeDialogHandle handle);
/**
@@ -86,7 +90,9 @@ typedef struct {
* @param alignment Indicates the alignment mode. The parameter type is {@link ArkUI_Alignment}.
* @param offsetX Indicates the horizontal offset of the custom dialog box. The value is a floating point number.
* @param offsetY Indicates the vertical offset of the custom dialog box. The value is a floating point number.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setContentAlignment)(ArkUI_NativeDialogHandle handle, int32_t alignment, float offsetX, float offsetY);
/**
@@ -94,7 +100,9 @@ typedef struct {
*
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*resetContentAlignment)(ArkUI_NativeDialogHandle handle);
/**
@@ -104,7 +112,9 @@ typedef struct {
* @param handle Indicates the pointer to the custom dialog box controller.
* @param isModal Specifies whether the custom dialog box is a modal, which has a mask applied. The value
* true means that the custom dialog box is a modal, and false means the opposite.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setModalMode)(ArkUI_NativeDialogHandle handle, bool isModal);
/**
@@ -114,7 +124,9 @@ typedef struct {
* @param handle Indicates the pointer to the custom dialog box controller.
* @param autoCancel Specifies whether to allow users to touch the mask to dismiss the dialog box.
* The value true means to allow users to do so, and false means the opposite.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setAutoCancel)(ArkUI_NativeDialogHandle handle, bool autoCancel);
/**
@@ -125,7 +137,9 @@ typedef struct {
* @param maskColor Indicates the mask color, in 0xARGB format.
* @param maskRect Indicates the pointer to the mask area. Events outside the mask area are transparently
* transmitted, and events within the mask area are not. The parameter type is {@link ArkUI_Rect}.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setMask)(ArkUI_NativeDialogHandle handle, uint32_t maskColor, const ArkUI_Rect* maskRect);
/**
@@ -134,7 +148,9 @@ typedef struct {
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
* @param backgroundColor Indicates the background color of the custom dialog box, in 0xARGB format.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setBackgroundColor)(ArkUI_NativeDialogHandle handle, uint32_t backgroundColor);
/**
@@ -146,7 +162,9 @@ typedef struct {
* @param topRight Indicates the radius of the upper right corner of the custom dialog box background.
* @param bottomLeft Indicates the radius of the lower left corner of the custom dialog box background.
* @param bottomRight Indicates the radius of the lower right corner of the custom dialog box background.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setCornerRadius)(ArkUI_NativeDialogHandle handle, float topLeft, float topRight,
float bottomLeft, float bottomRight);
@@ -157,7 +175,9 @@ typedef struct {
* @param handle Indicates the pointer to the custom dialog box controller.
* @param gridCount Indicates the number of grid columns occupied by the dialog box. The default value is subject to
* the window size, and the maximum value is the maximum number of columns supported by the system.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setGridColumnCount)(ArkUI_NativeDialogHandle handle, int32_t gridCount);
/**
@@ -170,7 +190,9 @@ typedef struct {
* the background color is transparent.
* false: The dialog box automatically adapts its width to the grid system and its height to the child
* components; the rounded corner is 24 vp.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*enableCustomStyle)(ArkUI_NativeDialogHandle handle, bool enableCustomStyle);
/**
@@ -180,7 +202,9 @@ typedef struct {
* @param handle Indicates the pointer to the custom dialog box controller.
* @param enableCustomAnimation Specifies whether to use a custom animation. The value true means to use a
* custom animation, and false means to use the default animation.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*enableCustomAnimation)(ArkUI_NativeDialogHandle handle, bool enableCustomAnimation);
/**
@@ -190,7 +214,9 @@ typedef struct {
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
* @param eventHandler Indicates the callback to register. The parameter type is {@link ArkUI_OnWillDismissEvent}.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*registerOnWillDismiss)(ArkUI_NativeDialogHandle handle, ArkUI_OnWillDismissEvent eventHandler);
/**
@@ -198,14 +224,18 @@ typedef struct {
*
* @param handle Indicates the pointer to the custom dialog box controller.
* @param showInSubWindow Specifies whether to show the dialog box in a sub-window.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*show)(ArkUI_NativeDialogHandle handle, bool showInSubWindow);
/**
* @brief Closes a custom dialog box. If the dialog box has been closed, this API does not take effect.
*
* @param handle Indicates the pointer to the custom dialog box controller.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*close)(ArkUI_NativeDialogHandle handle);
} ArkUI_NativeDialogAPI_1;
diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h
index c907822ec9b245f1156f6ee1d4cf65ba75beae21..bff9710350ab25633ec5ecc093f33b93417872ef 100644
--- a/arkui/ace_engine/native/native_interface_xcomponent.h
+++ b/arkui/ace_engine/native/native_interface_xcomponent.h
@@ -632,8 +632,9 @@ int32_t OH_NativeXComponent_UnregisterOnFrameCallback(OH_NativeXComponent* compo
*
* @param component Indicates the pointer to the OH_NativeXComponent instance.
* @param root Indicates the pointer to the component instance created by the native API.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*
* @since 12
*/
@@ -644,8 +645,9 @@ int32_t OH_NativeXComponent_AttachNativeRootNode(OH_NativeXComponent* component,
*
* @param component Indicates the pointer to the OH_NativeXComponent instance.
* @param root Indicates the pointer to the component instance created by the native API.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*
* @since 12
*/
@@ -658,8 +660,9 @@ int32_t OH_NativeXComponent_DetachNativeRootNode(OH_NativeXComponent* component,
* @param component Indicates the pointer to the OH_NativeXComponent instance.
* @param callback Indicates the pointer to the UI input event callback.
* @param type Indicates the type of the current UI input event.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_NativeXComponent_RegisterUIInputEventCallback(
@@ -709,8 +712,9 @@ int32_t OH_NativeXComponent_RegisterSurfaceHideCallback(
*
* @param component Indicates the pointer to the OH_NativeXComponent instance.
* @param callback Indicates the pointer to the custom event intercept callback.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_NativeXComponent_RegisterOnTouchInterceptCallback(
diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h
index 2e089f3e4f4450068d8e54293efeabd2cc7c6fe9..35486e7cd6c90082522d0a53ef479913c09c1597 100644
--- a/arkui/ace_engine/native/native_node.h
+++ b/arkui/ace_engine/native/native_node.h
@@ -1603,6 +1603,19 @@ typedef enum {
*/
NODE_LAYOUT_RECT,
+ /**
+ * @brief Whether the current component supports click-to-focus capability,
+ * which can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .value[0].i32: The parameter type is 1 or 0.
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].i32: The parameter type is 1 or 0.
+ *
+ */
+ NODE_FOCUS_ON_TOUCH,
+
/**
* @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
*
@@ -1952,6 +1965,18 @@ typedef enum {
*/
NODE_TEXT_SELECTED_BACKGROUND_COLOR,
+ /**
+ * @brief The text component uses a formatted string object to set text content properties,
+ * and supports property setting, property reset, and property acquisition interfaces.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .object indicates ArkUI_StyledString formatted string data. The parameter type is {@link ArkUI_StyledString}. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .object indicates ArkUI_StyledString formatted string data. The parameter type is {@link ArkUI_StyledString}. \n
+ */
+ NODE_TEXT_CONTENT_WITH_STYLED_STRING,
+
/**
* @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
*
@@ -1985,6 +2010,18 @@ typedef enum {
*
*/
NODE_SPAN_TEXT_BACKGROUND_STYLE,
+ /**
+ * @brief Defines the text baseline offset attribute
+ * This attribute can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .value[0].f32: baseline offset, in fp.\n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: baseline offset, in fp. \n
+ *
+ */
+ NODE_SPAN_BASELINE_OFFSET,
/**
* @brief Defines the image source of the image span.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -2013,6 +2050,20 @@ typedef enum {
*
*/
NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT,
+ /**
+ * @brief Defines the placeholder image source.
+ * This attribute can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .string: placeholder image source. \n
+ * .object: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .string: placeholder image source. \n
+ * .object: The parameter type is {@link ArkUI_DrawableDescriptor}.\n
+ *
+ */
+ NODE_IMAGE_SPAN_ALT,
/**
* @brief Defines the image source of the component.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -2094,9 +2145,11 @@ typedef enum {
*
* Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
* .string: placeholder image source. \n
+ * .object: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n
* \n
* Format of the return value {@link ArkUI_AttributeItem}:\n
* .string: placeholder image source. \n
+ * .object: The parameter type is {@link ArkUI_DrawableDescriptor}.\n
*
*/
NODE_IMAGE_ALT,
@@ -4179,6 +4232,17 @@ typedef enum {
*/
NODE_LIST_ALIGN_LIST_ITEM,
+ /**
+ * @brief Set the default spindle size for the List subcomponent.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .object: The parameter format is {@ ArkUI-ListChildrenMainSize} \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .object: The parameter format is {@ ArkUI-ListChildrenMainSize} \n
+ */
+ NODE_LIST_CHILDREN_MAIN_SIZE = 1003007,
+
/**
* @brief Defines whether to enable loop playback for the swiper.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -4444,6 +4508,19 @@ typedef enum {
*/
NODE_SWIPER_SWIPE_TO_INDEX,
+ /**
+ * @brief: Set the delineation component of the ListItem, supporting property settings, property resets, and
+ * property acquisition interfaces.
+ *
+ * Attribute setting method parameter {@link ArkUI_AttributeItem} format: \n
+ * .object: Construct using the {@link ArkUI_ListitemSwipeActionOption} object. \n
+ * \n
+ * The return value of the attribute acquisition method {@link ArkUI_AttributeItem} format: \n
+ * .object: Construct using the {@link ArkUI_ListitemSwipeActionOption} object. \n
+ *
+ */
+ NODE_LIST_ITEM_SWIPE_ACTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST_ITEM,
+
/**
* @brief Defines the header of the list item group.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -4487,6 +4564,17 @@ typedef enum {
*/
NODE_LIST_ITEM_GROUP_SET_DIVIDER,
+ /**
+ * @brief Set the default spindle size for the ListItem Group subcomponent.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .object: The parameter format is {@ ArkUI-ListChildrenMainSize} \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .object: The parameter format is {@ ArkUI-ListChildrenMainSize} \n
+ */
+ NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE = 1005003,
+
/**
* @brief Defines the horizontal alignment mode of child components in the column.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -4593,6 +4681,18 @@ typedef enum {
*
*/
NODE_REFRESH_CONTENT,
+ /**
+ * @brief Set the pull-down hand coefficient.
+ * This attribute can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .value[0].f32:Pull-down hand coefficient, valid value between 0 and 1.
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32:Pull-down hand coefficient, valid value between 0 and 1.
+ *
+ */
+ NODE_REFRESH_PULL_DOWN_RATIO = 1009002,
/**
* @brief Defines the main axis direction of the component layout.
@@ -5026,6 +5126,24 @@ typedef enum {
* {@link ArkUI_UIInputEvent}. \n
*/
NODE_ON_MOUSE,
+ /**
+ * @brief Defines the attach event.
+ *
+ * This event is triggered when the component is attached. \n
+ * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is
+ * {@link ArkUI_NodeComponentEvent}. \n
+ * {@link ArkUI_NodeComponentEvent} does not contain parameters.
+ */
+ NODE_EVENT_ON_ATTACH,
+ /**
+ * @brief Defines the detach event.
+ *
+ * This event is triggered when the component is detached. \n
+ * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is
+ * {@link ArkUI_NodeComponentEvent}. \n
+ * {@link ArkUI_NodeComponentEvent} does not contain parameters.
+ */
+ NODE_EVENT_ON_DETACH,
/**
* @brief Triggers onDetectResultUpdate callback
@@ -5438,6 +5556,32 @@ typedef enum {
*/
NODE_SWIPER_EVENT_ON_GESTURE_SWIPE,
+ /**
+ * @brief Define the ARKUI_NODE_SWIPER to listen for Swiper page slide events.
+ * Instruction: \n
+ * 1. If the {@link ArkUI_SwiperDisplayModeType} attribute is set to \n
+ * ARKUI_SWIPER_DISPLAY_MODE_AUTO_LINEAR, the interface does not take effect. \n
+ * 2, circular scenario, set prevMargin and nextMargin attributes, \n
+ * so that Swiper front and back end display the same page, the interface does not take effect. \n
+ * 3. During page sliding, the ContentDidScrollCallback callback is \n
+ * triggered frame-by-frame for all pages in the window. \n
+ * For example, when there are two pages in the window with subscripts 0 and 1, \n
+ * callbacks with index values 0 and 1 are triggered twice per frame. \n
+ * 4, set the swipeByGroup parameter of the displayCount property to \n
+ * true if at least one page in the same group is in the window, \n
+ * A callback is triggered for all pages in the group. \n
+ * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is
+ * {@link ArkUI_NodeComponentEvent}. \n
+ * {@link ArkUI_NodeComponentEvent} contains four parameters:\n
+ * ArkUI_NodeComponentEvent.data[0].i32 : indicates the index of the Swiper component, \n
+ * which is consistent with the index change in the onChange event. \n
+ * ArkUI_NodeComponentEvent.data[1].i32 : The index of a page in the window. \n
+ * ArkUI_NodeComponentEvent.data[2].f32 : The proportion of page movement relative to \n
+ * the start position of the Swiper spindle (selectedIndex corresponds to the start position of the page). \n
+ * ArkUI_NodeComponentEvent.data[3].f32 : The length of the page in the axis direction. \n
+ */
+ NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL,
+
/**
* @brief Defines the event triggered when the ARKUI_NODE_SCROLL component scrolls.
*
@@ -5637,6 +5781,16 @@ typedef enum {
*/
NODE_REFRESH_ON_REFRESH,
+ /**
+ * @brief Defines the event that is triggered when the ARKUI_NODE_REFRESH drop-down distance changes.
+ *
+ * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is
+ * {@link ArkUI_NodeComponentEvent}. \n
+ * {@link ArkUI_NodeComponentEvent} contains one parameter:\n
+ * ArkUI_NodeComponentEvent.data[0].f32: Pull-down distance. \n
+ */
+ NODE_REFRESH_ON_OFFSET_CHANGE,
+
/**
* @brief Defines the event triggered when the ARKUI_NODE_SCROLL component is about to scroll.
*
@@ -5857,8 +6011,9 @@ void OH_ArkUI_NodeAdapter_Dispose(ArkUI_NodeAdapterHandle handle);
*
* @param handle Indicates the target component adapter.
* @param size Indicates the number of elements.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_SetTotalNodeCount(ArkUI_NodeAdapterHandle handle, uint32_t size);
@@ -5878,8 +6033,9 @@ uint32_t OH_ArkUI_NodeAdapter_GetTotalNodeCount(ArkUI_NodeAdapterHandle handle);
* @param handle Indicates the target component adapter.
* @param userData Indicates custom data.
* @param receiver Indicates the event receiver callback.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_RegisterEventReceiver(
@@ -5897,8 +6053,9 @@ void OH_ArkUI_NodeAdapter_UnregisterEventReceiver(ArkUI_NodeAdapterHandle handle
* @brief Instructs the specified adapter to reload all elements.
*
* @param handle Indicates the target component adapter.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_ReloadAllItems(ArkUI_NodeAdapterHandle handle);
@@ -5909,8 +6066,9 @@ int32_t OH_ArkUI_NodeAdapter_ReloadAllItems(ArkUI_NodeAdapterHandle handle);
* @param handle Indicates the target component adapter.
* @param startPosition Indicates the start position of the elements to reload.
* @param itemCount Indicates the number of the elements to reload.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_ReloadItem(
@@ -5922,8 +6080,9 @@ ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount);
* @param handle Indicates the target component adapter.
* @param startPosition Indicates the start position of the elements to remove.
* @param itemCount Indicates the number of the elements to remove.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_RemoveItem(
@@ -5935,8 +6094,9 @@ ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount);
* @param handle Indicates the target component adapter.
* @param startPosition Indicates the start position of the elements to insert.
* @param itemCount Indicates the number of the elements to insert.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_InsertItem(
@@ -5948,8 +6108,9 @@ ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount);
* @param handle Indicates the target component adapter.
* @param from Indicates the start position of the elements to move.
* @param to Indicates the end position of the elements to move.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_MoveItem(ArkUI_NodeAdapterHandle handle, uint32_t from, uint32_t to);
@@ -5963,8 +6124,9 @@ int32_t OH_ArkUI_NodeAdapter_MoveItem(ArkUI_NodeAdapterHandle handle, uint32_t f
* @param handle Indicates the target component adapter.
* @param items Indicates the pointer to the array of the elements in the adapter.
* @param size Indicates the number of elements.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_GetAllItems(ArkUI_NodeAdapterHandle handle, ArkUI_NodeHandle** items, uint32_t* size);
@@ -6008,8 +6170,9 @@ uint32_t OH_ArkUI_NodeAdapterEvent_GetItemIndex(ArkUI_NodeAdapterEvent* event);
* @brief Obtains the scrollable container node that uses the specified adapter.
*
* @param event Indicates the target adapter event.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
ArkUI_NodeHandle OH_ArkUI_NodeAdapterEvent_GetHostNode(ArkUI_NodeAdapterEvent* event);
@@ -6019,7 +6182,9 @@ ArkUI_NodeHandle OH_ArkUI_NodeAdapterEvent_GetHostNode(ArkUI_NodeAdapterEvent* e
*
* @param event Indicates the target adapter event.
* @param node Indicates the component to be added.
-* @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapterEvent_SetItem(ArkUI_NodeAdapterEvent* event, ArkUI_NodeHandle node);
@@ -6029,7 +6194,9 @@ int32_t OH_ArkUI_NodeAdapterEvent_SetItem(ArkUI_NodeAdapterEvent* event, ArkUI_N
*
* @param event Indicates the target adapter event.
* @param id Indicates the component ID to set.
-* @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapterEvent_SetNodeId(ArkUI_NodeAdapterEvent* event, int32_t id);
@@ -6066,10 +6233,12 @@ typedef struct {
*
* @param parent Indicates the pointer to the parent node.
* @param child Indicates the pointer to the child node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*addChild)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child);
@@ -6078,10 +6247,12 @@ typedef struct {
*
* @param parent Indicates the pointer to the parent node.
* @param child Indicates the pointer to the child node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*removeChild)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child);
@@ -6092,10 +6263,12 @@ typedef struct {
* @param child Indicates the pointer to the child node.
* @param sibling Indicates the pointer to the sibling node after which the target node is to be inserted.
* If the value is null, the node is inserted at the start of the parent node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*insertChildAfter)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child, ArkUI_NodeHandle sibling);
@@ -6106,10 +6279,12 @@ typedef struct {
* @param child Indicates the pointer to the child node.
* @param sibling Indicates the pointer to the sibling node before which the target node is to be inserted.
* If the value is null, the node is inserted at the end of the parent node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*insertChildBefore)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child, ArkUI_NodeHandle sibling);
@@ -6120,10 +6295,12 @@ typedef struct {
* @param child Indicates the pointer to the child node.
* @param position Indicates the position to which the target child node is to be inserted. If the value is a
* negative number or invalid, the node is inserted at the end of the parent node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*insertChildAt)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child, int32_t position);
@@ -6133,11 +6310,14 @@ typedef struct {
* @param node Indicates the node whose attribute needs to be set.
* @param attribute Indicates the type of attribute to set.
* @param value Indicates the attribute value.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106102 if the dynamic implementation library of the native API was not found.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} if the dynamic implementation library
+ * of the native API was not found.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*setAttribute)(ArkUI_NodeHandle node, ArkUI_NodeAttributeType attribute, const ArkUI_AttributeItem* item);
@@ -6158,11 +6338,14 @@ typedef struct {
*
* @param node Indicates the node whose attribute needs to be reset.
* @param attribute Indicates the type of attribute to reset.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106102 if the dynamic implementation library of the native API was not found.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} if the dynamic implementation library
+ * of the native API was not found.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*resetAttribute)(ArkUI_NodeHandle node, ArkUI_NodeAttributeType attribute);
@@ -6176,11 +6359,14 @@ typedef struct {
* @param targetId Indicates the custom event ID, which is passed in the callback of {@link ArkUI_NodeEvent}
* when the event is triggered.
* @param userData Indicates the custom event parameter, which is passed in the callback of {@link ArkUI_NodeEvent}
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106102 if the dynamic implementation library of the native API was not found.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} if the dynamic implementation library
+ * of the native API was not found.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*registerNodeEvent)(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType,
int32_t targetId, void* userData);
@@ -6229,8 +6415,9 @@ typedef struct {
* @brief Obtains the number of subnodes.
*
* @param node Indicates the target node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
uint32_t (*getTotalChildCount)(ArkUI_NodeHandle node);
@@ -6285,9 +6472,11 @@ typedef struct {
* when the event is triggered.
* @param userData Indicates the custom event parameter, which is passed in the callback of
* {@link ArkUI_NodeCustomEvent} when the event is triggered.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106102 if the dynamic implementation library of the native API was not found.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} if the dynamic implementation library
+ * of the native API was not found.
*/
int32_t (*registerNodeCustomEvent)(
ArkUI_NodeHandle node, ArkUI_NodeCustomEventType eventType, int32_t targetId, void* userData);
@@ -6326,8 +6515,9 @@ typedef struct {
* @param node Indicates the target node.
* @param width Indicates the width.
* @param height Indicates the height.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*setMeasuredSize)(ArkUI_NodeHandle node, int32_t width, int32_t height);
@@ -6337,8 +6527,9 @@ typedef struct {
* @param node Indicates the target node.
* @param positionX Indicates the X coordinate.
* @param positionY Indicates the Y coordinate.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*setLayoutPosition)(ArkUI_NodeHandle node, int32_t positionX, int32_t positionY);
@@ -6363,8 +6554,9 @@ typedef struct {
*
* @param node Indicates the target node.
* @param Constraint Indicates the size constraint.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*measureNode)(ArkUI_NodeHandle node, ArkUI_LayoutConstraint* Constraint);
@@ -6376,8 +6568,9 @@ typedef struct {
* @param node Indicates the target node.
* @param positionX Indicates the X coordinate.
* @param positionY Indicates the Y coordinate.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*layoutNode)(ArkUI_NodeHandle node, int32_t positionX, int32_t positionY);
@@ -6394,8 +6587,9 @@ typedef struct {
*
* @param node Indicates the component for which you want to add the event callback function.
* @param eventReceiver Indicates the component event callback function to add.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*addNodeEventReceiver)(ArkUI_NodeHandle node, void (*eventReceiver)(ArkUI_NodeEvent* event));
@@ -6404,8 +6598,9 @@ typedef struct {
*
* @param node Indicates the component from which you want to remove the event callback function.
* @param eventReceiver Indicates the component event callback function to remove.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*removeNodeEventReceiver)(ArkUI_NodeHandle node, void (*eventReceiver)(ArkUI_NodeEvent* event));
@@ -6422,8 +6617,9 @@ typedef struct {
*
* @param node Indicates the component for which you want to add the custom event callback function.
* @param eventReceiver Indicates the custom event callback function to add.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*addNodeCustomEventReceiver)(ArkUI_NodeHandle node, void (*eventReceiver)(ArkUI_NodeCustomEvent* event));
@@ -6432,8 +6628,9 @@ typedef struct {
*
* @param node Indicates the component from which you want to remove the custom event callback function.
* @param eventReceiver Indicates the custom event callback function to remove.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*removeNodeCustomEventReceiver)(ArkUI_NodeHandle node,
void (*eventReceiver)(ArkUI_NodeCustomEvent* event));
@@ -6443,8 +6640,9 @@ typedef struct {
*
* @param node Indicates the component on which the custom data will be saved.
* @param userData Indicates the custom data to be saved.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*setUserData)(ArkUI_NodeHandle node, void* userData);
@@ -6462,7 +6660,9 @@ typedef struct {
* @param node Indicates the component for which you want to set the unit.
* @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit}.
* The default value is ARKUI_LENGTH_METRIC_UNIT_DEFAULT.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setLengthMetricUnit)(ArkUI_NodeHandle node, ArkUI_LengthMetricUnit unit);
@@ -6568,8 +6768,9 @@ typedef void (*ArkUI_NodeContentCallback)(ArkUI_NodeContentEvent* event);
*
* @param content Indicates the pointer to the node content instance.
* @param callback Indicates the callback function.
- * @return Returns 0 if success,
- * Returns 401 if parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeContent_RegisterCallback(ArkUI_NodeContentHandle content, ArkUI_NodeContentCallback callback);
@@ -6588,8 +6789,9 @@ ArkUI_NodeContentEventType OH_ArkUI_NodeContentEvent_GetEventType(ArkUI_NodeCont
*
* @param content Indicates the pointer to the node content instance.
* @param node Indicates the pointer to the node
- * @return Returns 0 if success,
- * Returns 401 if parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeContent_AddNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node);
@@ -6599,8 +6801,9 @@ int32_t OH_ArkUI_NodeContent_AddNode(ArkUI_NodeContentHandle content, ArkUI_Node
*
* @param content Indicates the pointer to the node content instance.
* @param node Indicates the pointer to the node
- * @return Returns 0 if success,
- * Returns 401 if parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeContent_RemoveNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node);
@@ -6611,12 +6814,104 @@ int32_t OH_ArkUI_NodeContent_RemoveNode(ArkUI_NodeContentHandle content, ArkUI_N
* @param content Indicates the pointer to the node content instance.
* @param node Indicates the pointer to the node
* @param position Indicates the position for inserting the node
- * @return Returns 0 if success,
- * Returns 401 if parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeContent_InsertNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node, int32_t position);
+/**
+ * @brief Get the size of the component layout area.
+ * The layout area size does not include graphic variation attributes such as scaling.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param size The drawing area size of the component handle, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetLayoutSize(ArkUI_NodeHandle node, ArkUI_IntSize* size);
+
+/**
+ * @brief Obtain the position of the component layout area relative to the parent component.
+ * The relative position of the layout area does not include graphic variation attributes, such as translation.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param localOffset The offset value of the component handle relative to the parent component, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetLayoutPosition(ArkUI_NodeHandle node, ArkUI_IntOffset* localOffset);
+
+/**
+ * @brief Obtain the position of the component layout area relative to the window.
+ * The relative position of the layout area does not include graphic variation attributes, such as translation.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param globalOffset The offset value of the component handle relative to the window, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInWindow(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset);
+
+/**
+ * @brief Obtain the position of the component layout area relative to the screen.
+ * The relative position of the layout area does not include graphic variation attributes, such as translation.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param screenOffset The offset value of the component handle relative to the screen, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* screenOffset);
+
+/**
+ * @brief Obtain the position of the component in the window, including the properties of graphic translation changes.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param translateOffset The cumulative offset value of the component handle itself,
+ * parent components, and ancestor nodes, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset);
+
+/**
+ * @brief Obtain the position of the component on the screen, including the attributes of graphic translation changes.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param translateOffset The cumulative offset value of the component handle itself,
+ * parent components, and ancestor nodes, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset);
+
+/**
+ * @brief Collapse the ListItem in its expanded state.
+ *
+ * @param node Node objects that need to be registered for events.
+ * @param userData Custom event parameters are carried back in the callback parameter when the event is triggered.
+ * @param onFinish The callback triggered after the completion of the folding animation.
+ * @return Error code.
+ * {@link ARKUI_ERROR_CODE_NO_ERROR} Success.
+ * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception.
+ * {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} The component does not support this event.
+ * @since 12
+ */
+int32_t OH_ArkUI_List_CloseAllSwipeActions(ArkUI_NodeHandle node, void* userData, void (*onFinish)(void* userData));
#ifdef __cplusplus
};
#endif
diff --git a/arkui/ace_engine/native/native_node_napi.h b/arkui/ace_engine/native/native_node_napi.h
index a1bf77b9ebed0c28d55e586adf677b2ef0ea3ead..bff253709d8dffbf0302ecb2b03e6c7fd24277e3 100644
--- a/arkui/ace_engine/native/native_node_napi.h
+++ b/arkui/ace_engine/native/native_node_napi.h
@@ -51,8 +51,9 @@ extern "C" {
* @param env Indicates the NAPI environment pointer.
* @param frameNode Indicates the FrameNode object created on the ArkTS side.
* @param handle Indicates the pointer to the ArkUI_NodeHandle object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetNodeHandleFromNapiValue(napi_env env, napi_value frameNode, ArkUI_NodeHandle* handle);
@@ -64,8 +65,9 @@ int32_t OH_ArkUI_GetNodeHandleFromNapiValue(napi_env env, napi_value frameNode,
* @param env ndicates the NAPI environment pointer.
* @param value Indicates the UIContext object created on the ArkTS side.
* @param context Indicates the pointer to the ArkUI_ContextHandle object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetContextFromNapiValue(napi_env env, napi_value value, ArkUI_ContextHandle* context);
@@ -78,8 +80,9 @@ int32_t OH_ArkUI_GetContextFromNapiValue(napi_env env, napi_value value, ArkUI_C
* @param env ndicates the NAPI environment pointer.
* @param value Indicates the NodeContent object created on the ArkTS side.
* @param content Indicates the pointer to the ArkUI_NodeContentHandle object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetNodeContentFromNapiValue(napi_env env, napi_value value, ArkUI_NodeContentHandle* content);
@@ -91,8 +94,9 @@ int32_t OH_ArkUI_GetNodeContentFromNapiValue(napi_env env, napi_value value, Ark
* @param env Indicates the NAPI environment pointer.
* @param value Indicates the DrawableDescriptor object created on the ArkTS side.
* @param drawableDescriptor Indicates the pointer to the ArkUI_DrawableDescriptro object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetDrawableDescriptorFromNapiValue(
@@ -105,8 +109,9 @@ int32_t OH_ArkUI_GetDrawableDescriptorFromNapiValue(
* @param env Indicates the NAPI environment pointer.
* @param value Indicates the Resource object created on the ArkTS side.
* @param drawableDescriptor Indicates the pointer to the ArkUI_DrawableDescriptro object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetDrawableDescriptorFromResourceNapiValue(
diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h
index 71a268f5efec8b46bebb91d323d7629739860823..7dadc5a2827254db80a295117b17023befbc535d 100644
--- a/arkui/ace_engine/native/native_type.h
+++ b/arkui/ace_engine/native/native_type.h
@@ -98,6 +98,20 @@ typedef struct ArkUI_NativeDialog* ArkUI_NativeDialogHandle;
*/
typedef struct ArkUI_WaterFlowSectionOption ArkUI_WaterFlowSectionOption;
+/**
+ * @brief Define the configuration information of the Item within the ListitemSwipeActionOption method.
+ *
+ * @since 12
+ */
+typedef struct ArkUI_ListItemSwipeActionItem ArkUI_ListItemSwipeActionItem;
+
+/**
+ * @brief Define the configuration information for the ListitemSwipeActionOption method.
+ *
+ * @since 12
+ */
+typedef struct ArkUI_ListItemSwipeActionOption ArkUI_ListItemSwipeActionOption;
+
/**
* @brief Defines the ArkUI native context object.
*
@@ -141,6 +155,13 @@ typedef struct ArkUI_GuidelineOption ArkUI_GuidelineOption;
*/
typedef struct ArkUI_BarrierOption ArkUI_BarrierOption;
+/**
+ * @brief Define the ChildrenMainSize class information for a List.
+ *
+ * @since 12
+*/
+typedef struct ArkUI_ListChildrenMainSize ArkUI_ListChildrenMainSize;
+
/**
* @brief Defines the event callback type.
*
@@ -862,6 +883,8 @@ typedef enum {
ARKUI_SLIDER_STYLE_OUT_SET = 0,
/** The slider is in the slider track. */
ARKUI_SLIDER_STYLE_IN_SET,
+ /** No slider. */
+ ARKUI_SLIDER_STYLE_NONE,
} ArkUI_SliderStyle;
/**
@@ -1770,6 +1793,56 @@ typedef enum {
ARKUI_SWIPER_INDICATOR_TYPE_DIGIT,
} ArkUI_SwiperIndicatorType;
+/**
+ * @brief Define the pattern of element arrangement in the main axis direction of the Swiper component.
+ *
+ * @since 12
+ */
+typedef enum {
+ /** In the folded state, when the ListItem slides in the opposite direction to the main axis,
+ * the operation item is hidden.*/
+ ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_COLLAPSED = 0,
+ /** In the folded state, when the ListItem slides in the opposite direction to the spindle,
+ * the operation item is displayed.*/
+ ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_EXPANDED,
+ /** Long distance state, the state of deleting a ListItem after it enters the long distance deletion area.*/
+ ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_ACTIONING,
+} ArkUI_ListItemSwipeActionState;
+
+/**
+ * @brief Define the explicit and implicit mode of the SwipeAction method for the Listitem component.
+ *
+ * @since 12
+ */
+typedef enum {
+ /** The ListItem can continue to be scratched after the distance exceeds the size of the scratched component.*/
+ ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING = 0,
+ /** The sliding distance of the ListItem cannot exceed the size of the scratched component.*/
+ ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_NONE,
+} ArkUI_ListItemSwipeEdgeEffect;
+
+/**
+ * @brief Define error code enumeration values.
+ *
+ * @since 12
+ */
+typedef enum {
+ /** @error No errors. */
+ ARKUI_ERROR_CODE_NO_ERROR = 0,
+ /** @error Parameter error. */
+ ARKUI_ERROR_CODE_PARAM_INVALID = 401,
+ /** @error The component does not support specific properties or events. */
+ ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED = 106102,
+ /** @error The corresponding operation does not support nodes created by ArkTS. */
+ ARKUI_ERROR_CODE_ARKTS_NODE_NOT_SUPPORTED = 106103,
+ /** @error The lazy loading adapter is not bound to the component. */
+ ARKUI_ERROR_CODE_ADAPTER_NOT_BOUND = 106104,
+ /** @error The adapter already exists. */
+ ARKUI_ERROR_CODE_ADAPTER_EXIST = 106105,
+ /** @error The corresponding node already has a child node and cannot add an adapter. */
+ ARKUI_ERROR_CODE_CHILD_NODE_EXIST = 106106,
+} ArkUI_ErrorCode;
+
/**
* @brief Creates a size constraint.
*
@@ -1946,6 +2019,16 @@ void OH_ArkUI_WaterFlowSectionOption_Dispose(ArkUI_WaterFlowSectionOption* optio
*/
void OH_ArkUI_WaterFlowSectionOption_SetSize(ArkUI_WaterFlowSectionOption* option, int32_t size);
+/**
+* @brief Gets the FlowItem grouping configuration information array length.
+*
+* @param option FlowItem Indicates the packet configuration.
+* @return Array size. If -1 is returned, the return fails.
+* The possible cause of the failure is that the option parameter is abnormal, such as a null pointer.
+* @since 12
+*/
+int32_t OH_ArkUI_WaterFlowSectionOption_GetSize(ArkUI_WaterFlowSectionOption* option);
+
/**
* @brief Sets the number of items in a water flow section.
*
@@ -1967,6 +2050,32 @@ void OH_ArkUI_WaterFlowSectionOption_SetItemCount(ArkUI_WaterFlowSectionOption*
*/
int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index);
+/**
+* @brief The FlowItem grouping configuration information getsthe spindle size of
+* the specified Item based on flowItemIndex.
+*
+* @param option Indicates the pointer to a water flow section configuration.
+* @param index Indicates the index of the target water flow section.
+* @param callback Gets the spindle size of the specified Item based on index.
+* @since 12
+*/
+void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex(ArkUI_WaterFlowSectionOption* option,
+ int32_t index, float(*callback)(int32_t itemIndex));
+
+/**
+* @brief The FlowItem grouping configuration information getsthe spindle size of
+* the specified Item based on flowItemIndex.
+*
+* @param option Indicates the pointer to a water flow section configuration.
+* @param index Indicates the index of the target water flow section.
+* @param userData FlowItem Custom data.
+* @param callback Gets the spindle size of the specified Item based on index.
+* @since 12
+*/
+void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData(
+ ArkUI_WaterFlowSectionOption* option, int32_t index, void* userData,
+ float (*callback)(int32_t itemIndex, void* userData));
+
/**
* @brief Sets the number of columns (in a vertical layout) or rows (in a horizontal layout) of a water flow.
*
@@ -2692,6 +2801,298 @@ float OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(ArkUI_AlignmentRuleOption*
* @since 12
*/
float OH_ArkUI_AlignmentRuleOption_GetBiasVertical(ArkUI_AlignmentRuleOption* option);
+
+/**
+ * @brief Create a configuration item for the ListitemSwipeActionItem interface settings.
+ *
+ * @return List Item SwipeActionItem configuration item instance. If the object returns a null pointer,
+ * it indicates creation failure, and the reason for the failure may be that the address space is full.
+ * @since 12
+*/
+ArkUI_ListItemSwipeActionItem* OH_ArkUI_ListItemSwipeActionItem_Create();
+
+/**
+* @brief Destroy the ListitemSwipeActionItem instance.
+*
+* @param option List Item SwipeActionItem instance to be destroyed.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* item);
+
+/**
+* @brief Set the layout content of ListItem SwipeActionItem.
+*
+* @param option List Item SwipeActionItem instance.
+* @param builder Layout information.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* item, ArkUI_NodeHandle node);
+
+/**
+* @brief Set the threshold for long-distance sliding deletion distance of components.
+*
+* @param option List Item SwipeActionItem instance.
+* @param distance Component long-distance sliding deletion distance threshold.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item, float distance);
+
+/**
+* @brief Obtain the threshold for long-distance sliding deletion distance of components.
+*
+* @param option List Item SwipeActionItem instance.
+* @return Component long-distance sliding deletion distance threshold. If -1.0f is returned, the return fails.
+* The possible cause of the failure is that the item parameter is abnormal, such as a null pointer.
+* @since 12
+*/
+float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item);
+
+/**
+* @brief Set the event to be called when a sliding entry enters the deletion area.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)());
+
+/**
+ * @brief Set the event triggered when a sliding entry enters the deletion area.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData(ArkUI_ListItemSwipeActionItem* item,
+ void* userData, void (*callback)(void* userData));
+
+/**
+* @brief Set the event to be called when a component enters the long-range deletion area and deletes a ListItem.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* item, void (*callback)());
+
+/**
+ * @brief Set the event triggered when a component enters the long-range deletion area and deletes a ListItem.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData(ArkUI_ListItemSwipeActionItem* item,
+ void* userData, void (*callback)(void* userData));
+
+/**
+* @brief Set the event to be called when a sliding entry exits the deletion area.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)());
+
+/**
+ * @brief Set the event triggered when a sliding entry exits the deletion area.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData(ArkUI_ListItemSwipeActionItem* item,
+ void* userData, void (*callback)(void* userData));
+
+/**
+* @brief Set the event triggered when the sliding state of a list item changes.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* swipeActionState The changed state.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange(ArkUI_ListItemSwipeActionItem* item,
+ void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState));
+
+/**
+ * @brief Set the event triggered when the sliding state of a list item changes.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * swipeActionState The changed state.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData(ArkUI_ListItemSwipeActionItem* item,
+ void* userData, void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState, void* userData));
+
+/**
+ * @brief Create a configuration item for the ListitemSwipeActionOption interface settings.
+ *
+ * @return List Item SwipeActionOption configuration item instance.If the object returns a null pointer,
+ * it indicates a creation failure, and the reason for the failure may be that the address space is full.
+ * @since 12
+*/
+ArkUI_ListItemSwipeActionOption* OH_ArkUI_ListItemSwipeActionOption_Create();
+
+/**
+* @brief Destroy the ListitemSwipeActionOption instance.
+*
+* @param option List Item SwipeActionOption instance to be destroyed.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_Dispose(ArkUI_ListItemSwipeActionOption* option);
+
+/**
+* @brief Set the layout content on the left (vertical layout) or top (horizontal layout)
+* of the ListItem SwipeActionItem.
+*
+* @param option List Item SwipeActionItem instance.
+* @param builder Layout information.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption* option,
+ ArkUI_ListItemSwipeActionItem* item);
+
+/**
+* @brief Set the layout content on the right (vertical layout) or bottom (horizontal layout)
+* of the ListItem SwipeActionItem.
+*
+* @param option List Item SwipeActionItem instance.
+* @param builder Layout information.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_SetEnd(ArkUI_ListItemSwipeActionOption* option,
+ ArkUI_ListItemSwipeActionItem* item);
+
+/**
+* @brief Set the sliding effect.
+*
+* @param option List Item SwipeActionItem instance.
+* @param edgeEffect Sliding effect.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect(ArkUI_ListItemSwipeActionOption* option,
+ ArkUI_ListItemSwipeEdgeEffect edgeEffect);
+
+/**
+* @brief Get the sliding effect.
+*
+* @param option List Item SwipeActionItem instance.
+* @return Sliding effect. The default return value is 0. If -1 is returned, the return fails.
+* The possible cause of the failure is that the option parameter is abnormal, such as a null pointer.
+* @since 12
+*/
+int32_t OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(ArkUI_ListItemSwipeActionOption* option);
+
+/**
+* @brief The event called when the sliding operation offset changes.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* offset Slide offset.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange(ArkUI_ListItemSwipeActionOption* option,
+ void (*callback)(float offset));
+
+/**
+ * @brief Set the event triggered when the sliding operation offset changes.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * offset Slide offset.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData(ArkUI_ListItemSwipeActionOption* option,
+ void* userData, void (*callback)(float offset, void* userData));
+
+/**
+ * @brief Create configuration items for the ListChildrenMainSize interface settings.
+ *
+ * @return ListChildrenMainSize configuration item instance.If the object returns a null pointer,
+ * it indicates a creation failure, and the reason for the failure may be that the address space is full.
+ * @since 12
+*/
+ArkUI_ListChildrenMainSize* OH_ArkUI_ListChildrenMainSizeOption_Create();
+
+/**
+* @brief Destroy the ListChildrenMainSize instance.
+*
+* @param option The ListChildrenMainSize instance to be destroyed.
+* @since 12
+*/
+void OH_ArkUI_ListChildrenMainSizeOption_Dispose(ArkUI_ListChildrenMainSize* option);
+
+/**
+ * @brief Set the default size of ChildrenMainSizeOption for the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param defaultMainSize The default size of the ListItem under the List, measured in vp.
+ * @return 0 represents success. If defaultMainSize is less than 0 or option is a null pointer, return 401.
+ * @since 12
+*/
+int32_t OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize(ArkUI_ListChildrenMainSize* option,
+ float defaultMainSize);
+
+/**
+ * @brief Get the default size of ChildrenMainSizeOption for the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @return The default size of the ListItem under the List is 0, measured in vp.
+ * When the option is a null pointer, it returns -1.
+ * @since 12
+*/
+float OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize(ArkUI_ListChildrenMainSize* option);
+
+/**
+ * @brief Reset the array size of ChildrenMainSizeOption for the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param totalSize Array size.
+ * @since 12
+*/
+void OH_ArkUI_ListChildrenMainSizeOption_Resize(ArkUI_ListChildrenMainSize* option, int32_t totalSize);
+
+/**
+ * @brief Resize the ChildrenMainSizeOption array operation on the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param index To modify the starting position of the MainSize array.
+ * @param deleteCount The number of MainSize arrays to be deleted starting from index.
+ * @param addCount The number of MainSize arrays to be added starting from index.
+ * @return 0 represents success. If the function parameter is abnormal, return 401.
+ * @since 12
+*/
+int32_t OH_ArkUI_ListChildrenMainSizeOption_Splice(ArkUI_ListChildrenMainSize* option, int32_t index,
+ int32_t deleteCount, int32_t addCount);
+
+/**
+ * @brief Update the value of the ChildrenMainSizeOption array in the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param index To modify the starting position of the MainSize array.
+ * @param mainSize The actual modified value.
+ * @return 0 represents success. If the function parameter is abnormal, return 401.
+ * @since 12
+*/
+int32_t OH_ArkUI_ListChildrenMainSizeOption_UpdateSize(ArkUI_ListChildrenMainSize* option,
+ int32_t index, float mainSize);
+
+/**
+ * @brief Get the value of the ChildrenMainSizeOption array for the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param index The index position of the value to be obtained.
+ * @return The value of the specific position of the array. If the function parameter is abnormal, return -1.
+ * @since 12
+*/
+float OH_ArkUI_ListChildrenMainSizeOption_GetMainSize(ArkUI_ListChildrenMainSize* option, int32_t index);
#ifdef __cplusplus
};
#endif
diff --git a/arkui/ace_engine/native/styled_string.h b/arkui/ace_engine/native/styled_string.h
new file mode 100644
index 0000000000000000000000000000000000000000..f67994505bbc684e13a60a4a7c4a72e17297a8d8
--- /dev/null
+++ b/arkui/ace_engine/native/styled_string.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @addtogroup ArkUI_NativeModule
+ * @{
+ *
+ * @brief Provides ArkUI UI capabilities on the Native side, such as UI component creation and destruction,
+ * tree node operation, property setting, event monitoring, and so on.
+ *
+ * @since 12
+ */
+
+/**
+ * @file styled_string.h
+ *
+ * @brief Provides ArkUI with property string capabilities on the Native side.
+ *
+ * @library libace_ndk.z.so
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 12
+ */
+
+#ifndef ARKUI_NATIVE_STYLED_STRING_H
+#define ARKUI_NATIVE_STYLED_STRING_H
+
+#include "native_drawing/drawing_text_declaration.h"
+#include "native_drawing/drawing_text_typography.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Defines formatted string data objects supported by the text component.
+ *
+ * @since 12
+ */
+typedef struct ArkUI_StyledString ArkUI_StyledString;
+
+/**
+ * @brief Creates a pointer to the ArkUI_StyledString object.
+ *
+ * @param style A pointer to OH_Drawing_TypographyStyle, obtained by {@link OH_Drawing_CreateTypographyStyle}.
+ * @param collection A pointer to OH_Drawing_FontCollection, obtained by {@link OH_Drawing_CreateFontCollection}.
+ * @return Creates a pointer to the ArkUI_StyledString object. If the object returns a null pointer,
+ * the creation failed, either because the address space was full,
+ * or because the style, collection parameter was an exception such as a null pointer.
+ * @since 12
+ */
+ArkUI_StyledString* OH_ArkUI_StyledString_Create(
+ OH_Drawing_TypographyStyle* style, OH_Drawing_FontCollection* collection);
+
+/**
+ * @brief Free the memory occupied by the ArkUI_StyledString object.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_Destroy(ArkUI_StyledString* handle);
+
+/**
+ * @brief Sets the new layout style to the top of the current format string style stack.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @param style A pointer to the OH_Drawing_TextStyle object.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_PushTextStyle(ArkUI_StyledString* handle, OH_Drawing_TextStyle* style);
+
+/**
+ * @brief Sets the corresponding text content based on the current format string style.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @param content A pointer to the text content.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_AddText(ArkUI_StyledString* handle, const char* content);
+
+/**
+ * @brief Removes the top style from the stack in the current format string object.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_PopTextStyle(ArkUI_StyledString* handle);
+
+/**
+ * @brief Creates a pointer to an OH_Drawing_Typography object based on a format string object
+ * for advanced text estimation and typography.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @return A pointer to the OH_Drawing_Typography object. If the object returns a null pointer,
+ * the creation fails because the handle parameter is abnormal, such as a null pointer.
+ * @since 12
+ */
+OH_Drawing_Typography* OH_ArkUI_StyledString_CreateTypography(ArkUI_StyledString* handle);
+
+/**
+ * @brief Set the placeholder.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @param placeholder A pointer to the OH_Drawing_PlaceholderSpan object.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_AddPlaceholder(ArkUI_StyledString* handle, OH_Drawing_PlaceholderSpan* placeholder);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ARKUI_NATIVE_STYLED_STRING_H
+/** @} */
diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h
index 05890e33e26f9722d30b4f7a5801e93f2b1a7605..3f9e3f88db9db174594e00163fa336155f0fd57e 100644
--- a/arkui/ace_engine/native/ui_input_event.h
+++ b/arkui/ace_engine/native/ui_input_event.h
@@ -672,7 +672,7 @@ int32_t OH_ArkUI_PointerEvent_SetInterceptHitTestMode(const ArkUI_UIInputEvent*
*
* @param event Represents a pointer to the current UI input event.
* @return Return to the mouse button type, where 1 is the left button, 2 is the right button,
- * 4 is the middle button, 8 is the back button, and 16 is the forward button.
+ * 3 is the middle button, 4 is the back button, and 5 is the forward button.
* @since 12
*/
int32_t OH_ArkUI_MouseEvent_GetMouseButton(const ArkUI_UIInputEvent* event);
diff --git a/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h b/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h
index 89068919d8fb282716a1085d213f0396a72fa757..eb30b3e3df6f7ab56792809819a0a67cf8825b96 100644
--- a/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h
+++ b/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h
@@ -72,7 +72,9 @@ typedef struct OH_NativeBundle_ApplicationInfo OH_NativeBundle_ApplicationInfo;
/**
* @brief Obtains the application info based on the The current bundle.
*
- * @return Returns the application info.
+ * @return Returns the newly created OH_NativaBundle_ApplicationInfo object, if the returned object is NULL,
+ * it indicates creation failure. The possible cause of failure could be that the application address space is full,
+ * leading to space allocation failure.
* @since 9
* @version 1.0
*/
@@ -84,7 +86,10 @@ OH_NativeBundle_ApplicationInfo OH_NativeBundle_GetCurrentApplicationInfo();
* After utilizing this interface, to prevent memory leaks,
* it is necessary to manually release the pointer returned by the interface.
*
- * @return Returns the appId info.
+ * @return Returns the newly created string that indicates appId information,
+ * if the returned object is NULL, it indicates creation failure.
+ * The possible cause of failure could be that the application address space is full,
+ * leading to space allocation failure.
* @since 11
* @version 1.0
*/
@@ -96,7 +101,10 @@ char* OH_NativeBundle_GetAppId();
* After utilizing this interface, to prevent memory leaks,
* it is necessary to manually release the pointer returned by the interface.
*
- * @return Returns the appIdentifier info.
+ * @return Returns the newly created string that indicates app identifier information,
+ * if the returned object is NULL, it indicates creation failure.
+ * The possible cause of failure could be that the application address space is full,
+ * leading to space allocation failure.
* @since 11
* @version 1.0
*/
diff --git a/global/resource_management/BUILD.gn b/global/resource_management/BUILD.gn
index d5c9057ab122f1b8cc518c93dd92d85d06be1241..3db518153420630155c86f2a5b1705089047a8d4 100644
--- a/global/resource_management/BUILD.gn
+++ b/global/resource_management/BUILD.gn
@@ -22,8 +22,28 @@ ohos_ndk_library("librawfile_ndk") {
ohos_ndk_headers("rawfile_header") {
dest_dir = "$ndk_headers_out_dir/rawfile"
sources = [
- "./include/raw_dir.h",
- "./include/raw_file.h",
- "./include/raw_file_manager.h",
+ "./include/rawfile/raw_dir.h",
+ "./include/rawfile/raw_file.h",
+ "./include/rawfile/raw_file_manager.h",
+ ]
+}
+
+ohos_ndk_library("native_resmgr_ndk") {
+ ndk_description_file = "./libnative_resmgr.ndk.json"
+ min_compact_version = "12"
+ output_name = "ohresmgr"
+ output_extension = "so"
+ system_capability = "SystemCapability.Global.ResourceManager"
+ system_capability_headers = [
+ "resourcemanager/ohresmgr.h",
+ "resourcemanager/resmgr_common.h",
+ ]
+}
+
+ohos_ndk_headers("native_resmgr_header") {
+ dest_dir = "$ndk_headers_out_dir/resourcemanager"
+ sources = [
+ "./include/resourcemanager/ohresmgr.h",
+ "./include/resourcemanager/resmgr_common.h",
]
}
diff --git a/global/resource_management/include/raw_dir.h b/global/resource_management/include/rawfile/raw_dir.h
similarity index 100%
rename from global/resource_management/include/raw_dir.h
rename to global/resource_management/include/rawfile/raw_dir.h
diff --git a/global/resource_management/include/raw_file.h b/global/resource_management/include/rawfile/raw_file.h
similarity index 91%
rename from global/resource_management/include/raw_file.h
rename to global/resource_management/include/rawfile/raw_file.h
index 0fb7627fe8b506fff4415cf7596797ee922f0ccd..85eb3c545071b0a9d6141b2dd2a568850f39e9f3 100644
--- a/global/resource_management/include/raw_file.h
+++ b/global/resource_management/include/rawfile/raw_file.h
@@ -120,7 +120,8 @@ typedef struct {
* @param rawFile Indicates the pointer to {@link RawFile}.
* @param buf Indicates the pointer to the buffer for receiving the data read.
* @param length Indicates the number of bytes to read.
- * @return Returns the number of bytes read if any; returns 0 if the number reaches the end of file (EOF).
+ * @return Returns the number of bytes read if any;
+ * if the number reaches the end of file (EOF) or rawFile is nullptr also returns 0
* @since 8
* @version 1.0
*/
@@ -146,7 +147,7 @@ int OH_ResourceManager_SeekRawFile(const RawFile *rawFile, long offset, int when
* @brief Obtains the raw file length represented by an long.
*
* @param rawFile Indicates the pointer to {@link RawFile}.
- * @return Returns the total length of the raw file.
+ * @return Returns the total length of the raw file. If rawFile is nullptr also returns 0.
* @since 8
* @version 1.0
*/
@@ -156,7 +157,7 @@ long OH_ResourceManager_GetRawFileSize(RawFile *rawFile);
* @brief Obtains the remaining raw file length represented by an long.
*
* @param rawFile Indicates the pointer to {@link RawFile}.
- * @return Returns the remaining length of the raw file.
+ * @return Returns the remaining length of the raw file. If rawFile is nullptr also returns 0.
* @since 11
* @version 1.0
*/
@@ -180,7 +181,7 @@ void OH_ResourceManager_CloseRawFile(RawFile *rawFile);
* The current offset of a raw file.
*
* @param rawFile Indicates the pointer to {@link RawFile}.
- * @return Returns the current offset of a raw file.
+ * @return Returns the current offset of a raw file. If rawFile is nullptr also returns 0.
* @since 8
* @version 1.0
*/
@@ -219,7 +220,8 @@ bool OH_ResourceManager_ReleaseRawFileDescriptor(const RawFileDescriptor &descri
* @param rawFile Indicates the pointer to {@link RawFile64}.
* @param buf Indicates the pointer to the buffer for receiving the data read.
* @param length Indicates the number of bytes to read.
- * @return Returns the number of bytes read if any; returns 0 if the number reaches the end of file (EOF).
+ * @return Returns the number of bytes read if any;
+ * returns 0 if the number reaches the end of file (EOF). or rawFile is nullptr also returns 0
* @since 11
* @version 1.0
*/
@@ -245,7 +247,7 @@ int OH_ResourceManager_SeekRawFile64(const RawFile64 *rawFile, int64_t offset, i
* @brief Obtains the raw file length represented by an int64_t.
*
* @param rawFile Indicates the pointer to {@link RawFile64}.
- * @return Returns the total length of the raw file.
+ * @return Returns the total length of the raw file. If rawFile is nullptr also returns 0.
* @since 11
* @version 1.0
*/
@@ -255,7 +257,7 @@ int64_t OH_ResourceManager_GetRawFileSize64(RawFile64 *rawFile);
* @brief Obtains the remaining raw file length represented by an int64_t.
*
* @param rawFile Indicates the pointer to {@link RawFile64}.
- * @return Returns the remaining length of the raw file.
+ * @return Returns the remaining length of the raw file. If rawFile is nullptr also returns 0.
* @since 11
* @version 1.0
*/
@@ -279,7 +281,7 @@ void OH_ResourceManager_CloseRawFile64(RawFile64 *rawFile);
* The current offset of a raw file.
*
* @param rawFile Indicates the pointer to {@link RawFile64}.
- * @return Returns the current offset of a raw file.
+ * @return Returns the current offset of a raw file. If rawFile is nullptr also returns 0.
* @since 11
* @version 1.0
*/
diff --git a/global/resource_management/include/raw_file_manager.h b/global/resource_management/include/rawfile/raw_file_manager.h
similarity index 87%
rename from global/resource_management/include/raw_file_manager.h
rename to global/resource_management/include/rawfile/raw_file_manager.h
index ca3fabae47ed4536a565057cbf303e007117313a..42a8ff9c3bbaaf6bd08b9f2f6eeea179ae817e3b 100644
--- a/global/resource_management/include/raw_file_manager.h
+++ b/global/resource_management/include/rawfile/raw_file_manager.h
@@ -66,7 +66,7 @@ typedef struct NativeResourceManager NativeResourceManager;
*
* @param env Indicates the pointer to the JavaScipt Native Interface (napi) environment.
* @param jsResMgr Indicates the JavaScipt resource manager.
- * @return Returns the pointer to {@link NativeResourceManager}.
+ * @return Returns the pointer to {@link NativeResourceManager}. If failed returns nullptr.
* @since 8
* @version 1.0
*/
@@ -92,8 +92,8 @@ void OH_ResourceManager_ReleaseNativeResourceManager(NativeResourceManager *resM
* {@link OH_ResourceManager_InitNativeResourceManager}.
* @param dirName Indicates the name of the raw file directory to open. You can pass an empty string to open the
* top-level raw file directory.
- * @return Returns the pointer to {@link RawDir}. After you finish using the pointer, call
- * {@link OH_ResourceManager_CloseRawDir} to release it.
+ * @return Returns the pointer to {@link RawDir}. If failed or mgr is nullptr also returns nullptr.
+ * After you finish using the pointer, call {@link OH_ResourceManager_CloseRawDir} to release it.
* @see OH_ResourceManager_InitNativeResourceManager
* @see OH_ResourceManager_CloseRawDir
* @since 8
@@ -109,8 +109,8 @@ RawDir *OH_ResourceManager_OpenRawDir(const NativeResourceManager *mgr, const ch
* @param mgr Indicates the pointer to {@link NativeResourceManager} obtained by calling
* {@link OH_ResourceManager_InitNativeResourceManager}.
* @param fileName Indicates the file path relative to the top-level raw file directory.
- * @return Returns the pointer to {@link RawFile}. After you finish using the pointer, call
- * {@link OH_ResourceManager_CloseRawFile} to release it.
+ * @return Returns the pointer to {@link RawFile}. If failed or mgr and fileName is nullptr also returns nullptr.
+ * After you finish using the pointer, call {@link OH_ResourceManager_CloseRawFile} to release it.
* @see OH_ResourceManager_InitNativeResourceManager
* @see OH_ResourceManager_CloseRawFile
* @since 8
@@ -126,8 +126,8 @@ RawFile *OH_ResourceManager_OpenRawFile(const NativeResourceManager *mgr, const
* @param mgr Indicates the pointer to {@link NativeResourceManager} obtained by calling
* {@link OH_ResourceManager_InitNativeResourceManager}.
* @param fileName Indicates the file path relative to the top-level raw file directory.
- * @return Returns the pointer to {@link RawFile64}. After you finish using the pointer, call
- * {@link OH_ResourceManager_CloseRawFile64} to release it.
+ * @return Returns the pointer to {@link RawFile64}. If failed or mgr and fileName is nullptr also returns nullptr.
+ * After you finish using the pointer, call {@link OH_ResourceManager_CloseRawFile64} to release it.
* @see OH_ResourceManager_InitNativeResourceManager
* @see OH_ResourceManager_CloseRawFile64
* @since 11
diff --git a/global/resource_management/include/resourcemanager/ohresmgr.h b/global/resource_management/include/resourcemanager/ohresmgr.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b07163738bf1df96e1e5a8a089ad42fca797279
--- /dev/null
+++ b/global/resource_management/include/resourcemanager/ohresmgr.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @addtogroup resourcemanager
+ * @{
+ *
+ * @brief Provides the c interface to obtain resources, and relies on librawfile.z.so when used.
+ *
+ * @since 12
+ */
+
+/**
+ * @file ohresmgr.h
+ *
+ * @brief Provides the implementation of the interface.
+ * @syscap SystemCapability.Global.ResourceManager
+ * @library libohresmgr.so
+ * @since 12
+ */
+#ifndef GLOBAL_OH_RESMGR_H
+#define GLOBAL_OH_RESMGR_H
+
+#include "resmgr_common.h"
+#include "../rawfile/raw_file_manager.h"
+#include "../arkui/drawable_descriptor.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Obtains the Base64 code of the image resource.
+ *
+ * Obtains the Base64 code of the image resource corresponding to the specified resource ID.
+ *
+ * @param mgr Indicates the pointer to {@link NativeResourceManager}
+ * {@link OH_ResourceManager_InitNativeResourceManager}.
+ * @param resId Indicates the resource ID.
+ * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
+ * to use the density of current system dpi.
+ * @param resultValue the result write to resultValue.
+ * @param resultLen the media length write to resultLen.
+ * @return {@link SUCCESS} 0 - Success.
+ * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - If the input parameter invalid. Possible causes:
+ * 1.Incorrect parameter types; 2.Parameter verification failed.
+ {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
+ {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
+ {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
+ * @since 12
+ */
+ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64(const NativeResourceManager *mgr, uint32_t resId,
+ char **resultValue, uint64_t *resultLen, uint32_t density = 0);
+
+/**
+ * @brief Obtains the Base64 code of the image resource.
+ *
+ * Obtains the Base64 code of the image resource corresponding to the specified resource name.
+ *
+ * @param mgr Indicates the pointer to {@link NativeResourceManager}
+ * {@link OH_ResourceManager_InitNativeResourceManager}.
+ * @param resName Indicates the resource name.
+ * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
+ * to use the density of current system dpi.
+ * @param resultValue the result write to resultValue.
+ * @param resultLen the media length write to resultLen.
+ * @return {@link SUCCESS} 0 - Success.
+ * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - If the input parameter invalid. Possible causes:
+ * 1.Incorrect parameter types; 2.Parameter verification failed.
+ {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
+ {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
+ {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
+ * @since 12
+ */
+ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64ByName(const NativeResourceManager *mgr,
+ const char *resName, char **resultValue, uint64_t *resultLen, uint32_t density = 0);
+
+/**
+ * @brief Obtains the content of the image resource.
+ *
+ * Obtains the content of the specified screen density media file corresponding to a specified resource ID.
+ *
+ * @param mgr Indicates the pointer to {@link NativeResourceManager}
+ * {@link OH_ResourceManager_InitNativeResourceManager}.
+ * @param resId Indicates the resource ID.
+ * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
+ * to use the density of current system dpi.
+ * @param resultValue the result write to resultValue.
+ * @param resultLen the media length write to resultLen.
+ * @return {@link SUCCESS} 0 - Success.
+ * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - If the input parameter invalid. Possible causes:
+ * 1.Incorrect parameter types; 2.Parameter verification failed.
+ {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
+ {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
+ {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
+ * @since 12
+ */
+ResourceManager_ErrorCode OH_ResourceManager_GetMedia(const NativeResourceManager *mgr, uint32_t resId,
+ uint8_t **resultValue, uint64_t *resultLen, uint32_t density = 0);
+
+/**
+ * @brief Obtains the content of the image resource.
+ *
+ * Obtains the content of the specified screen density media file corresponding to a specified resource name.
+ *
+ * @param mgr Indicates the pointer to {@link NativeResourceManager}
+ * {@link OH_ResourceManager_InitNativeResourceManager}.
+ * @param resName Indicates the resource name.
+ * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
+ * to use the density of current system dpi.
+ * @param resultValue the result write to resultValue.
+ * @param resultLen the media length write to resultLen.
+ * @return {@link SUCCESS} 0 - Success.
+ * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - If the input parameter invalid. Possible causes:
+ * 1.Incorrect parameter types; 2.Parameter verification failed.
+ {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
+ {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
+ {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
+ * @since 12
+ */
+ResourceManager_ErrorCode OH_ResourceManager_GetMediaByName(const NativeResourceManager *mgr, const char *resName,
+ uint8_t **resultValue, uint64_t *resultLen, uint32_t density = 0);
+
+/**
+ * @brief Obtains the DrawableDescriptor of the media file.
+ *
+ * Obtains the DrawableDescriptor of the media file corresponding to a specified resource ID.
+ *
+ * @param mgr Indicates the pointer to {@link NativeResourceManager}
+ * {@link OH_ResourceManager_InitNativeResourceManager}.
+ * @param resId Indicates the resource ID.
+ * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
+ * to use the density of current system dpi.
+ * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media.
+ * @param drawableDescriptor the result write to drawableDescriptor.
+ * @return {@link SUCCESS} 0 - Success.
+ * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - If the input parameter invalid. Possible causes:
+ * 1.Incorrect parameter types; 2.Parameter verification failed.
+ {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
+ {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
+ * @since 12
+ */
+ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptor(const NativeResourceManager *mgr,
+ uint32_t resId, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density = 0, uint32_t type = 0);
+
+/**
+ * @brief Obtains the DrawableDescriptor of the media file.
+ *
+ * Obtains the DrawableDescriptor of the media file corresponding to a specified resource name.
+ * @param mgr Indicates the pointer to {@link NativeResourceManager}
+ * {@link OH_ResourceManager_InitNativeResourceManager}.
+ * @param resName Indicates the resource name.
+ * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
+ * to use the density of current system dpi.
+ * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media,
+ * 2 means the theme dynamic media.
+ * @param drawableDescriptor the result write to drawableDescriptor.
+ * @return {@link SUCCESS} 0 - Success.
+ * {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - If the input parameter invalid. Possible causes:
+ * 1.Incorrect parameter types; 2.Parameter verification failed.
+ {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
+ {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
+ * @since 12
+ */
+ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorByName(const NativeResourceManager *mgr,
+ const char *resName, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density = 0, uint32_t type = 0);
+
+#ifdef __cplusplus
+};
+#endif
+
+/** @} */
+#endif // GLOBAL_OH_RESMGR_H
\ No newline at end of file
diff --git a/global/resource_management/include/resourcemanager/resmgr_common.h b/global/resource_management/include/resourcemanager/resmgr_common.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e9289e83ef08602a8c60f18647c265ccb800874
--- /dev/null
+++ b/global/resource_management/include/resourcemanager/resmgr_common.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @addtogroup resourcemanager
+ * @{
+ *
+ * @brief Provides the c interface to obtain resources, and relies on librawfile.z.so when used.
+ *
+ * @since 12
+ */
+
+/**
+ * @file resmgr_common.h
+ *
+ * @brief Provides the structure required by the interface.
+ * @syscap SystemCapability.Global.ResourceManager
+ * @library libohresmgr.so
+ * @since 12
+ */
+#ifndef GLOBAL_RESMGR_COMMON_H
+#define GLOBAL_RESMGR_COMMON_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief The error code of resource manager.
+ *
+ * @since 12
+ */
+typedef enum ResourceManager_ErrorCode {
+ /** @error Success */
+ SUCCESS = 0,
+ /** @error Invalid input parameter */
+ ERROR_CODE_INVALID_INPUT_PARAMETER = 401,
+ /** @error Invalid resource ID */
+ ERROR_CODE_RES_ID_NOT_FOUND = 9001001,
+ /** @error Invalid resource name */
+ ERROR_CODE_RES_NOT_FOUND_BY_ID = 9001002,
+ /** @error No matching resource is found based on the resource ID */
+ ERROR_CODE_RES_NAME_NOT_FOUND = 9001003,
+ /** @error No matching resource is found based on the resource name */
+ ERROR_CODE_RES_NOT_FOUND_BY_NAME = 9001004,
+ /** @error Invalid relative path */
+ ERROR_CODE_RES_PATH_INVALID = 9001005,
+ /** @error The resource is referenced cyclically */
+ ERROR_CODE_RES_REF_TOO_MUCH = 9001006,
+ /** @error Failed to format the resource obtained based on the resource ID */
+ ERROR_CODE_RES_ID_FORMAT_ERROR = 9001007,
+ /** @error Failed to format the resource obtained based on the resource Name */
+ ERROR_CODE_RES_NAME_FORMAT_ERROR = 9001008,
+ /** @error Failed to access the system resource */
+ ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED = 9001009,
+ /** @error Invalid overlay path */
+ ERROR_CODE_OVERLAY_RES_PATH_INVALID = 9001010,
+ /** @error Out of memory */
+ ERROR_CODE_OUT_OF_MEMORY = 9001100,
+} ResourceManager_ErrorCode;
+
+/**
+ * @brief Enumerates screen density types.
+ *
+ * @since 12
+ */
+typedef enum ScreenDensity {
+ /** Indicates small screen density. */
+ SCREEN_SDPI = 120,
+ /** Indicates medium screen density. */
+ SCREEN_MDPI = 160,
+ /** Indicates large screen density. */
+ SCREEN_LDPI = 240,
+ /** Indicates extra-large screen density. */
+ SCREEN_XLDPI = 320,
+ /** Indicates extra-extra-large screen density. */
+ SCREEN_XXLDPI = 480,
+ /** Indicates extra-extra-extra-large screen density. */
+ SCREEN_XXXLDPI = 640,
+} ScreenDensity;
+#ifdef __cplusplus
+};
+#endif
+
+/** @} */
+#endif // GLOBAL_RESMGR_COMMON_H
diff --git a/global/resource_management/libnative_resmgr.ndk.json b/global/resource_management/libnative_resmgr.ndk.json
new file mode 100644
index 0000000000000000000000000000000000000000..3fbb2cf92a9fc3dfedf402f64b3f2803bb3ca6af
--- /dev/null
+++ b/global/resource_management/libnative_resmgr.ndk.json
@@ -0,0 +1,26 @@
+[
+ {
+ "first_introduced": "12",
+ "name": "OH_ResourceManager_GetMediaBase64"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ResourceManager_GetMediaBase64ByName"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ResourceManager_GetMedia"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ResourceManager_GetMediaByName"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ResourceManager_GetDrawableDescriptor"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ResourceManager_GetDrawableDescriptorByName"
+ }
+]
\ No newline at end of file
diff --git a/graphic/graphic_2d/native_drawing/BUILD.gn b/graphic/graphic_2d/native_drawing/BUILD.gn
index f4ba43a3231d40be0e78cba1dd72e539284520fe..fa8656ce602ccb00e10ab6b31e2f470ad1b93fa6 100644
--- a/graphic/graphic_2d/native_drawing/BUILD.gn
+++ b/graphic/graphic_2d/native_drawing/BUILD.gn
@@ -23,6 +23,7 @@ ohos_ndk_headers("native_drawing_header") {
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_color.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_color_filter.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_color_space.h",
+ "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_error_code.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_filter.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_font.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_font_collection.h",
@@ -66,6 +67,7 @@ ohos_ndk_library("libnative_drawing_ndk") {
"native_drawing/drawing_color.h",
"native_drawing/drawing_color_filter.h",
"native_drawing/drawing_color_space.h",
+ "native_drawing/drawing_error_code.h",
"native_drawing/drawing_filter.h",
"native_drawing/drawing_font.h",
"native_drawing/drawing_font_collection.h",
diff --git a/graphic/graphic_2d/native_drawing/drawing_canvas.h b/graphic/graphic_2d/native_drawing/drawing_canvas.h
index a98e15828ee9a684c615ec5515d183127472b4d5..9535f48c5a0aa3f14bc11a81b3a9a8f6193edefe 100644
--- a/graphic/graphic_2d/native_drawing/drawing_canvas.h
+++ b/graphic/graphic_2d/native_drawing/drawing_canvas.h
@@ -570,7 +570,7 @@ typedef enum {
*/
SHADOW_FLAGS_GEOMETRIC_ONLY,
/**
- * Use all shadow falgs.
+ * Use all shadow flags.
*/
SHADOW_FLAGS_ALL,
} OH_Drawing_CanvasShadowFlags;
diff --git a/graphic/graphic_2d/native_drawing/drawing_error_code.h b/graphic/graphic_2d/native_drawing/drawing_error_code.h
new file mode 100644
index 0000000000000000000000000000000000000000..779a60ca71d7498307604a899ca8e43f53b3df91
--- /dev/null
+++ b/graphic/graphic_2d/native_drawing/drawing_error_code.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef C_INCLUDE_DRAWING_ERROR_CODE_H
+#define C_INCLUDE_DRAWING_ERROR_CODE_H
+
+/**
+ * @addtogroup Drawing
+ * @{
+ *
+ * @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ *
+ * @since 8
+ * @version 1.0
+ */
+
+/**
+ * @file drawing_error_code.h
+ *
+ * @brief Declares functions related to the error code in the drawing module.
+ *
+ * @library libnative_drawing.so
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @since 12
+ * @version 1.0
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Enumerates error codes of drawing.
+ * @since 12
+ */
+typedef enum {
+ /**
+ * @error Operation completed successfully.
+ */
+ OH_DRAWING_SUCCESS = 0,
+ /**
+ * @error Permission verification failed.
+ */
+ OH_DRAWING_ERROR_NO_PERMISSION = 201,
+ /**
+ * @error Invalid input parameter. For example, the pointer in the parameter is a nullptr.
+ */
+ OH_DRAWING_ERROR_INVALID_PARAMETER = 401,
+ /**
+ * @error The parameter is not in the valid range.
+ */
+ OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE = 26200001,
+} OH_Drawing_ErrorCode;
+
+/**
+ * @brief Obtains the error code of the drawing module.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @return Returns the error code.
+ * @since 12
+ * @version 1.0
+ */
+OH_Drawing_ErrorCode OH_Drawing_ErrorCodeGet();
+
+#ifdef __cplusplus
+}
+#endif
+/** @} */
+#endif
\ No newline at end of file
diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h
index 0fe56c1d5f23a2f4eaa43e7d222b5669450d38f4..28fec472377c8b6f99daa131f89cf144b253811b 100644
--- a/graphic/graphic_2d/native_drawing/drawing_font.h
+++ b/graphic/graphic_2d/native_drawing/drawing_font.h
@@ -404,7 +404,7 @@ OH_Drawing_FontEdging OH_Drawing_FontGetEdging(const OH_Drawing_Font*);
void OH_Drawing_FontDestroy(OH_Drawing_Font*);
/**
- * @brief Defines a run, supplies storage for the metrics of an SkFont.
+ * @brief Defines a run, supplies storage for the metrics of an OH_Drawing_Font.
*
* @since 12
* @version 1.0
diff --git a/graphic/graphic_2d/native_drawing/drawing_matrix.h b/graphic/graphic_2d/native_drawing/drawing_matrix.h
index e26f2fb4937f2f7554e9f7c48de3b05da9006b8b..103788eba0cdac9e76dfc9f96f00f2074b3547ab 100644
--- a/graphic/graphic_2d/native_drawing/drawing_matrix.h
+++ b/graphic/graphic_2d/native_drawing/drawing_matrix.h
@@ -412,7 +412,8 @@ void OH_Drawing_MatrixScale(OH_Drawing_Matrix*, float sx, float sy, float px, fl
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
* @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object.
* @param inverse Indicates the pointer to an OH_Drawing_Matrix object.
- * @return Returns true if matrix can be inverted, or flase.
+ * @return Returns true if the matrix is not nullptr and can be inverted;
+ * returns false if the matrix is nullptr or cannot be inverted.
* @since 12
* @version 1.0
*/
@@ -467,7 +468,7 @@ bool OH_Drawing_MatrixMapRect(const OH_Drawing_Matrix*, const OH_Drawing_Rect* s
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
* @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object.
* @param other Indicates the pointer to an OH_Drawing_Matrix object.
- * @return Returns true if the two matrices are equal, or flase.
+ * @return Returns true if the two matrices are equal; returns false if not equal.
* @since 12
* @version 1.0
*/
@@ -481,7 +482,7 @@ bool OH_Drawing_MatrixIsEqual(OH_Drawing_Matrix*, OH_Drawing_Matrix* other);
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
* @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object.
- * @return Returns true if matrix is identity, or flase.
+ * @return Returns true if matrix is identity; returns false if not identity.
* @since 12
* @version 1.0
*/
diff --git a/graphic/graphic_2d/native_drawing/drawing_region.h b/graphic/graphic_2d/native_drawing/drawing_region.h
index 572625aa7432e6c7e48635ff4b2a5334ebb4dafa..d671444a3a42c3b2e4b6bea5083cf6c4af16d84d 100644
--- a/graphic/graphic_2d/native_drawing/drawing_region.h
+++ b/graphic/graphic_2d/native_drawing/drawing_region.h
@@ -113,7 +113,7 @@ bool OH_Drawing_RegionContains(OH_Drawing_Region* region, int32_t x, int32_t y);
bool OH_Drawing_RegionOp(OH_Drawing_Region* region, const OH_Drawing_Region* dst, OH_Drawing_RegionOpMode op);
/**
- * @brief Destroys an OH_Drawing_Region object and reclaims the memory occupied by the object.
+ * @brief Sets the region to the specified rect.
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
* @param OH_Drawing_Region Indicates the pointer to an OH_Drawing_Region object.
diff --git a/graphic/graphic_2d/native_drawing/drawing_shader_effect.h b/graphic/graphic_2d/native_drawing/drawing_shader_effect.h
index 8cf8e8802b8df08dc27ba0040f5c8a1187cf148a..1af5ad345630c9ebec5030ec8468059c5cd49eeb 100644
--- a/graphic/graphic_2d/native_drawing/drawing_shader_effect.h
+++ b/graphic/graphic_2d/native_drawing/drawing_shader_effect.h
@@ -196,6 +196,31 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateSweepGradient(const OH_Dra
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Image*,
OH_Drawing_TileMode tileX, OH_Drawing_TileMode tileY, const OH_Drawing_SamplingOptions*, const OH_Drawing_Matrix*);
+/**
+ * @brief Creates an OH_Drawing_ShaderEffect that generates a conical gradient given two circles.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param startPt Indicates the center of the start circle for the gradient.
+ * @param startRadius Indicates the radius of the start circle for this gradient.
+ * @param endPt Indicates the center of the start circle for the gradient.
+ * @param endRadius Indicates the radius of the start circle for this gradient.
+ * @param colors Indicates the colors to be distributed between the two points.
+ * @param pos Indicates the relative position of each corresponding color in the colors array.
+ * @param size Indicates the number of colors and pos.
+ * @param OH_Drawing_TileMode Indicates the tile mode.
+ * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object,
+ which represents the local matrix of the created OH_Drawing_ShaderEffect object.
+ If matrix is nullptr, defaults to the identity matrix.
+ * @return Returns the pointer to the OH_Drawing_ShaderEffect object created.
+ * If nullptr is returned, the creation fails.
+ * The possible cause of the failure is any of startPt, endPt, colors and pos is nullptr.
+ * @since 12
+ * @version 1.0
+ */
+OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(const OH_Drawing_Point2D* startPt,
+ float startRadius, const OH_Drawing_Point2D* endPt, float endRadius, const uint32_t* colors, const float* pos,
+ uint32_t size, OH_Drawing_TileMode, const OH_Drawing_Matrix*);
+
/**
* @brief Destroys an OH_Drawing_ShaderEffect object and reclaims the memory occupied by the object.
*
diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
index def9cec8cc3437144df84fbefbbdd15d2f5f31c6..5f89f309d65dc0f07690e98a6b4af1f4b17b4eca 100644
--- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
+++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
@@ -132,6 +132,10 @@
{ "name": "OH_Drawing_ColorFilterCreateMatrix" },
{ "name": "OH_Drawing_ColorFilterCreateSrgbGammaToLinear" },
{ "name": "OH_Drawing_ColorFilterDestroy" },
+ {
+ "first_introduced": "12",
+ "name": "OH_Drawing_ErrorCodeGet"
+ },
{ "name": "OH_Drawing_FilterCreate" },
{ "name": "OH_Drawing_FilterSetColorFilter" },
{
@@ -583,6 +587,10 @@
"first_introduced": "12",
"name": "OH_Drawing_ShaderEffectCreateImageShader"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_Drawing_ShaderEffectCreateTwoPointConicalGradient"
+ },
{ "name": "OH_Drawing_ShaderEffectDestroy" },
{
"first_introduced": "12",
diff --git a/graphic/graphic_2d/native_image/libnative_image.ndk.json b/graphic/graphic_2d/native_image/libnative_image.ndk.json
index 45bb3093e470bc024fe79cce9a962fa8e6ed2d69..fbc8a27c01f860937c342084c7510c5cefa0e878 100644
--- a/graphic/graphic_2d/native_image/libnative_image.ndk.json
+++ b/graphic/graphic_2d/native_image/libnative_image.ndk.json
@@ -9,5 +9,6 @@
{ "name": "OH_NativeImage_GetSurfaceId" },
{ "name": "OH_NativeImage_SetOnFrameAvailableListener" },
{ "name": "OH_NativeImage_UnsetOnFrameAvailableListener" },
- { "name": "OH_NativeImage_Destroy" }
+ { "name": "OH_NativeImage_Destroy" },
+ { "name": "OH_NativeImage_GetTransformMatrixV2" }
]
\ No newline at end of file
diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h
index b344a332cc9e33aa21b19bcfebc898b2363433f9..77577ff3f6d342e5cee89f6568192dff2a487b08 100644
--- a/graphic/graphic_2d/native_image/native_image.h
+++ b/graphic/graphic_2d/native_image/native_image.h
@@ -201,6 +201,19 @@ int32_t OH_NativeImage_UnsetOnFrameAvailableListener(OH_NativeImage* image);
*/
void OH_NativeImage_Destroy(OH_NativeImage** image);
+/**
+ * @brief Obtains the transform matrix of the texture image by producer transform type.\n
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeImage
+ * @param image Indicates the pointer to a OH_NativeImage instance.
+ * @param matrix Indicates the retrieved 4*4 transform matrix .
+ * @return 0 - Success.
+ * 40001000 - image is NULL.
+ * @since 12
+ * @version 1.0
+ */
+int32_t OH_NativeImage_GetTransformMatrixV2(OH_NativeImage* image, float matrix[16]);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h
index db6607b5f7f0719036c85dcc6a83c5eb309fa3cd..2437fac73204a7fd415297ee8a0cb7d9c7b3a8e9 100644
--- a/graphic/graphic_2d/native_window/external_window.h
+++ b/graphic/graphic_2d/native_window/external_window.h
@@ -94,7 +94,7 @@ typedef enum NativeWindowOperation {
/**
* set native window buffer geometry,
* variable parameter in function is
- * [in] int32_t width, [in] int32_t height
+ * [in] int32_t height, [in] int32_t width
*/
SET_BUFFER_GEOMETRY,
/**
@@ -638,26 +638,43 @@ int32_t OH_NativeWindow_GetSurfaceId(OHNativeWindow *window, uint64_t *surfaceId
int32_t OH_NativeWindow_CreateNativeWindowFromSurfaceId(uint64_t surfaceId, OHNativeWindow **window);
/**
- * @brief Sets scalingMode of a native window.
+ * @brief Set native window buffer hold.
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
- * @param window indicates the pointer to an OHNativeWindow instance.
- * @param scalingMode Indicates the enum value to OHScalingModeV2
- * @return Returns an error code, 0 is Success, otherwise, failed.
+ * @param window Indicates the pointer to an OHNativeWindow instance.
* @since 12
* @version 1.0
*/
-int32_t OH_NativeWindow_NativeWindowSetScalingModeV2(OHNativeWindow *window, OHScalingModeV2 scalingMode);
+void OH_NativeWindow_SetBufferHold(OHNativeWindow *window);
/**
- * @brief Set native window buffer hold.
+ * @brief Get the last flushed OHNativeWindowBuffer from an OHNativeWindow instance.
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to an OHNativeWindow instance.
+ * @param buffer Indicates the pointer to an OHNativeWindowBuffer pointer.
+ * @param fenceFd Indicates the pointer to a file descriptor handle.
+ * @param matrix Indicates the retrieved 4*4 transform matrix.
+ * @return 0 - Success.
+ * 40001000 - window is NULL or buffer is NULL or fenceFd is NULL.
+ * 41207000 - buffer state is wrong.
* @since 12
* @version 1.0
*/
-void OH_NativeWindow_SetBufferHold(OHNativeWindow *window);
+int32_t OH_NativeWindow_GetLastFlushedBufferV2(OHNativeWindow *window, OHNativeWindowBuffer **buffer,
+ int *fenceFd, float matrix[16]);
+
+/**
+ * @brief Sets scalingMode of a native window.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
+ * @param window indicates the pointer to an OHNativeWindow instance.
+ * @param scalingMode Indicates the enum value to OHScalingModeV2
+ * @return Returns an error code, 0 is Success, otherwise, failed.
+ * @since 12
+ * @version 1.0
+ */
+int32_t OH_NativeWindow_NativeWindowSetScalingModeV2(OHNativeWindow *window, OHScalingModeV2 scalingMode);
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_window/libnative_window.ndk.json b/graphic/graphic_2d/native_window/libnative_window.ndk.json
index 668400ec62fe74cf45b78661410af4a7f0da5d9c..5707571dabdfb2206e27af8c288131ac6a4f1f5e 100644
--- a/graphic/graphic_2d/native_window/libnative_window.ndk.json
+++ b/graphic/graphic_2d/native_window/libnative_window.ndk.json
@@ -25,5 +25,6 @@
{ "name": "OH_NativeWindow_CreateNativeWindowFromSurfaceId"},
{ "name": "OH_NativeWindow_NativeWindowAttachBuffer" },
{ "name": "OH_NativeWindow_NativeWindowDetachBuffer" },
- { "name": "OH_NativeWindow_SetBufferHold" }
+ { "name": "OH_NativeWindow_SetBufferHold" },
+ { "name": "OH_NativeWindow_GetLastFlushedBufferV2" }
]
\ No newline at end of file
diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h
index e6b1b273e743c1bcb94b66f1a5f8181ae7db2300..37a55c207d6161396c451d5df76642d528e85a4a 100644
--- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h
+++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h
@@ -427,10 +427,19 @@ ParamList OH_HiAppEvent_AddStringArrayParam(ParamList list, const char* name, co
* @param type Indicates the event type, which is defined in {@link EventType}.
* @param list Indicates a linked list of event parameters, each of which is comprised of the parameter name and
* parameter value.
- * @return Returns {@code 0} if the event parameter verification is successful, and the event will be written to
+ * @return Returns 0 if the event parameter verification is successful, and the event will be written to
* the event file; returns a positive integer if invalid parameters are present in the event, and
* the event will be written to the event file after the invalid parameters are ignored; returns a
* negative integer if the event parameter verification fails, and the event will not be written to the event file.
+ * {@code 0} Parameters verification is successful.
+ * {@code -1} Invalid event name.
+ * {@code -4} Invalid event domain.
+ * {@code -99} Function disabled.
+ * {@code 1} Invalid event parameter name.
+ * {@code 4} Invalid string length of the event parameter.
+ * {@code 5} Invalid number of event parameters.
+ * {@code 6} Invalid array length of the event parameter.
+ * {@code 8} Duplicate parameter.
* @since 8
* @version 1.0
*/
@@ -444,7 +453,7 @@ int OH_HiAppEvent_Write(const char* domain, const char* name, enum EventType typ
*
* @param name Configuration item name.
* @param value Configuration item value.
- * @return Configuration result.
+ * @return Returns true if configuration successful; returns false if configuration failed.
* @since 8
* @version 1.0
*/
@@ -481,8 +490,10 @@ void OH_HiAppEvent_DestroyWatcher(HiAppEvent_Watcher* watcher);
* @param row The row of write events that trigger the onTrigger callback.
* @param size The size of write events that trigger the onTrigger callback.
* @param timeOut The interval for trigger the onTrigger callback.
- * @return Returns {@code 0} if set TriggerCondition is successful, and returns a
+ * @return Returns 0 if set TriggerCondition is successful, and returns a
* negative integer if set fail.
+ * {@code 0} Success.
+ * {@code -5} The watcher is nullptr.
* @since 12
* @version 1.0
*/
@@ -498,8 +509,12 @@ int OH_HiAppEvent_SetTriggerCondition(HiAppEvent_Watcher* watcher, int row, int
* SECURITY, 0x02 means STATISTIC,0x01 means FAULT, 0xff and 0x00 means all.
* @param names The names of the events to be monitored by the watcher.
* @param namesLen The length of names array.
- * @return Returns {@code 0} if set AppEventFilter is successful, and returns a
+ * @return Returns 0 if set AppEventFilter is successful, and returns a
* negative integer if set fail.
+ * {@code 0} Success.
+ * {@code -1} Invalid event name.
+ * {@code -4} Invalid event domain.
+ * {@code -5} The watcher is nullptr.
* @since 12
* @version 1.0
*/
@@ -514,8 +529,10 @@ int OH_HiAppEvent_SetAppEventFilter(HiAppEvent_Watcher* watcher, const char* dom
* @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @param onTrigger The callback of the watcher.
- * @return Returns {@code 0} if set OnTrigger is successful, and returns a
+ * @return Returns 0 if set OnTrigger is successful, and returns a
* negative integer if set fail.
+ * {@code 0} Success.
+ * {@code -5} The watcher is nullptr.
* @since 12
* @version 1.0
*/
@@ -528,8 +545,10 @@ int OH_HiAppEvent_SetWatcherOnTrigger(HiAppEvent_Watcher* watcher, OH_HiAppEvent
* @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @param onReceive The callback of the watcher.
- * @return Returns {@code 0} if set OnReceive is successful, and returns a
+ * @return Returns 0 if set OnReceive is successful, and returns a
* negative integer if set fail.
+ * {@code 0} Success.
+ * {@code -5} The watcher is nullptr.
* @since 12
* @version 1.0
*/
@@ -542,8 +561,11 @@ int OH_HiAppEvent_SetWatcherOnReceive(HiAppEvent_Watcher* watcher, OH_HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @param eventNum The num of events to take.
* @param onTake The callback of the watcher.
- * @return Returns {@code 0} if remove watcher is successful, and returns a
- * negative integer if remove fail.
+ * @return Returns 0 if take events is successful, and returns a
+ * negative integer if take fail.
+ * {@code 0} Success.
+ * {@code -5} The watcher is nullptr.
+ * {@code -6} This interface must be called after OH_HiAppEvent_AddWatcher.
* @since 12
* @version 1.0
*/
@@ -554,8 +576,10 @@ int OH_HiAppEvent_TakeWatcherData(HiAppEvent_Watcher* watcher, uint32_t eventNum
*
* @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance which receive the event.
- * @return Returns {@code 0} if add watcher is successful, and returns a
+ * @return Returns 0 if add watcher is successful, and returns a
* negative integer if add fail.
+ * {@code 0} Success.
+ * {@code -5} The watcher is nullptr.
* @since 12
* @version 1.0
*/
@@ -566,8 +590,11 @@ int OH_HiAppEvent_AddWatcher(HiAppEvent_Watcher* watcher);
*
* @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
- * @return Returns {@code 0} if remove watcher is successful, and returns a
+ * @return Returns 0 if remove watcher is successful, and returns a
* negative integer if remove fail.
+ * {@code 0} Success.
+ * {@code -5} The watcher is nullptr.
+ * {@code -6} This interface must be called after OH_HiAppEvent_AddWatcher.
* @since 12
* @version 1.0
*/
diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug.h b/hiviewdfx/hidebug/include/hidebug/hidebug.h
index c43312ad51783d292918c5f8bcc8cc9fefe2474c..2274c86bf6cfab257d7d79278c0627185033df2e 100644
--- a/hiviewdfx/hidebug/include/hidebug/hidebug.h
+++ b/hiviewdfx/hidebug/include/hidebug/hidebug.h
@@ -47,6 +47,7 @@ extern "C" {
* @brief Obtains the cpu usage of system.
*
* @return Returns the cpu usage of system
+ * If the result is zero,The possible reason is that get failed.
* @since 12
*/
double OH_HiDebug_GetSystemCpuUsage();
@@ -55,6 +56,8 @@ double OH_HiDebug_GetSystemCpuUsage();
* @brief Obtains the cpu usage percent of a process.
*
* @return Returns the cpu usage percent of a process
+ * If the result is zero.The possbile reason is the current application usage rate is too low
+ * or acquisition has failed
* @since 12
*/
double OH_HiDebug_GetAppCpuUsage();
@@ -62,7 +65,9 @@ double OH_HiDebug_GetAppCpuUsage();
/**
* @brief Obtains cpu usage of application's all thread.
*
- * @return Returns all thread cpu usage. See {@link HiDebug_ThreadCpuUsagePtr}
+ * @return Returns all thread cpu usage. See {@link HiDebug_ThreadCpuUsagePtr}.
+ * If the HiDebug_ThreadCpuUsagePtr is null.
+ * The possible reason is that no thread related data was obtained
* @since 12
*/
HiDebug_ThreadCpuUsagePtr OH_HiDebug_GetAppThreadCpuUsage();
@@ -71,6 +76,7 @@ HiDebug_ThreadCpuUsagePtr OH_HiDebug_GetAppThreadCpuUsage();
* @brief Free cpu usage buffer of application's all thread.
*
* @param threadCpuUsage Indicates applicatoin's all thread. See {@link HiDebug_ThreadCpuUsagePtr}
+ * Use the pointer generated through the OH_HiDebug_GetAppThreadCpuUsage().
* @since 12
*/
void OH_HiDebug_FreeThreadCpuUsage(HiDebug_ThreadCpuUsagePtr *threadCpuUsage);
@@ -79,6 +85,7 @@ void OH_HiDebug_FreeThreadCpuUsage(HiDebug_ThreadCpuUsagePtr *threadCpuUsage);
* @brief Obtains the system memory size.
*
* @param systemMemInfo Indicates the pointer to {@link HiDebug_SystemMemInfo}.
+ * If there is no data in structure after the function.The Possible reason is system error.
* @since 12
*/
void OH_HiDebug_GetSystemMemInfo(HiDebug_SystemMemInfo *systemMemInfo);
@@ -87,6 +94,7 @@ void OH_HiDebug_GetSystemMemInfo(HiDebug_SystemMemInfo *systemMemInfo);
* @brief Obtains the memory info of application process.
*
* @param nativeMemInfo Indicates the pointer to {@link HiDebug_NativeMemInfo}.
+ * If there is no data in structure after the function.The Possible reason is system error.
* @since 12
*/
void OH_HiDebug_GetAppNativeMemInfo(HiDebug_NativeMemInfo *nativeMemInfo);
@@ -95,6 +103,7 @@ void OH_HiDebug_GetAppNativeMemInfo(HiDebug_NativeMemInfo *nativeMemInfo);
* @brief Obtains the memory limit of application process.
*
* @param memoryLimit Indicates the pointer to {@link HiDebug_MemoryLimit}
+ * If there is no data in structure after the function.The Possible reason is system error.
* @since 12
*/
void OH_HiDebug_GetAppMemoryLimit(HiDebug_MemoryLimit *memoryLimit);
@@ -107,7 +116,12 @@ void OH_HiDebug_GetAppMemoryLimit(HiDebug_MemoryLimit *memoryLimit);
* @param limitSize Max size of trace file, in bytes, the max is 500MB.
* @param fileName Output trace file name buffer
* @param length Output trace file name buffer length
- * @return Returns {@code HIDEBUG_SUCCESS} if successful. See {@link HiDebug_ErrorCode}
+ * @return 0 - Success
+ * {@link HIDEBUG_INVALID_ARGUMENT} 401 - if the fileName is null or the length is too short or
+ * limitSize is too small
+ * 11400102 - Have already capture trace
+ * 11400103 - Have no permission to trace
+ * 11400104 - The Possible reason is some error in the system.
* @since 12
*/
HiDebug_ErrorCode OH_HiDebug_StartAppTraceCapture(HiDebug_TraceFlag flag,
@@ -116,7 +130,8 @@ HiDebug_ErrorCode OH_HiDebug_StartAppTraceCapture(HiDebug_TraceFlag flag,
/**
* @brief Stop capture application trace.
*
- * @return Returns {@code HIDEBUG_SUCCESS} if successful. See {@link HiDebug_ErrorCode}
+ * @return 0 - Success
+ * 11400104 - Maybe no trace is running or some error in the system.
* @since 12
*/
HiDebug_ErrorCode OH_HiDebug_StopAppTraceCapture();
diff --git a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h
index 249891cf9f8660a374a36155b8704d7e413ced5d..085870017656c5c9a234a1badef14b67cdb96c98 100644
--- a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h
+++ b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h
@@ -50,7 +50,10 @@ extern "C" {
* @permission ohos.permission.MICROPHONE
*
* @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioCapturer_Release(OH_AudioCapturer* capturer);
@@ -61,7 +64,10 @@ OH_AudioStream_Result OH_AudioCapturer_Release(OH_AudioCapturer* capturer);
* @permission ohos.permission.MICROPHONE
*
* @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioCapturer_Start(OH_AudioCapturer* capturer);
@@ -72,7 +78,10 @@ OH_AudioStream_Result OH_AudioCapturer_Start(OH_AudioCapturer* capturer);
* @permission ohos.permission.MICROPHONE
*
* @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioCapturer_Pause(OH_AudioCapturer* capturer);
@@ -83,7 +92,10 @@ OH_AudioStream_Result OH_AudioCapturer_Pause(OH_AudioCapturer* capturer);
* @permission ohos.permission.MICROPHONE
*
* @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioCapturer_Stop(OH_AudioCapturer* capturer);
@@ -93,7 +105,10 @@ OH_AudioStream_Result OH_AudioCapturer_Stop(OH_AudioCapturer* capturer);
* @since 10
*
* @param capturer reference created by OH_AudioStreamBuilder_GenerateCapturer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioCapturer_Flush(OH_AudioCapturer* capturer);
@@ -106,7 +121,9 @@ OH_AudioStream_Result OH_AudioCapturer_Flush(OH_AudioCapturer* capturer);
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param state Pointer to a variable that will be set for the state value.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetCurrentState(OH_AudioCapturer* capturer, OH_AudioStream_State* state);
@@ -117,7 +134,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetCurrentState(OH_AudioCapturer* capture
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param latencyMode Pointer to a variable that will be set for the latency mode.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetLatencyMode(OH_AudioCapturer* capturer,
OH_AudioStream_LatencyMode* latencyMode);
@@ -129,7 +148,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetLatencyMode(OH_AudioCapturer* capturer
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param stramId Pointer to a variable that will be set for the stream id.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetStreamId(OH_AudioCapturer* capturer, uint32_t* streamId);
@@ -142,7 +163,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetStreamId(OH_AudioCapturer* capturer, u
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param rate The state value to be updated
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetSamplingRate(OH_AudioCapturer* capturer, int32_t* rate);
@@ -153,7 +176,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetSamplingRate(OH_AudioCapturer* capture
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param channelCount Pointer to a variable that will be set for the channel count.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetChannelCount(OH_AudioCapturer* capturer, int32_t* channelCount);
@@ -164,7 +189,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetChannelCount(OH_AudioCapturer* capture
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param sampleFormat Pointer to a variable that will be set for the sample format.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetSampleFormat(OH_AudioCapturer* capturer,
OH_AudioStream_SampleFormat* sampleFormat);
@@ -176,7 +203,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetSampleFormat(OH_AudioCapturer* capture
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param encodingType Pointer to a variable that will be set for the encoding type.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetEncodingType(OH_AudioCapturer* capturer,
OH_AudioStream_EncodingType* encodingType);
@@ -188,7 +217,9 @@ OH_AudioStream_Result OH_AudioCapturer_GetEncodingType(OH_AudioCapturer* capture
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param sourceType Pointer to a variable that will be set for the stream sourceType.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetCapturerInfo(OH_AudioCapturer* capturer,
OH_AudioStream_SourceType* sourceType);
@@ -200,7 +231,10 @@ OH_AudioStream_Result OH_AudioCapturer_GetCapturerInfo(OH_AudioCapturer* capture
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param frameSize Pointer to a variable that will be set for the frame size.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioCapturer_GetFrameSizeInCallback(OH_AudioCapturer* capturer, int32_t* frameSize);
@@ -213,7 +247,12 @@ OH_AudioStream_Result OH_AudioCapturer_GetFrameSizeInCallback(OH_AudioCapturer*
* @param clockId {@link #CLOCK_MONOTONIC}
* @param framePosition Pointer to a variable to receive the position
* @param timestamp Pointer to a variable to receive the timestamp
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of capturer is nullptr;
+ * 2.The param of clockId invalid.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioCapturer_GetTimestamp(OH_AudioCapturer* capturer,
clockid_t clockId, int64_t* framePosition, int64_t* timestamp);
@@ -225,17 +264,22 @@ OH_AudioStream_Result OH_AudioCapturer_GetTimestamp(OH_AudioCapturer* capturer,
*
* @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer()
* @param frames Pointer to a variable that will be set for the frame count number.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetFramesRead(OH_AudioCapturer* capturer, int64_t* frames);
/**
* @brief Gets the overflow count on this stream.
*
+ * @since 12
+ *
* @param capturer Capturer generated by OH_AudioStreamBuilder_GenerateCapturer()
* @param count Pointer to a variable that will be set for the overflow count number.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of capturer is nullptr.
*/
OH_AudioStream_Result OH_AudioCapturer_GetOverflowCount(OH_AudioCapturer* capturer, uint32_t* count);
diff --git a/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h b/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h
index 75acd956a00ce78b61cdb72ee4450c21131c1d9c..3ef572db1e60b1f81a0435956f532b1d5e3b69c2 100644
--- a/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h
+++ b/multimedia/audio_framework/audio_manager/native_audio_routing_manager.h
@@ -80,7 +80,8 @@ typedef int32_t (*OH_AudioRoutingManager_OnDeviceChangedCallback) (
*
* @param audioRoutingManager the {@link OH_AudioRoutingManager}
* handle returned by {@link OH_AudioManager_GetAudioRoutingManager}.
- * @return {@link #AUDIOCOMMON_RESULT_SUCCESS}
+ * @return Function result code:
+ * {@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful.
* @since 12
*/
OH_AudioCommon_Result OH_AudioManager_GetAudioRoutingManager(OH_AudioRoutingManager **audioRoutingManager);
@@ -97,8 +98,13 @@ OH_AudioCommon_Result OH_AudioManager_GetAudioRoutingManager(OH_AudioRoutingMana
* Do not release the audioDeviceDescriptorArray pointer separately
* instead call {@link OH_AudioRoutingManager_ReleaseDevices} to release the DeviceDescriptor array
* when it is no use anymore.
- * @return {@link #AUDIOCOMMON_RESULT_SUCCESS} or {@link #AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}
- * or {@link #AUDIOCOMMON_RESULT_ERROR_NO_MEMORY}.
+ * @return Function result code:
+ * {@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful.
+ * {@link AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}:
+ * 1.The param of audioRoutingManager is nullptr;
+ * 2.The param of deviceFlag invalid;
+ * 3.The param of audioDeviceDescriptorArray is nullptr.
+ * {@link AUDIOCOMMON_RESULT_ERROR_NO_MEMORY} The param of audioDeviceDescriptorArray is nullptr.
* @since 12
*/
OH_AudioCommon_Result OH_AudioRoutingManager_GetDevices(
@@ -114,7 +120,12 @@ OH_AudioCommon_Result OH_AudioRoutingManager_GetDevices(
* @param deviceFlag the {@link OH_AudioDevice_DeviceFlag} which is used to register callback.
* @param callback the {@link OH_AudioRoutingManager_OnDeviceChangedCallback}
* Callback function which will be called when devices changed.
- * @return {@link #AUDIOCOMMON_RESULT_SUCCESS} or {@link #AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}.
+ * @return Function result code:
+ * {@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful.
+ * {@link AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}:
+ * 1.The param of audioRoutingManager is nullptr;
+ * 2.The param of deviceFlag invalid;
+ * 3.The param of callback is nullptr.
* @since 12
*/
OH_AudioCommon_Result OH_AudioRoutingManager_RegisterDeviceChangeCallback(
@@ -128,7 +139,11 @@ OH_AudioCommon_Result OH_AudioRoutingManager_RegisterDeviceChangeCallback(
* handle returned by {@link OH_AudioManager_GetAudioRoutingManager}.
* @param callback the {@link OH_AudioRoutingManager_OnDeviceChangedCallback}
* Callback function which will be called when devices changed.
- * @return {@link #AUDIOCOMMON_RESULT_SUCCESS} or {@link #AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}.
+ * @return Function result code:
+ * {@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful.
+ * {@link AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}:
+ * 1.The param of audioRoutingManager is nullptr;
+ * 2.The param of callback is nullptr.
* @since 12
*/
OH_AudioCommon_Result OH_AudioRoutingManager_UnregisterDeviceChangeCallback(
@@ -142,7 +157,11 @@ OH_AudioCommon_Result OH_AudioRoutingManager_UnregisterDeviceChangeCallback(
* handle returned by {@link OH_AudioManager_GetAudioRoutingManager}.
* @param audioDeviceDescriptorArray Audio device descriptors should be released.
* and get from {@link OH_AudioRoutingManager_GetDevices}
- * @return {@link #AUDIOCOMMON_RESULT_SUCCESS} or {@link #AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}.
+ * @return Function result code:
+ * {@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful.
+ * {@link AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}:
+ * 1.The param of audioRoutingManager is nullptr;
+ * 2.The param of audioDeviceDescriptorArray is nullptr.
* @since 12
*/
OH_AudioCommon_Result OH_AudioRoutingManager_ReleaseDevices(
diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h
index 89b86a734bbf6ad00b75ad1f2d4520dfb8c96573..c65846fad981efc826af543d684453539ebae52d 100644
--- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h
+++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h
@@ -50,7 +50,10 @@ extern "C" {
* @since 10
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioRenderer_Release(OH_AudioRenderer* renderer);
@@ -60,7 +63,10 @@ OH_AudioStream_Result OH_AudioRenderer_Release(OH_AudioRenderer* renderer);
* @since 10
*
* @param renderer reference created by OH_AudioStreamBuilder
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioRenderer_Start(OH_AudioRenderer* renderer);
@@ -70,7 +76,10 @@ OH_AudioStream_Result OH_AudioRenderer_Start(OH_AudioRenderer* renderer);
* @since 10
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioRenderer_Pause(OH_AudioRenderer* renderer);
@@ -80,7 +89,10 @@ OH_AudioStream_Result OH_AudioRenderer_Pause(OH_AudioRenderer* renderer);
* @since 10
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioRenderer_Stop(OH_AudioRenderer* renderer);
@@ -90,7 +102,10 @@ OH_AudioStream_Result OH_AudioRenderer_Stop(OH_AudioRenderer* renderer);
* @since 10
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioRenderer_Flush(OH_AudioRenderer* renderer);
@@ -103,7 +118,9 @@ OH_AudioStream_Result OH_AudioRenderer_Flush(OH_AudioRenderer* renderer);
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param state Pointer to a variable that will be set for the state value.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetCurrentState(OH_AudioRenderer* renderer,
OH_AudioStream_State* state);
@@ -117,7 +134,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetCurrentState(OH_AudioRenderer* rendere
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param rate The state value to be updated
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetSamplingRate(OH_AudioRenderer* renderer, int32_t* rate);
@@ -128,7 +147,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetSamplingRate(OH_AudioRenderer* rendere
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param stramId Pointer to a variable that will be set for the stream id.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetStreamId(OH_AudioRenderer* renderer, uint32_t* streamId);
@@ -139,7 +160,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetStreamId(OH_AudioRenderer* renderer, u
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param channelCount Pointer to a variable that will be set for the channel count.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetChannelCount(OH_AudioRenderer* renderer, int32_t* channelCount);
@@ -150,7 +173,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetChannelCount(OH_AudioRenderer* rendere
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param sampleFormat Pointer to a variable that will be set for the sample format.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetSampleFormat(OH_AudioRenderer* renderer,
OH_AudioStream_SampleFormat* sampleFormat);
@@ -162,7 +187,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetSampleFormat(OH_AudioRenderer* rendere
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param latencyMode Pointer to a variable that will be set for the latency mode.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetLatencyMode(OH_AudioRenderer* renderer,
OH_AudioStream_LatencyMode* latencyMode);
@@ -175,7 +202,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetLatencyMode(OH_AudioRenderer* renderer
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param usage Pointer to a variable that will be set for the stream usage.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetRendererInfo(OH_AudioRenderer* renderer,
OH_AudioStream_Usage* usage);
@@ -187,7 +216,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetRendererInfo(OH_AudioRenderer* rendere
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param encodingType Pointer to a variable that will be set for the encoding type.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetEncodingType(OH_AudioRenderer* renderer,
OH_AudioStream_EncodingType* encodingType);
@@ -199,7 +230,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetEncodingType(OH_AudioRenderer* rendere
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param frames Pointer to a variable that will be set for the frame count number.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer* renderer, int64_t* frames);
@@ -212,7 +245,12 @@ OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer* render
* @param clockId {@link #CLOCK_MONOTONIC}
* @param framePosition Pointer to a variable to receive the position
* @param timestamp Pointer to a variable to receive the timestamp
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of renderer is nullptr;
+ * 2.The param of clockId invalid.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioRenderer_GetTimestamp(OH_AudioRenderer* renderer,
clockid_t clockId, int64_t* framePosition, int64_t* timestamp);
@@ -224,61 +262,86 @@ OH_AudioStream_Result OH_AudioRenderer_GetTimestamp(OH_AudioRenderer* renderer,
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param frameSize Pointer to a variable that will be set for the frame size.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetFrameSizeInCallback(OH_AudioRenderer* renderer, int32_t* frameSize);
/*
-* Query the playback speed of the stream client
-*
-* @since 11
-*
-* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
-* @param speed Pointer to a variable to receive the playback speed.
-* @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
-*/
+ * Query the playback speed of the stream client
+ *
+ * @since 11
+ *
+ * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
+ * @param speed Pointer to a variable to receive the playback speed.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
+ */
OH_AudioStream_Result OH_AudioRenderer_GetSpeed(OH_AudioRenderer* renderer, float* speed);
/*
-* Set the playback speed of the stream client
-*
-* @since 11
-*
-* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
-* @param speed The playback speed, form 0.25 to 4.0.
-* @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
-*/
+ * Set the playback speed of the stream client
+ *
+ * @since 11
+ *
+ * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
+ * @param speed The playback speed, form 0.25 to 4.0.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
+ */
OH_AudioStream_Result OH_AudioRenderer_SetSpeed(OH_AudioRenderer* renderer, float speed);
/**
* Set volume of current renderer.
*
+ * @since 12
+ *
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param volume Volume to set which changes from 0.0 to 1.0.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of renderer is nullptr;
+ * 2.The param of volume invalid.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
+ * {@link AUDIOSTREAM_ERROR_SYSTEM} An system error has occurred.
*/
OH_AudioStream_Result OH_AudioRenderer_SetVolume(OH_AudioRenderer* renderer, float volume);
/**
* Changes the volume with ramp for a duration.
*
+ * @since 12
+ *
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param volume Volume to set which changes from 0.0 to 1.0.
* @param durationMs Duration for volume ramp, in millisecond.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of renderer is nullptr;
+ * 2.The param of volume invalid.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
+ * {@link AUDIOSTREAM_ERROR_SYSTEM} An system error has occurred.
*/
OH_AudioStream_Result OH_AudioRenderer_SetVolumeWithRamp(OH_AudioRenderer* renderer, float volume, int32_t durationMs);
/**
* Get Volume of current renderer.
*
+ * @since 12
+ *
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param volume Pointer to a variable to receive the volume.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of renderer is nullptr;
+ * 2.The param of volume is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetVolume(OH_AudioRenderer* renderer, float* volume);
@@ -286,12 +349,19 @@ OH_AudioStream_Result OH_AudioRenderer_GetVolume(OH_AudioRenderer* renderer, flo
* @brief Set mark position on current renderer. Calling this function will overwrite the mark postion which has already
* set.
*
+ * @since 12
+ *
* @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer()
* @param samplePos Mark position in samples.
* @param callback Callback used when the samplePos has reached.
* @param userData User data which is passed by user.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of renderer is nullptr;
+ * 2.The param of samplePos invalid.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
+ * {@link AUDIOSTREAM_ERROR_SYSTEM} An system error has occurred.
*/
OH_AudioStream_Result OH_AudioRenderer_SetMarkPosition(OH_AudioRenderer* renderer, uint32_t samplePos,
OH_AudioRenderer_OnMarkReachedCallback callback, void* userData);
@@ -299,19 +369,27 @@ OH_AudioStream_Result OH_AudioRenderer_SetMarkPosition(OH_AudioRenderer* rendere
/**
* @brief Cancel mark which has set by {@link #OH_AudioRenderer_SetMarkPosition}.
*
- * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
* @since 12
+ *
+ * @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer()
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_CancelMark(OH_AudioRenderer* renderer);
/**
* @brief Gets the underflow count on this stream.
*
+ * @since 12
+ *
* @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer()
* @param count Pointer to a variable to receive the underflow count number.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of renderer is nullptr;
+ * 2.The param of count is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetUnderflowCount(OH_AudioRenderer* renderer, uint32_t* count);
@@ -322,7 +400,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetUnderflowCount(OH_AudioRenderer* rende
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param channelLayout Pointer to a variable to receive the channel layout
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetChannelLayout(OH_AudioRenderer* renderer,
OH_AudioChannelLayout* channelLayout);
@@ -334,7 +414,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetChannelLayout(OH_AudioRenderer* render
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param effectMode Pointer to a variable to receive current audio effect mode
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetEffectMode(OH_AudioRenderer* renderer,
OH_AudioStream_AudioEffectMode* effectMode);
@@ -346,7 +428,9 @@ OH_AudioStream_Result OH_AudioRenderer_GetEffectMode(OH_AudioRenderer* renderer,
*
* @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer()
* @param effectMode Audio effect mode that will be set for the stream
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_SetEffectMode(OH_AudioRenderer* renderer,
OH_AudioStream_AudioEffectMode effectMode);
@@ -354,10 +438,13 @@ OH_AudioStream_Result OH_AudioRenderer_SetEffectMode(OH_AudioRenderer* renderer,
/**
* @brief Get the privacy of this stream.
*
+ * @since 12
+ *
* @param renderer Renderer generated by OH_AudioStreamBuilder_GenerateRenderer()
* @param privacy Pointer to a variable which receives the results.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of renderer is nullptr.
*/
OH_AudioStream_Result OH_AudioRenderer_GetRendererPrivacy(OH_AudioRenderer* renderer,
OH_AudioStream_PrivacyType* privacy);
diff --git a/multimedia/audio_framework/common/native_audio_common.h b/multimedia/audio_framework/common/native_audio_common.h
index 6c8300f3e0b24249804f0fc74a01a74eb3036e2d..f045dc8e3848f060cc4328fac7d7c225f7ea5cca 100644
--- a/multimedia/audio_framework/common/native_audio_common.h
+++ b/multimedia/audio_framework/common/native_audio_common.h
@@ -54,42 +54,42 @@ extern "C" {
*/
typedef enum {
/**
- * @brief The call was successful.
+ * @error The call was successful.
*/
AUDIOCOMMON_RESULT_SUCCESS = 0,
/**
- * @brief This means that the input parameter is invalid.
+ * @error This means that the input parameter is invalid.
*/
AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM = 6800101,
/**
- * @brief This means there is no memory left.
+ * @error This means there is no memory left.
*/
AUDIOCOMMON_RESULT_ERROR_NO_MEMORY = 6800102,
/**
- * @brief Execution status exception.
+ * @error Execution status exception.
*/
AUDIOCOMMON_RESULT_ERROR_ILLEGAL_STATE = 6800103,
/**
- * @brief This means the operation is unsupported.
+ * @error This means the operation is unsupported.
*/
AUDIOCOMMON_RESULT_ERROR_UNSUPPORTED = 6800104,
/**
- * @brief This means the operation is timeout.
+ * @error This means the operation is timeout.
*/
AUDIOCOMMON_RESULT_ERROR_TIMEOUT = 6800105,
/**
- * @brief This means reached stream limit.
+ * @error This means reached stream limit.
*/
AUDIOCOMMON_RESULT_ERROR_STREAM_LIMIT = 6800201,
/**
- * @brief An system error has occurred.
+ * @error An system error has occurred.
*/
AUDIOCOMMON_RESULT_ERROR_SYSTEM = 6800301,
} OH_AudioCommon_Result;
diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h
index f4b77d3cfa9e8644c4b071805cfab6d77977d7e1..cf6e5f3b5d2981d82fedb28f5fab6decdafcbf78 100644
--- a/multimedia/audio_framework/common/native_audiostream_base.h
+++ b/multimedia/audio_framework/common/native_audiostream_base.h
@@ -45,34 +45,34 @@ extern "C" {
#endif
/**
- * Define the result of the function execution.
+ * @brief Define the result of the function execution.
*
* @since 10
*/
typedef enum {
/**
- * The call was successful.
+ * @error The call was successful.
*
* @since 10
*/
AUDIOSTREAM_SUCCESS = 0,
/**
- * This means that the function was executed with an invalid input parameter.
+ * @error This means that the function was executed with an invalid input parameter.
*
* @since 10
*/
AUDIOSTREAM_ERROR_INVALID_PARAM = 1,
/**
- * Execution status exception.
+ * @error Execution status exception.
*
* @since 10
*/
AUDIOSTREAM_ERROR_ILLEGAL_STATE = 2,
/**
- * An system error has occurred.
+ * @error An system error has occurred.
*
* @since 10
*/
@@ -80,7 +80,7 @@ typedef enum {
} OH_AudioStream_Result;
/**
- * Define the audio stream type.
+ * @brief Define the audio stream type.
*
* @since 10
*/
@@ -101,7 +101,7 @@ typedef enum {
} OH_AudioStream_Type;
/**
- * Define the audio stream sample format.
+ * @brief Define the audio stream sample format.
*
* @since 10
*/
@@ -133,7 +133,7 @@ typedef enum {
} OH_AudioStream_SampleFormat;
/**
- * Define the audio encoding type.
+ * @brief Define the audio encoding type.
*
* @since 10
*/
@@ -153,7 +153,7 @@ typedef enum {
} OH_AudioStream_EncodingType;
/**
- * Define the audio stream usage.
+ * @brief Define the audio stream usage.
* Audio stream usage is used to describe what work scenario
* the current stream is used for.
*
@@ -238,10 +238,16 @@ typedef enum {
* @since 10
*/
AUDIOSTREAM_USAGE_NAVIGATION = 13,
+ /**
+ * Video call usage.
+ *
+ * @since 12
+ */
+ AUDIOSTREAM_USAGE_VIDEO_COMMUNICATION = 17,
} OH_AudioStream_Usage;
/**
- * Define the audio latency mode.
+ * @brief Define the audio latency mode.
*
* @since 10
*/
@@ -261,7 +267,7 @@ typedef enum {
} OH_AudioStream_LatencyMode;
/**
- * Define the audio event.
+ * @brief Define the audio event.
*
* @since 10
*/
@@ -275,7 +281,7 @@ typedef enum {
} OH_AudioStream_Event;
/**
- * The audio stream states
+ * @brief The audio stream states
*
* @since 10
*/
@@ -325,7 +331,7 @@ typedef enum {
} OH_AudioStream_State;
/**
- * Defines the audio interrupt type.
+ * @brief Defines the audio interrupt type.
*
* @since 10
*/
@@ -345,7 +351,7 @@ typedef enum {
} OH_AudioInterrupt_ForceType;
/**
- * Defines the audio interrupt hint type.
+ * @brief Defines the audio interrupt hint type.
*
* @since 10
*/
@@ -389,7 +395,7 @@ typedef enum {
} OH_AudioInterrupt_Hint;
/**
- * Defines the audio source type.
+ * @brief Defines the audio source type.
*
* @since 10
*/
@@ -449,7 +455,7 @@ typedef enum {
} OH_AudioStream_AudioEffectMode;
/**
- * Defines the audio interrupt mode.
+ * @brief Defines the audio interrupt mode.
*
* @since 12
*/
@@ -465,7 +471,7 @@ typedef enum {
} OH_AudioInterrupt_Mode;
/**
- * Declaring the audio stream builder.
+ * @brief Declaring the audio stream builder.
* The instance of builder is used for creating audio stream.
*
* @since 10
@@ -473,7 +479,7 @@ typedef enum {
typedef struct OH_AudioStreamBuilderStruct OH_AudioStreamBuilder;
/**
- * Declaring the audio renderer stream.
+ * @brief Declaring the audio renderer stream.
* The instance of renderer stream is used for playing audio data.
*
* @since 10
@@ -481,7 +487,7 @@ typedef struct OH_AudioStreamBuilderStruct OH_AudioStreamBuilder;
typedef struct OH_AudioRendererStruct OH_AudioRenderer;
/**
- * Declaring the audio capturer stream.
+ * @brief Declaring the audio capturer stream.
* The instance of renderer stream is used for capturing audio data.
*
* @since 10
@@ -489,7 +495,7 @@ typedef struct OH_AudioRendererStruct OH_AudioRenderer;
typedef struct OH_AudioCapturerStruct OH_AudioCapturer;
/**
- * Declaring the callback struct for renderer stream.
+ * @brief Declaring the callback struct for renderer stream.
*
* @since 10
*/
@@ -542,7 +548,7 @@ typedef struct OH_AudioRenderer_Callbacks_Struct {
} OH_AudioRenderer_Callbacks;
/**
- * Declaring the callback struct for capturer stream.
+ * @brief Declaring the callback struct for capturer stream.
*
* @since 10
*/
diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h
index 0fdb40557d9b25e222b4ccc5b4a23b2a07ca6f38..cc62318f02ee1f7f9ac94a26f69d6e0535ca76e9 100644
--- a/multimedia/audio_framework/common/native_audiostreambuilder.h
+++ b/multimedia/audio_framework/common/native_audiostreambuilder.h
@@ -53,7 +53,8 @@ extern "C" {
*
* @param builder The builder reference to the created result.
* @param type The stream type to be created. {@link #AUDIOSTREAM_TYPE_RENDERER} or {@link #AUDIOSTREAM_TYPE_CAPTURER}
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_Create(OH_AudioStreamBuilder** builder, OH_AudioStream_Type type);
@@ -65,7 +66,10 @@ OH_AudioStream_Result OH_AudioStreamBuilder_Create(OH_AudioStreamBuilder** build
* @since 10
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr.
+ * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} Execution status exception.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_Destroy(OH_AudioStreamBuilder* builder);
@@ -76,7 +80,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_Destroy(OH_AudioStreamBuilder* build
*
* @param capturer Reference created by OH_AudioStreamBuilder
* @param channelCount Pointer to a variable that will be set for the channel count.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.The param of rate invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetSamplingRate(OH_AudioStreamBuilder* builder, int32_t rate);
@@ -87,7 +95,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetSamplingRate(OH_AudioStreamBuilde
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param channelCount The channel count.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.The param of channelCount invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelCount(OH_AudioStreamBuilder* builder, int32_t channelCount);
@@ -98,7 +110,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelCount(OH_AudioStreamBuilde
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param format Sample data format.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetSampleFormat(OH_AudioStreamBuilder* builder,
OH_AudioStream_SampleFormat format);
@@ -110,7 +124,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetSampleFormat(OH_AudioStreamBuilde
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param encodingType Encoding type for the stream client, {@link #AUDIOSTREAM_ENCODING_PCM}
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetEncodingType(OH_AudioStreamBuilder* builder,
OH_AudioStream_EncodingType encodingType);
@@ -122,7 +138,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetEncodingType(OH_AudioStreamBuilde
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param latencyMode Latency mode for the stream client.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetLatencyMode(OH_AudioStreamBuilder* builder,
OH_AudioStream_LatencyMode latencyMode);
@@ -134,7 +152,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetLatencyMode(OH_AudioStreamBuilder
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param channelLayout is the layout of the speaker.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelLayout(OH_AudioStreamBuilder* builder,
OH_AudioChannelLayout channelLayout);
@@ -146,7 +166,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetChannelLayout(OH_AudioStreamBuild
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param usage Set the stream usage for the renderer client.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.The param of usage invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInfo(OH_AudioStreamBuilder* builder,
OH_AudioStream_Usage usage);
@@ -158,7 +182,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInfo(OH_AudioStreamBuilde
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param sourceType Set the source type for the capturer client.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.The param of sourceType invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerInfo(OH_AudioStreamBuilder* builder,
OH_AudioStream_SourceType sourceType);
@@ -171,7 +199,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerInfo(OH_AudioStreamBuilde
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param callbacks Callbacks to the functions that will process renderer stream.
* @param userData Pointer to an application data structure that will be passed to the callback functions.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.StreamType invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererCallback(OH_AudioStreamBuilder* builder,
OH_AudioRenderer_Callbacks callbacks, void* userData);
@@ -179,11 +211,16 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererCallback(OH_AudioStreamBu
/**
* @brief Set the callback when the output device of an audio renderer changed.
*
+ * @since 11
+ *
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param callback Callback to the function that will process this device change event.
* @param userData Pointer to an application data structure that will be passed to the callback functions.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 11
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.StreamType invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererOutputDeviceChangeCallback(OH_AudioStreamBuilder* builder,
OH_AudioRenderer_OutputDeviceChangeCallback callback, void* userData);
@@ -191,10 +228,15 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererOutputDeviceChangeCallbac
/**
* @brief Set the privacy of audio render.
*
+ * @since 12
+ *
* @param builder Builder provided by OH_AudioStreamBuilder_Create()
* @param privacy Privacy type.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.StreamType invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererPrivacy(OH_AudioStreamBuilder* builder,
OH_AudioStream_PrivacyType privacy);
@@ -207,7 +249,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererPrivacy(OH_AudioStreamBui
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param callbacks Callbacks to the functions that will process capturer stream.
* @param userData Pointer to an application data structure that will be passed to the callback functions.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.StreamType invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBuilder* builder,
OH_AudioCapturer_Callbacks callbacks, void* userData);
@@ -219,10 +265,16 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBu
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param audioRenderer Pointer to a viriable to receive the stream client.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.StreamType invalid;
+ * 3.Create OHAudioRenderer failed.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_GenerateRenderer(OH_AudioStreamBuilder* builder,
OH_AudioRenderer** audioRenderer);
+
/*
* Create the audio capturer client.
*
@@ -230,7 +282,12 @@ OH_AudioStream_Result OH_AudioStreamBuilder_GenerateRenderer(OH_AudioStreamBuild
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param audioCapturer Pointer to a viriable to receive the stream client.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.StreamType invalid;
+ * 3.Create OHAudioRenderer failed.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_GenerateCapturer(OH_AudioStreamBuilder* builder,
OH_AudioCapturer** audioCapturer);
@@ -245,7 +302,9 @@ OH_AudioStream_Result OH_AudioStreamBuilder_GenerateCapturer(OH_AudioStreamBuild
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param frameSize The data frame size for each callback.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} The param of builder is nullptr.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetFrameSizeInCallback(OH_AudioStreamBuilder* builder,
int32_t frameSize);
@@ -258,7 +317,11 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetFrameSizeInCallback(OH_AudioStrea
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param callback Callback to the functions that will write audio data with metadata to the renderer.
* @param userData Pointer to an application data structure that will be passed to the callback functions.
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.StreamType invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback(OH_AudioStreamBuilder* builder,
OH_AudioRenderer_WriteDataWithMetadataCallback callback, void* userData);
@@ -266,10 +329,16 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback(OH_
/**
* @brief Set the interrupt mode of the stream client
*
+ * @since 12
+ *
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param mode The audio interrupt mode
- * @return {@link #AUDIOSTREAM_SUCCESS} or an undesired error.
- * @since 12
+ * @return Function result code:
+ * {@link AUDIOSTREAM_SUCCESS} If the execution is successful.
+ * {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
+ * 1.The param of builder is nullptr;
+ * 2.The param of mode invalid;
+ * 3.StreamType invalid.
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInterruptMode(OH_AudioStreamBuilder* builder,
OH_AudioInterrupt_Mode mode);
diff --git a/multimedia/av_codec/audio_codec/libnative_media_acodec.ndk.json b/multimedia/av_codec/audio_codec/libnative_media_acodec.ndk.json
index 47dfd626d6ba2dbae6e39e35aa809a2a393b581e..ec87a5d85222f88972fdd5cc576e2a3bf6493ef4 100644
--- a/multimedia/av_codec/audio_codec/libnative_media_acodec.ndk.json
+++ b/multimedia/av_codec/audio_codec/libnative_media_acodec.ndk.json
@@ -58,5 +58,9 @@
{
"first_introduced": "11",
"name": "OH_AudioCodec_IsValid"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AudioCodec_SetDecryptionConfig"
}
]
diff --git a/multimedia/av_codec/avcencinfo/BUILD.gn b/multimedia/av_codec/avcencinfo/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..a1f43c09aecf7e5ce9e495673ad9e0a484ec5e49
--- /dev/null
+++ b/multimedia/av_codec/avcencinfo/BUILD.gn
@@ -0,0 +1,30 @@
+# Copyright (C) 2022 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build/ohos.gni")
+import("//build/ohos/ndk/ndk.gni")
+ohos_ndk_headers("native_media_avcencinfo_header") {
+ dest_dir = "$ndk_headers_out_dir/multimedia/player_framework"
+ sources = [ "../native_cencinfo.h" ]
+}
+
+ohos_ndk_library("libnative_media_avcencinfo") {
+ ndk_description_file = "./libnative_media_avcencinfo.ndk.json"
+ min_compact_version = "12"
+ output_name = "native_media_avcencinfo"
+ output_extension = "so"
+
+ system_capability = "SystemCapability.Multimedia.Media.Spliter"
+ system_capability_headers =
+ [ "multimedia/player_framework/native_cencinfo.h" ]
+}
diff --git a/multimedia/av_codec/avcencinfo/libnative_media_avcencinfo.ndk.json b/multimedia/av_codec/avcencinfo/libnative_media_avcencinfo.ndk.json
new file mode 100644
index 0000000000000000000000000000000000000000..be84ad9ae96c279090b4cd56d8f141199e1d781f
--- /dev/null
+++ b/multimedia/av_codec/avcencinfo/libnative_media_avcencinfo.ndk.json
@@ -0,0 +1,30 @@
+[
+ {
+ "first_introduced": "12",
+ "name": "OH_AVCencInfo_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVCencInfo_Destroy"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVCencInfo_SetAlgo"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVCencInfo_SetKeyIdAndIv"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVCencInfo_SetSubsampleInfo"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVCencInfo_SetMode"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVCencInfo_SetAVBuffer"
+ }
+]
diff --git a/multimedia/av_codec/avdemuxer/libnative_media_avdemuxer.ndk.json b/multimedia/av_codec/avdemuxer/libnative_media_avdemuxer.ndk.json
index 2a3cb212f6ff277c6801502b05a573e86a028c25..dcddf3df46b0da2831e34e107322d476701bc311 100644
--- a/multimedia/av_codec/avdemuxer/libnative_media_avdemuxer.ndk.json
+++ b/multimedia/av_codec/avdemuxer/libnative_media_avdemuxer.ndk.json
@@ -34,5 +34,9 @@
{
"first_introduced": "11",
"name": "OH_AVDemuxer_GetMediaKeySystemInfo"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVDemuxer_SetDemuxerMediaKeySystemInfoCallback"
}
]
diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json
index d25ea96d9a10382fab43bed53aa4bb9455e918c5..6baccfac54f705f9d009acdb873cd4cf3cf0d788 100644
--- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json
+++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json
@@ -59,6 +59,10 @@
"first_introduced": "11",
"name": "OH_AVCODEC_MIMETYPE_AUDIO_G711MU"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_AVCODEC_MIMETYPE_AUDIO_LBVC"
+ },
{
"first_introduced": "12",
"name": "OH_AVCODEC_MIMETYPE_AUDIO_APE"
@@ -331,6 +335,14 @@
"first_introduced": "12",
"name": "OH_MD_KEY_VIDEO_SLICE_HEIGHT"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_MD_KEY_VIDEO_PIC_WIDTH"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_MD_KEY_VIDEO_PIC_HEIGHT"
+ },
{
"first_introduced": "12",
"name": "OH_MD_KEY_VIDEO_ENABLE_LOW_LATENCY"
diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h
index 7125730df608567f10844e7d04f394e234629fe1..0673969adfd5e2582f37cc6886fed86033175bdc 100644
--- a/multimedia/av_codec/native_avcapability.h
+++ b/multimedia/av_codec/native_avcapability.h
@@ -134,6 +134,7 @@ int32_t OH_AVCapability_GetMaxSupportedInstances(OH_AVCapability *capability);
* @param bitrateRange Output parameter. Encoder bitrate range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the bitrateRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetEncoderBitrateRange(OH_AVCapability *capability, OH_AVRange *bitrateRange);
@@ -155,6 +156,7 @@ bool OH_AVCapability_IsEncoderBitrateModeSupported(OH_AVCapability *capability,
* @param qualityRange Output parameter. Encoder quality range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the qualityRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetEncoderQualityRange(OH_AVCapability *capability, OH_AVRange *qualityRange);
@@ -166,6 +168,7 @@ OH_AVErrCode OH_AVCapability_GetEncoderQualityRange(OH_AVCapability *capability,
* @param complexityRange Output parameter. Encoder complexity range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the complexityRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetEncoderComplexityRange(OH_AVCapability *capability, OH_AVRange *complexityRange);
@@ -178,6 +181,9 @@ OH_AVErrCode OH_AVCapability_GetEncoderComplexityRange(OH_AVCapability *capabili
* @param sampleRateNum Output parameter. The element number of the sample rates array
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, the sampleRates is nullptr, or sampleRateNum is nullptr.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_NO_MEMORY}, internal use memory malloc failed.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetAudioSupportedSampleRates(OH_AVCapability *capability, const int32_t **sampleRates,
@@ -190,6 +196,7 @@ OH_AVErrCode OH_AVCapability_GetAudioSupportedSampleRates(OH_AVCapability *capab
* @param channelCountRange Output parameter. Audio channel count range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the channelCountRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetAudioChannelCountRange(OH_AVCapability *capability, OH_AVRange *channelCountRange);
@@ -201,6 +208,7 @@ OH_AVErrCode OH_AVCapability_GetAudioChannelCountRange(OH_AVCapability *capabili
* @param widthAlignment Output parameter. Video width alignment
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the widthAlignment is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoWidthAlignment(OH_AVCapability *capability, int32_t *widthAlignment);
@@ -212,6 +220,7 @@ OH_AVErrCode OH_AVCapability_GetVideoWidthAlignment(OH_AVCapability *capability,
* @param heightAlignment Output parameter. Video height alignment
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the heightAlignment is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoHeightAlignment(OH_AVCapability *capability, int32_t *heightAlignment);
@@ -224,6 +233,8 @@ OH_AVErrCode OH_AVCapability_GetVideoHeightAlignment(OH_AVCapability *capability
* @param widthRange Output parameter. Video width range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, the height is not within the supported range
+ * obtained through {@link OH_AVCapability_GetVideoHeightRange}, or the widthRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoWidthRangeForHeight(OH_AVCapability *capability, int32_t height,
@@ -237,6 +248,8 @@ OH_AVErrCode OH_AVCapability_GetVideoWidthRangeForHeight(OH_AVCapability *capabi
* @param heightRange Output parameter. Video height range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, the width is not within the supported range
+ * obtained through {@link OH_AVCapability_GetVideoWidthRange}, or the heightRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoHeightRangeForWidth(OH_AVCapability *capability, int32_t width,
@@ -249,6 +262,7 @@ OH_AVErrCode OH_AVCapability_GetVideoHeightRangeForWidth(OH_AVCapability *capabi
* @param widthRange Output parameter. Video width range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the widthRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoWidthRange(OH_AVCapability *capability, OH_AVRange *widthRange);
@@ -260,6 +274,7 @@ OH_AVErrCode OH_AVCapability_GetVideoWidthRange(OH_AVCapability *capability, OH_
* @param heightRange Output parameter. Video height range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the heightRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoHeightRange(OH_AVCapability *capability, OH_AVRange *heightRange);
@@ -282,6 +297,7 @@ bool OH_AVCapability_IsVideoSizeSupported(OH_AVCapability *capability, int32_t w
* @param frameRateRange Output parameter. Video frame rate range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, or the frameRateRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoFrameRateRange(OH_AVCapability *capability, OH_AVRange *frameRateRange);
@@ -295,6 +311,8 @@ OH_AVErrCode OH_AVCapability_GetVideoFrameRateRange(OH_AVCapability *capability,
* @param frameRateRange Output parameter. Frame rate range
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, the combination of width and height is
+ * not supported, or the frameRateRange is nullptr.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoFrameRateRangeForSize(OH_AVCapability *capability, int32_t width, int32_t height,
@@ -322,6 +340,10 @@ bool OH_AVCapability_AreVideoSizeAndFrameRateSupported(OH_AVCapability *capabili
* @param pixelFormatNum Output parameter. The element number of the pixel format array
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, the pixelFormats is nullptr,
+ * or the pixelFormatNum is nullptr.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_NO_MEMORY}, internal use memory malloc failed.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetVideoSupportedPixelFormats(OH_AVCapability *capability, const int32_t **pixelFormats,
@@ -335,6 +357,9 @@ OH_AVErrCode OH_AVCapability_GetVideoSupportedPixelFormats(OH_AVCapability *capa
* @param profileNum Output parameter. The element number of the profile array
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, the profiles is nullptr, or the profileNum is nullptr.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_NO_MEMORY}, internal use memory malloc failed.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetSupportedProfiles(OH_AVCapability *capability, const int32_t **profiles,
@@ -349,6 +374,10 @@ OH_AVErrCode OH_AVCapability_GetSupportedProfiles(OH_AVCapability *capability, c
* @param levelNum Output parameter. The element number of the level array
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the capability is invalid, the profile is not within the supported profile array
+ * obtained through {@link OH_AVCapability_GetSupportedProfiles}, the levels is nullptr, or the levelNum is nullptr.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_NO_MEMORY}, internal use memory malloc failed.
* @since 10
*/
OH_AVErrCode OH_AVCapability_GetSupportedLevelsForProfile(OH_AVCapability *capability, int32_t profile,
diff --git a/multimedia/av_codec/native_avcodec_audiocodec.h b/multimedia/av_codec/native_avcodec_audiocodec.h
index cc34cd03786a38e9994ae155b8750d0904032375..4f1af4b2c08c6c4e1cb0ab7c361465c9c0dc57cb 100644
--- a/multimedia/av_codec/native_avcodec_audiocodec.h
+++ b/multimedia/av_codec/native_avcodec_audiocodec.h
@@ -24,6 +24,13 @@
extern "C" {
#endif
+/**
+ * @brief MediaKeySession field.
+ * @since 12
+ * @version 1.0
+ */
+typedef struct MediaKeySession MediaKeySession;
+
/**
* @brief Create an audio encoder or decoder instance from the mime type, which is recommended in most cases.
* @syscap SystemCapability.Multimedia.Media.AudioCodec
@@ -50,6 +57,10 @@ OH_AVCodec *OH_AudioCodec_CreateByName(const char *name);
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_Destroy(OH_AVCodec *codec);
@@ -63,6 +74,8 @@ OH_AVErrCode OH_AudioCodec_Destroy(OH_AVCodec *codec);
* @param userData User specific data
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, input parameter is empty or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_RegisterCallback(OH_AVCodec *codec, OH_AVCodecCallback callback, void *userData);
@@ -75,6 +88,11 @@ OH_AVErrCode OH_AudioCodec_RegisterCallback(OH_AVCodec *codec, OH_AVCodecCallbac
* @param format A pointer to an OH_AVFormat giving a description of the audio track to be encoded or decoded
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, input parameter is empty or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, operation not permitted.
+ * This could be due to an incorrect state or an unsupported operation.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_Configure(OH_AVCodec *codec, const OH_AVFormat *format);
@@ -86,6 +104,11 @@ OH_AVErrCode OH_AudioCodec_Configure(OH_AVCodec *codec, const OH_AVFormat *forma
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, operation not permitted.
+ * This could be due to an incorrect state or an unsupported operation.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_Prepare(OH_AVCodec *codec);
@@ -97,6 +120,11 @@ OH_AVErrCode OH_AudioCodec_Prepare(OH_AVCodec *codec);
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, operation not permitted.
+ * This could be due to an incorrect state or an unsupported operation.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_Start(OH_AVCodec *codec);
@@ -109,6 +137,11 @@ OH_AVErrCode OH_AudioCodec_Start(OH_AVCodec *codec);
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, operation not permitted.
+ * This could be due to an incorrect state or an unsupported operation.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_Stop(OH_AVCodec *codec);
@@ -121,6 +154,11 @@ OH_AVErrCode OH_AudioCodec_Stop(OH_AVCodec *codec);
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, operation not permitted.
+ * This could be due to an incorrect state or an unsupported operation.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_Flush(OH_AVCodec *codec);
@@ -132,6 +170,8 @@ OH_AVErrCode OH_AudioCodec_Flush(OH_AVCodec *codec);
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the codec is nullptr or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
* @since 11
*/
@@ -157,14 +197,19 @@ OH_AVFormat *OH_AudioCodec_GetOutputDescription(OH_AVCodec *codec);
* @param format OH_AVFormat handle pointer
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, input parameter is empty or invalid.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, operation not permitted.
+ * This could be due to an incorrect state or an unsupported operation.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_SetParameter(OH_AVCodec *codec, const OH_AVFormat *format);
/**
- * @brief Submit the input buffer filled with data to the audio codec. The {@link OH_AVCodecOnNeedInputData} callback
+ * @brief Submit the input buffer filled with data to the audio codec. The {@link OH_AVCodecOnNeedInputBuffer} callback
* will report the available input buffer and the corresponding index value. Once the buffer with the specified index
- * is submitted to the audio codec, the buffer cannot be accessed again until the {@link OH_AVCodecOnNeedInputData}
+ * is submitted to the audio codec, the buffer cannot be accessed again until the {@link OH_AVCodecOnNeedInputBuffer}
* callback is received again reporting that the buffer with the same index is available. In addition, for some
* codecs, it is required to input Codec-Specific-Data to the codec at the beginning to initialize the encoding or
* decoding process of the codec.
@@ -173,6 +218,12 @@ OH_AVErrCode OH_AudioCodec_SetParameter(OH_AVCodec *codec, const OH_AVFormat *fo
* @param index Enter the index value corresponding to the Buffer
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, input parameter is empty or invalid. Buffer index
+ * should be given by {@link OH_AVCodecOnNeedInputBuffer}.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, operation not permitted.
+ * This could be due to an incorrect state or an unsupported operation.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_PushInputBuffer(OH_AVCodec *codec, uint32_t index);
@@ -184,6 +235,12 @@ OH_AVErrCode OH_AudioCodec_PushInputBuffer(OH_AVCodec *codec, uint32_t index);
* @param index The index value corresponding to the output Buffer
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, input parameter is empty or invalid. Buffer index
+ * should be given by {@link OH_AVCodecOnNewOutputBuffer}.
+ * {@link AV_ERR_INVALID_STATE}, the interface was called in an invalid state.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, operation not permitted.
+ * This could be due to an incorrect state or an unsupported operation.
+ * {@link AV_ERR_UNKNOWN}, internal error occurred, it is recommended to check the logs.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_FreeOutputBuffer(OH_AVCodec *codec, uint32_t index);
@@ -197,10 +254,26 @@ OH_AVErrCode OH_AudioCodec_FreeOutputBuffer(OH_AVCodec *codec, uint32_t index);
* false if the codec instance is invalid
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, input parameter is empty or invalid.
* @since 11
*/
OH_AVErrCode OH_AudioCodec_IsValid(OH_AVCodec *codec, bool *isValid);
+/**
+ * @brief Set decryption info.
+ * @syscap SystemCapability.Multimedia.Media.AudioCodec
+ * @param codec Pointer to an OH_AVCodec instance
+ * @param mediaKeySession A media key session instance with decryption function.
+ * @param secureAudio Require secure decoder or not.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_INVALID_VAL} 3 - If the codec instance is nullptr or invalid,
+ * the mediaKeySession is nullptr or invalid.
+ * {@link AV_ERR_INVALID_STATE} 8 - If the codec service is invalid.
+ * @since 12
+ * @version 1.0
+*/
+OH_AVErrCode OH_AudioCodec_SetDecryptionConfig(OH_AVCodec *codec, MediaKeySession *mediaKeySession,
+ bool secureAudio);
#ifdef __cplusplus
}
#endif
diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h
index a567448cf69b8ed9d760e075f3f59530e7aeb841..5d60a6feda5d58971ae52f317179256c6416fdc8 100644
--- a/multimedia/av_codec/native_avcodec_base.h
+++ b/multimedia/av_codec/native_avcodec_base.h
@@ -218,6 +218,14 @@ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_AMR_WB;
extern const char *OH_AVCODEC_MIMETYPE_AUDIO_OPUS;
extern const char *OH_AVCODEC_MIMETYPE_AUDIO_G711MU;
+/**
+ * @brief Enumerates the MIME type of audio low bitrate voice codec.
+ *
+ * @syscap SystemCapability.Multimedia.Media.CodecBase
+ * @since 12
+ */
+extern const char *OH_AVCODEC_MIMETYPE_AUDIO_LBVC;
+
/**
* @brief Enumerates the MIME type of audio ape codec.
*
@@ -502,6 +510,24 @@ extern const char *OH_MD_KEY_VIDEO_STRIDE;
* @since 12
*/
extern const char *OH_MD_KEY_VIDEO_SLICE_HEIGHT;
+/**
+ * @brief Key for describing the valid picture width of the video, value type is int32_t.
+ * Get the value from an OH_AVFormat instance, which obtained by calling {@link OH_VideoDecoder_GetOutputDescription}
+ * or {@link OH_AVCodecOnStreamChanged}.
+ *
+ * @syscap SystemCapability.Multimedia.Media.CodecBase
+ * @since 12
+ */
+extern const char *OH_MD_KEY_VIDEO_PIC_WIDTH;
+/**
+ * @brief Key for describing the valid picture height of the video, value type is int32_t.
+ * Get the value from an OH_AVFormat instance, which obtained by calling {@link OH_VideoDecoder_GetOutputDescription}
+ * or {@link OH_AVCodecOnStreamChanged}.
+ *
+ * @syscap SystemCapability.Multimedia.Media.CodecBase
+ * @since 12
+ */
+extern const char *OH_MD_KEY_VIDEO_PIC_HEIGHT;
/**
* @brief Key to enable the low latency mode, value type is int32_t (0 or 1):1 is enabled, 0 otherwise.
* If enabled, the video encoder or video decoder doesn't hold input and output data more than required by
@@ -586,6 +612,16 @@ typedef enum OH_AVOutputFormat {
AV_OUTPUT_FORMAT_DEFAULT = 0,
AV_OUTPUT_FORMAT_MPEG_4 = 2,
AV_OUTPUT_FORMAT_M4A = 6,
+ /**
+ * The muxer output amr file format.
+ * @since 12
+ */
+ AV_OUTPUT_FORMAT_AMR = 8,
+ /**
+ * The muxer output mp3 file format.
+ * @since 12
+ */
+ AV_OUTPUT_FORMAT_MP3 = 9,
} OH_AVOutputFormat;
/**
diff --git a/multimedia/av_codec/native_avcodec_videodecoder.h b/multimedia/av_codec/native_avcodec_videodecoder.h
index 6c41bb59980a422c0a350c601ceae8221b1739b8..672b8db4dfbaa24e2148a4406dbb9b06a10aa929 100644
--- a/multimedia/av_codec/native_avcodec_videodecoder.h
+++ b/multimedia/av_codec/native_avcodec_videodecoder.h
@@ -30,7 +30,8 @@ typedef struct MediaKeySession MediaKeySession;
* @brief Creates a video decoder instance from the mime type, which is recommended in most cases.
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param mime mime type description string, refer to {@link AVCODEC_MIME_TYPE}
- * @return Returns a Pointer to an OH_AVCodec instance
+ * @return Returns a Pointer to an OH_AVCodec instance.
+ * Return nullptr if memory ran out or the mime type is not supported.
* @since 9
* @version 1.0
*/
@@ -41,7 +42,8 @@ OH_AVCodec *OH_VideoDecoder_CreateByMime(const char *mime);
* The premise of using this interface is to know the exact name of the decoder.
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param name video codec name
- * @return Returns a Pointer to an OH_AVCodec instance
+ * @return Returns a Pointer to an OH_AVCodec instance.
+ * Return nullptr if memory ran out or the decoder name is not supported.
* @since 9
* @version 1.0
*/
@@ -51,8 +53,12 @@ OH_AVCodec *OH_VideoDecoder_CreateByName(const char *name);
* @brief Clear the internal resources of the decoder and destroy the decoder instance
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param codec Pointer to an OH_AVCodec instance
- * @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * @return Returns AV_ERR_OK if succeed,
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
* @since 9
* @version 1.0
*/
@@ -66,7 +72,12 @@ OH_AVErrCode OH_VideoDecoder_Destroy(OH_AVCodec *codec);
* @param callback A collection of all callback functions, see {@link OH_AVCodecAsyncCallback}
* @param userData User specific data
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state, must be called before Prepare.
* @deprecated since 11
* @useinstead OH_VideoDecoder_RegisterCallback
* @since 9
@@ -82,7 +93,12 @@ OH_AVErrCode OH_VideoDecoder_SetCallback(OH_AVCodec *codec, OH_AVCodecAsyncCallb
* @param callback A collection of all callback functions, see {@link OH_AVCodecCallback}
* @param userData User specific data
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state, must be called before Prepare.
* @since 11
*/
OH_AVErrCode OH_VideoDecoder_RegisterCallback(OH_AVCodec *codec, OH_AVCodecCallback callback, void *userData);
@@ -94,7 +110,13 @@ OH_AVErrCode OH_VideoDecoder_RegisterCallback(OH_AVCodec *codec, OH_AVCodecCallb
* @param codec Pointer to an OH_AVCodec instance
* @param window A pointer to a OHNativeWindow instance, see {@link OHNativeWindow}
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface in buffer mode.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -107,7 +129,12 @@ OH_AVErrCode OH_VideoDecoder_SetSurface(OH_AVCodec *codec, OHNativeWindow *windo
* @param codec Pointer to an OH_AVCodec instance
* @param format A pointer to an OH_AVFormat to give the description of the video track to be decoded
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid. Invalid param in format.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state, must be called before Prepare.
* @since 9
* @version 1.0
*/
@@ -119,7 +146,12 @@ OH_AVErrCode OH_VideoDecoder_Configure(OH_AVCodec *codec, OH_AVFormat *format);
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -131,7 +163,12 @@ OH_AVErrCode OH_VideoDecoder_Prepare(OH_AVCodec *codec);
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -143,7 +180,12 @@ OH_AVErrCode OH_VideoDecoder_Start(OH_AVCodec *codec);
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -156,7 +198,12 @@ OH_AVErrCode OH_VideoDecoder_Stop(OH_AVCodec *codec);
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -168,7 +215,12 @@ OH_AVErrCode OH_VideoDecoder_Flush(OH_AVCodec *codec);
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -180,7 +232,8 @@ OH_AVErrCode OH_VideoDecoder_Reset(OH_AVCodec *codec);
* to be manually released by the caller.
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param codec Pointer to an OH_AVCodec instance
- * @return Returns a pointer to an OH_AVFormat instance
+ * @return Returns a pointer to an OH_AVFormat instance.
+ * Return nullptr if the decoder is nullptr or invaild.
* @since 9
* @version 1.0
*/
@@ -193,7 +246,12 @@ OH_AVFormat *OH_VideoDecoder_GetOutputDescription(OH_AVCodec *codec);
* @param codec Pointer to an OH_AVCodec instance
* @param format pointer to an OH_AVFormat instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid. Invalid param in format.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -211,7 +269,13 @@ OH_AVErrCode OH_VideoDecoder_SetParameter(OH_AVCodec *codec, OH_AVFormat *format
* @param index Enter the index value corresponding to the Buffer
* @param attr Information describing the data contained in the Buffer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNeedInputData}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @deprecated since 11
* @useinstead OH_VideoDecoder_PushInputBuffer
* @since 9
@@ -227,7 +291,13 @@ OH_AVErrCode OH_VideoDecoder_PushInputData(OH_AVCodec *codec, uint32_t index, OH
* @param codec Pointer to an OH_AVCodec instance
* @param index The index value corresponding to the output Buffer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNewOutputData}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @deprecated since 11
* @useinstead OH_VideoDecoder_RenderOutputBuffer
* @since 9
@@ -241,7 +311,13 @@ OH_AVErrCode OH_VideoDecoder_RenderOutputData(OH_AVCodec *codec, uint32_t index)
* @param codec Pointer to an OH_AVCodec instance
* @param index The index value corresponding to the output Buffer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNewOutputData}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @deprecated since 11
* @useinstead OH_VideoDecoder_FreeOutputBuffer
* @since 9
@@ -260,7 +336,13 @@ OH_AVErrCode OH_VideoDecoder_FreeOutputData(OH_AVCodec *codec, uint32_t index);
* @param codec Pointer to an OH_AVCodec instance
* @param index The index of the input buffer.
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNeedInputBuffer}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 11
*/
OH_AVErrCode OH_VideoDecoder_PushInputBuffer(OH_AVCodec *codec, uint32_t index);
@@ -272,8 +354,14 @@ OH_AVErrCode OH_VideoDecoder_PushInputBuffer(OH_AVCodec *codec, uint32_t index);
* @syscap SystemCapability.Multimedia.Media.VideoDecoder
* @param codec Pointer to an OH_AVCodec instance
* @param index The index value corresponding to the output Buffer
- * @return Returns AV_ERR_OK if the execution is successful, otherwise returns a specific error code, refer to {@link
- * OH_AVErrCode}
+ * @return Returns AV_ERR_OK if the execution is successful,
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNewOutputBuffer}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 11
*/
OH_AVErrCode OH_VideoDecoder_RenderOutputBuffer(OH_AVCodec *codec, uint32_t index);
@@ -284,7 +372,13 @@ OH_AVErrCode OH_VideoDecoder_RenderOutputBuffer(OH_AVCodec *codec, uint32_t inde
* @param codec Pointer to an OH_AVCodec instance
* @param index The index value corresponding to the output Buffer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNewOutputBuffer}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 11
*/
OH_AVErrCode OH_VideoDecoder_FreeOutputBuffer(OH_AVCodec *codec, uint32_t index);
@@ -297,7 +391,11 @@ OH_AVErrCode OH_VideoDecoder_FreeOutputBuffer(OH_AVCodec *codec, uint32_t index)
* @param isValid Output parameter. A pointer to a boolean instance, it is true if the codec instance is valid,
* false if the codec instance is invalid
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the decoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
* @since 10
*/
OH_AVErrCode OH_VideoDecoder_IsValid(OH_AVCodec *codec, bool *isValid);
@@ -309,8 +407,11 @@ OH_AVErrCode OH_VideoDecoder_IsValid(OH_AVCodec *codec, bool *isValid);
* @param codec Pointer to an OH_AVCodec instance
* @param mediaKeySession A media key session instance with decryption function.
* @param secureVideoPath Require secure decoder or not.
- * @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_OPERATE_NOT_PERMIT} 2 - If the codec service or the media key session
+ * service is in wrong status.
+ * {@link AV_ERR_INVALID_VAL} 3 - If the codec instance is nullptr or invalid,
+ * the mediaKeySession is nullptr or invalid.
* @since 11
* @version 1.0
*/
diff --git a/multimedia/av_codec/native_avcodec_videoencoder.h b/multimedia/av_codec/native_avcodec_videoencoder.h
index 5d51db899ce7ea39023f24b885814643d356d963..9ac83852f148fe921fb69be13ffd54952f1953d5 100644
--- a/multimedia/av_codec/native_avcodec_videoencoder.h
+++ b/multimedia/av_codec/native_avcodec_videoencoder.h
@@ -43,7 +43,8 @@ typedef void (*OH_VideoEncoder_OnNeedInputParameter)(OH_AVCodec *codec, uint32_t
* @brief Creates a video encoder instance from the mime type, which is recommended in most cases.
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param mime mime type description string, refer to {@link AVCODEC_MIME_TYPE}
- * @return Returns a Pointer to an OH_AVCodec instance
+ * @return Returns a Pointer to an OH_AVCodec instance.
+ * Return nullptr if memory ran out or the mime type is not supported.
* @since 9
* @version 1.0
*/
@@ -54,7 +55,8 @@ OH_AVCodec *OH_VideoEncoder_CreateByMime(const char *mime);
* know the exact name of the encoder.
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param name Video encoder name
- * @return Returns a Pointer to an OH_AVCodec instance
+ * @return Returns a Pointer to an OH_AVCodec instance.
+ * Return nullptr if memory ran out or the encoder name is not supported.
* @since 9
* @version 1.0
*/
@@ -65,7 +67,11 @@ OH_AVCodec *OH_VideoEncoder_CreateByName(const char *name);
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
* @since 9
* @version 1.0
*/
@@ -79,7 +85,12 @@ OH_AVErrCode OH_VideoEncoder_Destroy(OH_AVCodec *codec);
* @param callback A collection of all callback functions, see {@link OH_AVCodecAsyncCallback}
* @param userData User specific data
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state, must be called before Prepare.
* @deprecated since 11
* @useinstead OH_VideoEncoder_RegisterCallback
* @since 9
@@ -94,8 +105,13 @@ OH_AVErrCode OH_VideoEncoder_SetCallback(OH_AVCodec *codec, OH_AVCodecAsyncCallb
* @param codec Pointer to an OH_AVCodec instance
* @param callback A collection of all callback functions, see {@link OH_AVCodecCallback}
* @param userData User specific data
- * @return Returns AV_ERR_OK if the execution is successful, otherwise returns a specific error code, refer to {@link
- * OH_AVErrCode}
+ * @return Returns AV_ERR_OK if the execution is successful,
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state, must be called before Prepare.
* @since 11
*/
OH_AVErrCode OH_VideoEncoder_RegisterCallback(OH_AVCodec *codec, OH_AVCodecCallback callback, void *userData);
@@ -109,8 +125,13 @@ OH_AVErrCode OH_VideoEncoder_RegisterCallback(OH_AVCodec *codec, OH_AVCodecCallb
* @param codec Pointer to an OH_AVCodec instance
* @param onInputParameter A callback functions, see {@link OH_VideoEncoder_OnNeedInputParameter}
* @param userData User specific data
- * @return Returns AV_ERR_OK if the execution is successful, otherwise returns a specific error code, refer to {@link
- * OH_AVErrCode}
+ * @return Returns AV_ERR_OK if the execution is successful,
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state, must be called before Prepare.
* @since 12
*/
OH_AVErrCode OH_VideoEncoder_RegisterParameterCallback(OH_AVCodec *codec,
@@ -124,7 +145,12 @@ OH_AVErrCode OH_VideoEncoder_RegisterParameterCallback(OH_AVCodec *codec,
* @param codec Pointer to an OH_AVCodec instance
* @param format A pointer to an OH_AVFormat that gives the description of the video track to be encoded
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid. Invalid param in format.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state, must be called before Prepare.
* @since 9
* @version 1.0
*/
@@ -136,7 +162,12 @@ OH_AVErrCode OH_VideoEncoder_Configure(OH_AVCodec *codec, OH_AVFormat *format);
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -148,7 +179,12 @@ OH_AVErrCode OH_VideoEncoder_Prepare(OH_AVCodec *codec);
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -159,7 +195,12 @@ OH_AVErrCode OH_VideoEncoder_Start(OH_AVCodec *codec);
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -172,7 +213,12 @@ OH_AVErrCode OH_VideoEncoder_Stop(OH_AVCodec *codec);
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -184,7 +230,12 @@ OH_AVErrCode OH_VideoEncoder_Flush(OH_AVCodec *codec);
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -196,7 +247,8 @@ OH_AVErrCode OH_VideoEncoder_Reset(OH_AVCodec *codec);
* be manually released by the caller.
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
- * @return Returns a pointer to an OH_AVFormat instance
+ * @return Returns a pointer to an OH_AVFormat instance.
+ * Return nullptr if the codec is nullptr or invaild.
* @since 9
* @version 1.0
*/
@@ -209,7 +261,12 @@ OH_AVFormat *OH_VideoEncoder_GetOutputDescription(OH_AVCodec *codec);
* @param codec Pointer to an OH_AVCodec instance
* @param format OH_AVFormat handle pointer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid. Invalid param in format.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -222,7 +279,12 @@ OH_AVErrCode OH_VideoEncoder_SetParameter(OH_AVCodec *codec, OH_AVFormat *format
* @param window A pointer to a OHNativeWindow instance, see {@link OHNativeWindow}, the application is responsible for
* managing the life cycle of the window, call OH_NativeWindow_DestroyNativeWindow() when done.
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, inner resource has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -234,7 +296,13 @@ OH_AVErrCode OH_VideoEncoder_GetSurface(OH_AVCodec *codec, OHNativeWindow **wind
* @param codec Pointer to an OH_AVCodec instance
* @param index The index value corresponding to the output Buffer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNewOutputData}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @deprecated since 11
* @useinstead OH_VideoEncoder_FreeOutputBuffer
* @since 9
@@ -248,7 +316,12 @@ OH_AVErrCode OH_VideoEncoder_FreeOutputData(OH_AVCodec *codec, uint32_t index);
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 9
* @version 1.0
*/
@@ -261,7 +334,13 @@ OH_AVErrCode OH_VideoEncoder_NotifyEndOfStream(OH_AVCodec *codec);
* @param index Enter the index value corresponding to the Buffer
* @param attr Information describing the data contained in the Buffer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNeedInputData}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @deprecated since 11
* @useinstead OH_VideoEncoder_PushInputBuffer
* @since 10
@@ -274,7 +353,14 @@ OH_AVErrCode OH_VideoEncoder_PushInputData(OH_AVCodec *codec, uint32_t index, OH
* @param codec Pointer to an OH_AVCodec instance
* @param index Enter the index value corresponding to the Buffer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNeedInputBuffer}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
+
* @since 11
*/
OH_AVErrCode OH_VideoEncoder_PushInputBuffer(OH_AVCodec *codec, uint32_t index);
@@ -286,7 +372,13 @@ OH_AVErrCode OH_VideoEncoder_PushInputBuffer(OH_AVCodec *codec, uint32_t index);
* @param codec Pointer to an OH_AVCodec instance
* @param index Enter the index value corresponding to the input parameter
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * Index should be given by {@link OH_VideoEncoder_OnNeedInputParameter}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 12
*/
OH_AVErrCode OH_VideoEncoder_PushInputParameter(OH_AVCodec *codec, uint32_t index);
@@ -297,7 +389,13 @@ OH_AVErrCode OH_VideoEncoder_PushInputParameter(OH_AVCodec *codec, uint32_t inde
* @param codec Pointer to an OH_AVCodec instance
* @param index The index value corresponding to the output Buffer
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * Buffer index should be given by {@link OH_AVCodecOnNewOutputBuffer}.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
+ * {@link AV_ERR_INVALID_STATE}, this interface was called in invalid state.
* @since 11
*/
OH_AVErrCode OH_VideoEncoder_FreeOutputBuffer(OH_AVCodec *codec, uint32_t index);
@@ -308,7 +406,8 @@ OH_AVErrCode OH_VideoEncoder_FreeOutputBuffer(OH_AVCodec *codec, uint32_t index)
* instance pointed to by the return value needs to be manually released by the caller.
* @syscap SystemCapability.Multimedia.Media.VideoEncoder
* @param codec Pointer to an OH_AVCodec instance
- * @return Returns a pointer to an OH_AVFormat instance
+ * @return Returns a pointer to an OH_AVFormat instance.
+ * Return nullptr if the encoder is nullptr or invaild.
* @since 10
*/
OH_AVFormat *OH_VideoEncoder_GetInputDescription(OH_AVCodec *codec);
@@ -321,7 +420,11 @@ OH_AVFormat *OH_VideoEncoder_GetInputDescription(OH_AVCodec *codec);
* @param isValid Output Parameter. A pointer to a boolean instance, it is true if the codec instance is valid,
* false if the codec instance is invalid
* @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * otherwise returns a specific error code, refer to {@link OH_AVErrCode}.
+ * {@link AV_ERR_NO_MEMORY}, instance has already released.
+ * {@link AV_ERR_INVALID_VAL}, the encoder is nullptr or invalid.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
+ * {@link AV_ERR_SERVICE_DIED}, avcodec service is died.
* @since 10
*/
OH_AVErrCode OH_VideoEncoder_IsValid(OH_AVCodec *codec, bool *isValid);
diff --git a/multimedia/av_codec/native_avdemuxer.h b/multimedia/av_codec/native_avdemuxer.h
index 84634687e987dbfa241f494a726351ff3fa3bbdf..ccf0ea8d29a82be57789b98a3edac9178c08fe73 100644
--- a/multimedia/av_codec/native_avdemuxer.h
+++ b/multimedia/av_codec/native_avdemuxer.h
@@ -28,12 +28,24 @@ typedef struct OH_AVDemuxer OH_AVDemuxer;
typedef struct DRM_MediaKeySystemInfo DRM_MediaKeySystemInfo;
typedef void (*DRM_MediaKeySystemInfoCallback)(DRM_MediaKeySystemInfo* mediaKeySystemInfo);
+/**
+ * @brief Call back will be invoked when updating DRM information.
+ * @param demuxer Player OH_AVDemuxer.
+ * @param mediaKeySystemInfo DRM information.
+ * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully.
+ * @since 12
+ * @version 1.0
+ */
+typedef void (*Demuxer_MediaKeySystemInfoCallback)(OH_AVDemuxer *demuxer, DRM_MediaKeySystemInfo *mediaKeySystemInfo);
+
/**
* @brief Creates an OH_AVDemuxer instance for getting samples from source.
* Free the resources of the instance by calling OH_AVDemuxer_Destroy.
* @syscap SystemCapability.Multimedia.Media.Spliter
* @param source Pointer to an OH_AVSource instance.
- * @return Returns a pointer to an OH_AVDemuxer instance
+ * @return Returns a pointer to an OH_AVDemuxer instance if the execution is successful, otherwise returns nullptr.
+ * Possible failure causes:
+ * 1. source is invalid.
* @since 10
*/
OH_AVDemuxer *OH_AVDemuxer_CreateWithSource(OH_AVSource *source);
@@ -47,6 +59,7 @@ OH_AVDemuxer *OH_AVDemuxer_CreateWithSource(OH_AVSource *source);
* @param demuxer Pointer to an OH_AVDemuxer instance.
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL} demuxer is invalid.
* @since 10
*/
OH_AVErrCode OH_AVDemuxer_Destroy(OH_AVDemuxer *demuxer);
@@ -62,6 +75,8 @@ OH_AVErrCode OH_AVDemuxer_Destroy(OH_AVDemuxer *demuxer);
* @param trackIndex The index of the selected track.
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL} demuxer is invalid, demuxer is not properly initialized,
+ * trackIndex is out of range, track is not supported to be read.
* @since 10
*/
OH_AVErrCode OH_AVDemuxer_SelectTrackByID(OH_AVDemuxer *demuxer, uint32_t trackIndex);
@@ -77,6 +92,7 @@ OH_AVErrCode OH_AVDemuxer_SelectTrackByID(OH_AVDemuxer *demuxer, uint32_t trackI
* @param trackIndex The index of the unselected track.
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL} demuxer is invalid, demuxer is not properly initialized.
* @since 10
*/
OH_AVErrCode OH_AVDemuxer_UnselectTrackByID(OH_AVDemuxer *demuxer, uint32_t trackIndex);
@@ -92,6 +108,11 @@ OH_AVErrCode OH_AVDemuxer_UnselectTrackByID(OH_AVDemuxer *demuxer, uint32_t trac
* @param info The OH_AVCodecBufferAttr handle pointer to the buffer storing sample information.
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL} demuxer is invalid, demuxer is not properly initialized, sample is invalid,
+ * trackIndex is out of range.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT} trackIndex has not been selected.
+ * {@link AV_ERR_NO_MEMORY} capability of sample is not enough to store all frame data.
+ * {@link AV_ERR_UNKNOWN} failed to read or parse frame from file.
* @deprecated since 11
* @useinstead OH_AVDemuxer_ReadSampleBuffer
* @since 10
@@ -109,6 +130,11 @@ OH_AVErrCode OH_AVDemuxer_ReadSample(OH_AVDemuxer *demuxer, uint32_t trackIndex,
* @param sample The OH_AVBuffer handle pointer to the buffer storing the sample data and corresponding attribute.
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL} demuxer is invalid, demuxer is not properly initialized, sample is invalid,
+ * trackIndex is out of range.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT} trackIndex has not been selected.
+ * {@link AV_ERR_NO_MEMORY} capability of sample is not enough to store frame data.
+ * {@link AV_ERR_UNKNOWN} failed to read or parse frame from file.
* @since 11
*/
OH_AVErrCode OH_AVDemuxer_ReadSampleBuffer(OH_AVDemuxer *demuxer, uint32_t trackIndex,
@@ -123,6 +149,10 @@ OH_AVErrCode OH_AVDemuxer_ReadSampleBuffer(OH_AVDemuxer *demuxer, uint32_t track
* @param mode The mode for seeking. See {@link OH_AVSeekMode}.
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL} demuxer is invalid, demuxer is not properly initialized,
+ * millisecond is out of range.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT} trackIndex has not been selected, resource is unseekable.
+ * {@link AV_ERR_UNKNOWN} failed to seek.
* @since 10
*/
OH_AVErrCode OH_AVDemuxer_SeekToTime(OH_AVDemuxer *demuxer, int64_t millisecond, OH_AVSeekMode mode);
@@ -132,22 +162,38 @@ OH_AVErrCode OH_AVDemuxer_SeekToTime(OH_AVDemuxer *demuxer, int64_t millisecond,
* @syscap SystemCapability.Multimedia.Media.Spliter
* @param demuxer Pointer to an OH_AVDemuxer instance
* @param callback object pointer.
- * @return Returns {@link AV_ERR_OK} if the drm info callback is set; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_OPERATE_NOT_PERMIT} 2 - If the demuxer engine is not inited or init failed.
+ * {@link AV_ERR_INVALID_VAL} 3 - If the demuxer instance is nullptr or invalid.
* @since 11
* @version 1.0
*/
OH_AVErrCode OH_AVDemuxer_SetMediaKeySystemInfoCallback(OH_AVDemuxer *demuxer,
DRM_MediaKeySystemInfoCallback callback);
+/**
+ * @brief Method to set player media key system info callback.
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @param demuxer Pointer to an OH_AVDemuxer instance
+ * @param callback object pointer.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_OPERATE_NOT_PERMIT} 2 - If the demuxer engine is not inited or init failed.
+ * {@link AV_ERR_INVALID_VAL} 3 - If the demuxer instance is nullptr or invalid.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVDemuxer_SetDemuxerMediaKeySystemInfoCallback(OH_AVDemuxer *demuxer,
+ Demuxer_MediaKeySystemInfoCallback callback);
+
/**
* @brief Obtains media key system info to create media key session.
* @syscap SystemCapability.Multimedia.Media.Spliter
* @param demuxer Pointer to an OH_AVDemuxer instance
* @param mediaKeySystemInfo Indicates the media key system info which ram space allocated by callee and
- released by caller.
- * @return Returns {@link AV_ERR_OK} if the current position is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * released by caller.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_INVALID_VAL} 3 - If the demuxer instance is nullptr or invalid
+ * or the mediaKeySystemInfo is nullptr.
* @since 11
* @version 1.0
*/
diff --git a/multimedia/av_codec/native_avmuxer.h b/multimedia/av_codec/native_avmuxer.h
index 2e622508c2eb190fc243b392f562fc29fe89c991..e88f992c895b6df81dc389fd6387f11c706f64ec 100644
--- a/multimedia/av_codec/native_avmuxer.h
+++ b/multimedia/av_codec/native_avmuxer.h
@@ -44,6 +44,8 @@ OH_AVMuxer *OH_AVMuxer_Create(int32_t fd, OH_AVOutputFormat format);
* @param rotation The supported angles are 0, 90, 180, and 270 degrees.
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the muxer or rotation invalid.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state.
* @since 10
*/
OH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation);
@@ -59,6 +61,11 @@ OH_AVErrCode OH_AVMuxer_SetRotation(OH_AVMuxer *muxer, int32_t rotation);
* @param trackFormat OH_AVFormat handle pointer contain track format
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the muxer or trackIndex or trackFormat invalid.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state.
+ * {@link AV_ERR_UNSUPPORT}, the mime type is not supported.
+ * {@link AV_ERR_NO_MEMORY}, failed to malloc memory.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
* @since 10
*/
OH_AVErrCode OH_AVMuxer_AddTrack(OH_AVMuxer *muxer, int32_t *trackIndex, OH_AVFormat *trackFormat);
@@ -70,6 +77,9 @@ OH_AVErrCode OH_AVMuxer_AddTrack(OH_AVMuxer *muxer, int32_t *trackIndex, OH_AVFo
* @param muxer Pointer to an OH_AVMuxer instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the muxer invalid.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
* @since 10
*/
OH_AVErrCode OH_AVMuxer_Start(OH_AVMuxer *muxer);
@@ -86,6 +96,10 @@ OH_AVErrCode OH_AVMuxer_Start(OH_AVMuxer *muxer);
* @param info The buffer information related to this sample {@link OH_AVCodecBufferAttr}
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the muxer or trackIndex or sample or info invalid.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state.
+ * {@link AV_ERR_NO_MEMORY}, failed to request memory.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
* @deprecated since 11
* @useinstead OH_AVMuxer_WriteSampleBuffer
* @since 10
@@ -104,6 +118,10 @@ OH_AVErrCode OH_AVMuxer_WriteSample(OH_AVMuxer *muxer, uint32_t trackIndex,
* @param sample The encoded or demuxer sample, which including data and buffer information
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the muxer or trackIndex or sample invalid.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state.
+ * {@link AV_ERR_NO_MEMORY}, failed to request memory.
+ * {@link AV_ERR_UNKNOWN}, unknown error.
* @since 11
*/
OH_AVErrCode OH_AVMuxer_WriteSampleBuffer(OH_AVMuxer *muxer, uint32_t trackIndex,
@@ -116,6 +134,8 @@ OH_AVErrCode OH_AVMuxer_WriteSampleBuffer(OH_AVMuxer *muxer, uint32_t trackIndex
* @param muxer Pointer to an OH_AVMuxer instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the muxer invalid.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT}, not permit to call the interface, it was called in invalid state.
* @since 10
*/
OH_AVErrCode OH_AVMuxer_Stop(OH_AVMuxer *muxer);
@@ -126,6 +146,7 @@ OH_AVErrCode OH_AVMuxer_Stop(OH_AVMuxer *muxer);
* @param muxer Pointer to an OH_AVMuxer instance
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL}, the muxer invalid.
* @since 10
*/
OH_AVErrCode OH_AVMuxer_Destroy(OH_AVMuxer *muxer);
diff --git a/multimedia/av_codec/native_avsource.h b/multimedia/av_codec/native_avsource.h
index a211d69505c24d16544741600e1b25bb0bc90293..cacdefb13ad9d293fabbfcdc3a9e6987f982bdc8 100644
--- a/multimedia/av_codec/native_avsource.h
+++ b/multimedia/av_codec/native_avsource.h
@@ -31,7 +31,13 @@ typedef struct OH_AVSource OH_AVSource;
* @brief Creates an OH_AVSource instance that models the media with dataSource.
* @syscap SystemCapability.Multimedia.Media.Spliter
* @param dataSource An Struct for a remote media resource.
- * @return Returns a pointer to an OH_AVSource instance
+ * @return Returns a pointer to an OH_AVSource instance if the execution is successful, otherwise returns nullptr.
+ * Possible failure causes:
+ * 1. dataSource is nullptr.
+ * 2. dataSource->size == 0.
+ * 3. set data source failed.
+ * 4. out of memory.
+ * 5. demuxer engine is nullptr.
* @since 12
*/
OH_AVSource *OH_AVSource_CreateWithDataSource(OH_AVDataSource *dataSource);
@@ -40,7 +46,11 @@ OH_AVSource *OH_AVSource_CreateWithDataSource(OH_AVDataSource *dataSource);
* @brief Creates an OH_AVSource instance that models the media at the URI.
* @syscap SystemCapability.Multimedia.Media.Spliter
* @param uri An URI for a remote media resource.
- * @return Returns a pointer to an OH_AVSource instance
+ * @return Returns a pointer to an OH_AVSource instance if the execution is successful, otherwise returns nullptr.
+ * Possible failure causes:
+ * 1. network anomaly.
+ * 2. resource is invalid.
+ * 3. file format is not supported.
* @since 10
*/
OH_AVSource *OH_AVSource_CreateWithURI(char *uri);
@@ -51,7 +61,13 @@ OH_AVSource *OH_AVSource_CreateWithURI(char *uri);
* @param fd The fileDescriptor of data source.
* @param offset The offset into the file to start reading.
* @param size The file size in bytes.
- * @return Returns a pointer to an OH_AVSource instance
+ * @return Returns a pointer to an OH_AVSource instance if the execution is successful, otherwise returns nullptr.
+ * Possible failure causes:
+ * 1. fd is invalid.
+ * 2. offset is not start pos of resource.
+ * 3. size error.
+ * 4. resource is invalid.
+ * 5. file format is not supported.
* @since 10
*/
OH_AVSource *OH_AVSource_CreateWithFD(int32_t fd, int64_t offset, int64_t size);
@@ -62,6 +78,7 @@ OH_AVSource *OH_AVSource_CreateWithFD(int32_t fd, int64_t offset, int64_t size);
* @param source Pointer to an OH_AVSource instance.
* @return Returns AV_ERR_OK if the execution is successful,
* otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * {@link AV_ERR_INVALID_VAL} source is invalid.
* @since 10
*/
OH_AVErrCode OH_AVSource_Destroy(OH_AVSource *source);
@@ -70,7 +87,9 @@ OH_AVErrCode OH_AVSource_Destroy(OH_AVSource *source);
* @brief Get the format info of source.
* @syscap SystemCapability.Multimedia.Media.Spliter
* @param source Pointer to an OH_AVSource instance.
- * @return Returns the source's format info.
+ * @return Returns the source's format info if the execution is successful, otherwise returns nullptr.
+ * Possible failure causes:
+ * 1. source is invalid.
* @since 10
*/
OH_AVFormat *OH_AVSource_GetSourceFormat(OH_AVSource *source);
@@ -80,7 +99,10 @@ OH_AVFormat *OH_AVSource_GetSourceFormat(OH_AVSource *source);
* @syscap SystemCapability.Multimedia.Media.Spliter
* @param source Pointer to an OH_AVSource instance.
* @param trackIndex The track index to get format.
- * @return Returns the track's format info.
+ * @return Returns the track's format info if the execution is successful, otherwise returns nullptr.
+ * Possible failure causes:
+ * 1. source is invalid.
+ * 2. trackIndex is out of range.
* @since 10
*/
OH_AVFormat *OH_AVSource_GetTrackFormat(OH_AVSource *source, uint32_t trackIndex);
diff --git a/multimedia/av_codec/native_cencinfo.h b/multimedia/av_codec/native_cencinfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..502eae06d878eceeab16bf71c3849ebde208c260
--- /dev/null
+++ b/multimedia/av_codec/native_cencinfo.h
@@ -0,0 +1,247 @@
+/*
+ * Copyright (C) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @addtogroup Multimedia_Drm
+ * @{
+ *
+ * @brief This feature enables third-party applications to implement the
+ * media decapsulation and demultiplexing functions by themselves instead
+ * of using the functions provided by the system.
+ *
+ * After the DRM instance and session are created, the decryption interface
+ * provided by the DRM can be invoked for decryption. The decryption parameter
+ * structure defines the transmission format of decryption parameters.
+ *
+ * @since 12
+ */
+
+/**
+ * @file native_cencinfo.h
+ *
+ * @brief Provides a unified entry for the native module APIs.
+ *
+ * @library libnative_media_avcencinfo.so
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @since 12
+ */
+
+#ifndef NATIVE_AVCENCINFO_H
+#define NATIVE_AVCENCINFO_H
+
+#include
+#include "native_averrors.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief AVBuffer Structure.
+ * @since 12
+ * @version 1.0
+ */
+typedef struct OH_AVBuffer OH_AVBuffer;
+/**
+ * @brief AVCencInfo Structure.
+ * @since 12
+ * @version 1.0
+ */
+typedef struct OH_AVCencInfo OH_AVCencInfo;
+/**
+ * @brief Key id size.
+ * @since 12
+ * @version 1.0
+ */
+#define DRM_KEY_ID_SIZE 16
+/**
+ * @brief Iv size.
+ * @since 12
+ * @version 1.0
+ */
+#define DRM_KEY_IV_SIZE 16
+/**
+ * @brief Max subsample num.
+ * @since 12
+ * @version 1.0
+ */
+#define DRM_KEY_MAX_SUB_SAMPLE_NUM 64
+
+/**
+ * @brief Drm cenc algorithm type.
+ * @since 12
+ * @version 1.0
+ */
+typedef enum DrmCencAlgorithm {
+ /**
+ * Unencrypted.
+ */
+ DRM_ALG_CENC_UNENCRYPTED = 0x0,
+ /**
+ * Aes ctr.
+ */
+ DRM_ALG_CENC_AES_CTR = 0x1,
+ /**
+ * Aes wv.
+ */
+ DRM_ALG_CENC_AES_WV = 0x2,
+ /**
+ * Aes cbc.
+ */
+ DRM_ALG_CENC_AES_CBC = 0x3,
+ /**
+ * Sm4 cbc.
+ */
+ DRM_ALG_CENC_SM4_CBC = 0x4,
+ /**
+ * Sm4 ctr.
+ */
+ DRM_ALG_CENC_SM4_CTR = 0x5
+} DrmCencAlgorithm;
+
+/**
+ * @brief Mode of cend info like set or not.
+ * @since 12
+ * @version 1.0
+ */
+typedef enum DrmCencInfoMode {
+ /* key/iv/subsample set. */
+ DRM_CENC_INFO_KEY_IV_SUBSAMPLES_SET = 0x0,
+ /* key/iv/subsample not set. */
+ DRM_CENC_INFO_KEY_IV_SUBSAMPLES_NOT_SET = 0x1
+} DrmCencInfoMode;
+
+/**
+ * @brief Subsample info of media.
+ * @since 12
+ * @version 1.0
+ */
+typedef struct DrmSubsample {
+ /* Clear header len. */
+ uint32_t clearHeaderLen;
+ /* Payload Len. */
+ uint32_t payLoadLen;
+} DrmSubsample;
+
+/**
+ * @brief Creates an OH_AVCencInfo instance for setting cencinfo.
+ *
+ * Free the resources of the instance by calling OH_AVCencInfo_Destory.
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @return Returns the newly created OH_AVCencInfo object. If nullptr is returned, the object failed to be created.
+ * The possible failure is due to the application address space being full,
+ * or the data in the initialization object has failed.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVCencInfo *OH_AVCencInfo_Create();
+
+/**
+ * @brief Destroy the OH_AVCencInfo instance and free the internal resources.
+ *
+ * The same instance can only be destroyed once. The destroyed instance
+ * should not be used before it is created again. It is recommended setting
+ * the instance pointer to NULL right after the instance is destroyed successfully.
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @param cencInfo Pointer to an OH_AVCencInfo instance.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_INVALID_VAL} 3 - cencInfo is nullptr.
+ * @since 12
+ * @version 1.0
+*/
+OH_AVErrCode OH_AVCencInfo_Destroy(OH_AVCencInfo *cencInfo);
+
+/**
+ * @brief Method to set algo of cencinfo.
+ *
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @param cencInfo Pointer to an OH_AVCencInfo instance.
+ * @param algo Cenc algo.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_INVALID_VAL} 3 - cencInfo is nullptr.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVCencInfo_SetAlgorithm(OH_AVCencInfo *cencInfo, enum DrmCencAlgorithm algo);
+
+/**
+ * @brief Method to set key id and iv of cencinfo.
+ *
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @param cencInfo Pointer to an OH_AVCencInfo instance.
+ * @param keyId Key id.
+ * @param keyIdLen Key id len.
+ * @param iv Iv.
+ * @param ivLen Iv len.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_INVALID_VAL} 3 - If cencInfo is nullptr, or keyId is nullptr, or keyIdLen != DRM_KEY_ID_SIZE,
+ * or iv is nullptr, or ivLen != DRM_KEY_IV_SIZE, or keyId copy fails, or iv copy fails.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVCencInfo_SetKeyIdAndIv(OH_AVCencInfo *cencInfo, uint8_t *keyId,
+ uint32_t keyIdLen, uint8_t *iv, uint32_t ivLen);
+
+/**
+ * @brief Method to set subsample info of cencinfo.
+ *
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @param cencInfo Pointer to an OH_AVCencInfo instance.
+ * @param encryptedBlockCount Number of encrypted blocks.
+ * @param skippedBlockCount Number of skip(clear) blocks.
+ * @param firstEncryptedOffset Offset of first encrypted payload.
+ * @param subsampleCount Subsample num.
+ * @param subsamples Subsample info
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_INVALID_VAL} 3 - If cencInfo is nullptr, or subsampleCount > DRM_KEY_MAX_SUB_SAMPLE_NUM,
+ * or subsamples is nullptr.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVCencInfo_SetSubsampleInfo(OH_AVCencInfo *cencInfo, uint32_t encryptedBlockCount,
+ uint32_t skippedBlockCount, uint32_t firstEncryptedOffset, uint32_t subsampleCount, DrmSubsample *subsamples);
+
+/**
+ * @brief Method to set mode of cencinfo.
+ *
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @param cencInfo Pointer to an OH_AVCencInfo instance.
+ * @param mode Cenc mode, indicate whether key/iv/subsample set or not.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_INVALID_VAL} 3 - cencInfo is nullptr.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVCencInfo_SetMode(OH_AVCencInfo *cencInfo, enum DrmCencInfoMode mode);
+
+/**
+ * @brief Method to attach cencinfo to AVBuffer.
+ *
+ * @syscap SystemCapability.Multimedia.Media.Spliter
+ * @param cencInfo Pointer to an OH_AVCencInfo instance.
+ * @param buffer AVBuffer to attach cencinfo.
+ * @return {@link AV_ERR_OK} 0 - Success
+ * {@link AV_ERR_INVALID_VAL} 3 - If cencInfo is nullptr, or buffer is nullptr, or buffer->buffer_ is nullptr,
+ * or buffer->buffer_->meta_ is nullptr.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVCencInfo_SetAVBuffer(OH_AVCencInfo *cencInfo, OH_AVBuffer *buffer);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // NATIVE_AVCENCINFO_H
diff --git a/multimedia/camera_framework/BUILD.gn b/multimedia/camera_framework/BUILD.gn
index 15bad5192e03b8daedd11a4097829540b32027e5..5193d84e080d5a418fdeeb2b85ed7668ce47e195 100644
--- a/multimedia/camera_framework/BUILD.gn
+++ b/multimedia/camera_framework/BUILD.gn
@@ -18,6 +18,7 @@ ohos_ndk_headers("camera_ndk_header") {
dest_dir = "$ndk_headers_out_dir/ohcamera"
sources = [
"./camera.h",
+ "./camera_device.h",
"./camera_input.h",
"./camera_manager.h",
"./capture_session.h",
@@ -35,6 +36,7 @@ ohos_ndk_library("libohcamera") {
system_capability = "SystemCapability.Multimedia.Camera.Core"
system_capability_headers = [
"ohcamera/camera.h",
+ "ohcamera/camera_device.h",
"ohcamera/camera_manager.h",
"ohcamera/camera_input.h",
"ohcamera/capture_session.h",
diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json
index a840a259ba8d250cf7c5b077f60b6bcc2e4b7696..ff28a21055b004964e6de663e55bc75dadc449a7 100644
--- a/multimedia/camera_framework/camera.ndk.json
+++ b/multimedia/camera_framework/camera.ndk.json
@@ -326,5 +326,9 @@
{
"first_introduced": "11",
"name": "OH_VideoOutput_Release"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_CameraDevice_GetCameraOrientation"
}
]
diff --git a/multimedia/camera_framework/camera_device.h b/multimedia/camera_framework/camera_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..d4691deae916bd4f6c6a4e168dd1a3eccaeb4475
--- /dev/null
+++ b/multimedia/camera_framework/camera_device.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @addtogroup OH_Camera
+ * @{
+ *
+ * @brief Provide the definition of the C interface for the camera module.
+ *
+ * @syscap SystemCapability.Multimedia.Camera.Core
+ *
+ * @since 12
+ * @version 1.0
+ */
+
+/**
+ * @file camera_device.h
+ *
+ * @brief Declare the camera device concepts.
+ *
+ * @library libohcamera.so
+ * @syscap SystemCapability.Multimedia.Camera.Core
+ * @since 12
+ * @version 1.0
+ */
+
+#ifndef NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H
+#define NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H
+
+#include
+#include
+#include "camera.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Gets the sensor orientation attribute for a camera device.
+ *
+ * @param camera the {@link Camera_Device} which use to get attributes.
+ * @param orientation the sensor orientation attribute if the method call succeeds.
+ * @return {@link #CAMERA_OK} if the method call succeeds.
+ * {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
+ * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
+ * @since 12
+ */
+Camera_ErrorCode OH_CameraDevice_GetCameraOrientation(Camera_Device* camera, uint32_t* orientation);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H
+/** @} */
\ No newline at end of file
diff --git a/multimedia/drm_framework/libnative_drm.ndk.json b/multimedia/drm_framework/libnative_drm.ndk.json
index 41e94c3abad1fd20c7e37737c20a4c2a78b2f249..0e453e4d5b3fbae7c6a4ecacf67c026dfcd97746 100644
--- a/multimedia/drm_framework/libnative_drm.ndk.json
+++ b/multimedia/drm_framework/libnative_drm.ndk.json
@@ -111,10 +111,6 @@
"first_introduced": "11",
"name": "OH_MediaKeySession_RequireSecureDecoderModule"
},
- {
- "first_introduced": "11",
- "name": "OH_MediaKeySession_SetMediaKeySessionCallback"
- },
{
"first_introduced": "11",
"name": "OH_MediaKeySession_Destroy"
@@ -122,5 +118,13 @@
{
"first_introduced": "12",
"name": "OH_MediaKeySystem_GetMediaKeySystems"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_MediaKeySession_SetMediaKeySessionCallback"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_MediaKeySystem_SetCallback"
}
]
\ No newline at end of file
diff --git a/multimedia/drm_framework/native_mediakeysession.h b/multimedia/drm_framework/native_mediakeysession.h
index 999aa04e1f36e8364863d01a41f88b92d5c3ee40..8394da5da077133b8a18f2f7ab5ed701c9c89528 100644
--- a/multimedia/drm_framework/native_mediakeysession.h
+++ b/multimedia/drm_framework/native_mediakeysession.h
@@ -86,6 +86,48 @@ typedef struct MediaKeySession_Callback {
MediaKeySession_KeyChangeCallback keyChangeCallback;
} MediaKeySession_Callback;
+/**
+ * @brief Call back will be invoked when event triggers.
+ * @param mediaKeySessoin MediaKeySession instance.
+ * @param eventType Event type.
+ * @param info Event info gotten from media key session.
+ * @param infoLen Event info len.
+ * @param extra Extra info gotten from media key session.
+ * @return Drm_ErrCode.
+ * @since 12
+ * @version 1.0
+ */
+typedef Drm_ErrCode (*OH_MediaKeySession_EventCallback)(MediaKeySession *mediaKeySessoin, DRM_EventType eventType,
+ uint8_t *info, int32_t infoLen, char *extra);
+
+/**
+ * @brief Call back will be invoked when key changes.
+ * @param mediaKeySessoin MediaKeySession instance.
+ * @param keysInfo Key info gotten from media key system.
+ * @param newKeysAvailable Whether new keys available.
+ * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully.
+ * @since 12
+ * @version 1.0
+ */
+typedef Drm_ErrCode (*OH_MediaKeySession_KeyChangeCallback)(MediaKeySession *mediaKeySessoin, DRM_KeysInfo *keysInfo,
+ bool newKeysAvailable);
+
+/**
+ * @brief MediaKeySession_Callback struct, used to listen event like key expired and key change etc..
+ * @since 12
+ * @version 1.0
+ */
+typedef struct OH_MediaKeySession_Callback {
+ /**
+ * Normal event callback like key expired etc..
+ */
+ OH_MediaKeySession_EventCallback eventCallback;
+ /**
+ * Key change callback for keys change event.
+ */
+ OH_MediaKeySession_KeyChangeCallback keyChangeCallback;
+} OH_MediaKeySession_Callback;
+
/**
* @brief Generate media key request.
* @param mediaKeySession Media key session instance.
@@ -208,6 +250,17 @@ Drm_ErrCode OH_MediaKeySession_RequireSecureDecoderModule(MediaKeySession *media
Drm_ErrCode OH_MediaKeySession_SetMediaKeySessionCallback(MediaKeySession *mediaKeySessoin,
MediaKeySession_Callback *callback);
+/**
+ * @brief Set media key session event callback.
+ * @param mediaKeySession Media key session instance.
+ * @param callback Callback to be set to the media key session.
+ * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully.
+ * @since 12
+ * @version 1.0
+ */
+Drm_ErrCode OH_MediaKeySession_SetCallback(MediaKeySession *mediaKeySessoin,
+ OH_MediaKeySession_Callback *callback);
+
/**
* @brief Release the resource before the session gonna be unused.
* @param mediaKeySession Media key session instance.
diff --git a/multimedia/drm_framework/native_mediakeysystem.h b/multimedia/drm_framework/native_mediakeysystem.h
index 88f27fdf9aedd66eb6825773d6835220fb9256f1..9f84618f05a62af6514cca4b5ec712f8716068f9 100644
--- a/multimedia/drm_framework/native_mediakeysystem.h
+++ b/multimedia/drm_framework/native_mediakeysystem.h
@@ -62,6 +62,40 @@ extern "C" {
typedef Drm_ErrCode (*MediaKeySystem_Callback)(DRM_EventType eventType, uint8_t *info,
int32_t infoLen, char *extra);
+/**
+ * @brief Call back will be invoked when event triggers.
+ * @param mediaKeySystem MediaKeySystem instance.
+ * @param eventType Event type.
+ * @param info Event info gotten from media key system.
+ * @param infoLen Event info len.
+ * @param extra Extra info gotten from media key system.
+ * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully.
+ * @since 12
+ * @version 1.0
+ */
+typedef Drm_ErrCode (*OH_MediaKeySystem_Callback)(MediaKeySystem *mediaKeySystem, DRM_EventType eventType,
+ uint8_t *info, int32_t infoLen, char *extra);
+
+/**
+ * @brief Set media key system event callback.
+ * @param mediaKeySystem Media key system instance.
+ * @param callback Callback to be set to the media key system.
+ * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully.
+ * @since 12
+ * @version 1.0
+ */
+Drm_ErrCode OH_MediaKeySystem_SetCallback(MediaKeySystem *mediaKeySystem, OH_MediaKeySystem_Callback callback);
+
+/**
+ * @brief Acquire supported media key systems' name and uuid.
+ * @param descs Array used to save media key systems' name and uuid.
+ * @param count Used to indicate count of struct DRM_MediaKeySystemDescription.
+ * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully.
+ * @since 12
+ * @version 1.0
+ */
+Drm_ErrCode OH_MediaKeySystem_GetMediaKeySystems(DRM_MediaKeySystemDescription *descs, uint32_t *count);
+
/**
* @brief Query if media key system is supported.
* @param name Used to point a Digital Right Management solution.
@@ -273,15 +307,6 @@ Drm_ErrCode OH_MediaKeySystem_GetCertificateStatus(MediaKeySystem *mediaKeySyste
*/
Drm_ErrCode OH_MediaKeySystem_Destroy(MediaKeySystem *mediaKeySystem);
-/**
- * @brief Acquire supported media key systems' name and uuid.
- * @param descs Array used to save media key systems' name and uuid.
- * @param count Used to indicate count of struct DRM_MediaKeySystemDescription.
- * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully.
- * @since 12
- * @version 1.0
- */
-Drm_ErrCode OH_MediaKeySystem_GetMediaKeySystems(DRM_MediaKeySystemDescription *descs, uint32_t *count);
#ifdef __cplusplus
}
diff --git a/multimedia/image_effect/image_effect.h b/multimedia/image_effect/image_effect.h
index 383a338dd93fe68bd60a86653052e613bf890913..ee5a5a33f3b193401857a83a91a84fb0fb782b21 100644
--- a/multimedia/image_effect/image_effect.h
+++ b/multimedia/image_effect/image_effect.h
@@ -128,6 +128,9 @@ OH_EffectFilter *OH_ImageEffect_GetFilter(OH_ImageEffect *imageEffect, uint32_t
* @param value Indicates the value corresponding to the key of the configuration
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
+ * {@link EFFECT_KEY_ERROR}, the key of the configuration parameter is invalid.
+ * {@link EFFECT_PARAM_ERROR}, the value of the configuration parameter is invalid.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_Configure(OH_ImageEffect *imageEffect, const char *key,
@@ -142,6 +145,7 @@ ImageEffect_ErrorCode OH_ImageEffect_Configure(OH_ImageEffect *imageEffect, cons
* @param nativeWindow A pointer to a OHNativeWindow instance, see {@link OHNativeWindow}
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_SetOutputSurface(OH_ImageEffect *imageEffect, OHNativeWindow *nativeWindow);
@@ -155,6 +159,7 @@ ImageEffect_ErrorCode OH_ImageEffect_SetOutputSurface(OH_ImageEffect *imageEffec
* @param nativeWindow A pointer to a OHNativeWindow instance, see {@link OHNativeWindow}
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_GetInputSurface(OH_ImageEffect *imageEffect, OHNativeWindow **nativeWindow);
@@ -168,6 +173,7 @@ ImageEffect_ErrorCode OH_ImageEffect_GetInputSurface(OH_ImageEffect *imageEffect
* @param pixelmap Indicates the OH_PixelmapNative that contains the image information
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_SetInputPixelmap(OH_ImageEffect *imageEffect, OH_PixelmapNative *pixelmap);
@@ -180,6 +186,7 @@ ImageEffect_ErrorCode OH_ImageEffect_SetInputPixelmap(OH_ImageEffect *imageEffec
* @param pixelmap Indicates the OH_PixelmapNative that contains the image information
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_SetOutputPixelmap(OH_ImageEffect *imageEffect, OH_PixelmapNative *pixelmap);
@@ -193,6 +200,7 @@ ImageEffect_ErrorCode OH_ImageEffect_SetOutputPixelmap(OH_ImageEffect *imageEffe
* @param nativeBuffer Indicates the NativeBuffer that contains the image information
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_SetInputNativeBuffer(OH_ImageEffect *imageEffect, OH_NativeBuffer *nativeBuffer);
@@ -205,6 +213,7 @@ ImageEffect_ErrorCode OH_ImageEffect_SetInputNativeBuffer(OH_ImageEffect *imageE
* @param nativeBuffer Indicates the NativeBuffer that contains the image information
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_SetOutputNativeBuffer(OH_ImageEffect *imageEffect, OH_NativeBuffer *nativeBuffer);
@@ -218,6 +227,7 @@ ImageEffect_ErrorCode OH_ImageEffect_SetOutputNativeBuffer(OH_ImageEffect *image
* @param uri An URI for a image resource
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_SetInputUri(OH_ImageEffect *imageEffect, const char *uri);
@@ -230,6 +240,7 @@ ImageEffect_ErrorCode OH_ImageEffect_SetInputUri(OH_ImageEffect *imageEffect, co
* @param uri An URI for a image resource
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_SetOutputUri(OH_ImageEffect *imageEffect, const char *uri);
@@ -241,6 +252,11 @@ ImageEffect_ErrorCode OH_ImageEffect_SetOutputUri(OH_ImageEffect *imageEffect, c
* @param imageEffect Encapsulate OH_ImageEffect structure instance pointer
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
+ * {@link EFFECT_INPUT_OUTPUT_NOT_SUPPORTED}, the data types of the input and output images
+ * to be processed are different.
+ * {@link EFFECT_COLOR_SPACE_NOT_MATCH}, the color spaces of the input and output images are different.
+ * {@link EFFECT_ALLOCATE_MEMORY_FAILED}, the buffer fails to be allocated.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_Start(OH_ImageEffect *imageEffect);
@@ -252,6 +268,7 @@ ImageEffect_ErrorCode OH_ImageEffect_Start(OH_ImageEffect *imageEffect);
* @param imageEffect Encapsulate OH_ImageEffect structure instance pointer
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_Stop(OH_ImageEffect *imageEffect);
@@ -263,6 +280,7 @@ ImageEffect_ErrorCode OH_ImageEffect_Stop(OH_ImageEffect *imageEffect);
* @param imageEffect Encapsulate OH_ImageEffect structure instance pointer
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_Release(OH_ImageEffect *imageEffect);
@@ -276,6 +294,7 @@ ImageEffect_ErrorCode OH_ImageEffect_Release(OH_ImageEffect *imageEffect);
* OH_ImageEffect to JSON string
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_ImageEffect_Save(OH_ImageEffect *imageEffect, char **info);
diff --git a/multimedia/image_effect/image_effect_filter.h b/multimedia/image_effect/image_effect_filter.h
index fdb24ea32e5bdd9722405fb6b9c41b73e7ffc6f6..464c29dea2b526db63767e45fb4fa6a9b288e7dc 100644
--- a/multimedia/image_effect/image_effect_filter.h
+++ b/multimedia/image_effect/image_effect_filter.h
@@ -224,6 +224,7 @@ OH_EffectFilterInfo *OH_EffectFilterInfo_Create();
* @param name Indicates the filter name
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilterInfo_SetFilterName(OH_EffectFilterInfo *info, const char *name);
@@ -236,6 +237,7 @@ ImageEffect_ErrorCode OH_EffectFilterInfo_SetFilterName(OH_EffectFilterInfo *inf
* @param name Indicates the filter name
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilterInfo_GetFilterName(OH_EffectFilterInfo *info, char **name);
@@ -249,6 +251,7 @@ ImageEffect_ErrorCode OH_EffectFilterInfo_GetFilterName(OH_EffectFilterInfo *inf
* @param bufferTypeArray Array of {@link ImageEffect_BufferType} that can be supported
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedBufferTypes(OH_EffectFilterInfo *info, uint32_t size,
@@ -263,6 +266,7 @@ ImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedBufferTypes(OH_EffectFilte
* @param bufferTypeArray Array of {@link OH_EffectBufferInfoType} that can be supported
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedBufferTypes(OH_EffectFilterInfo *info, uint32_t *size,
@@ -277,6 +281,7 @@ ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedBufferTypes(OH_EffectFilte
* @param formatArray Array of {@link ImageEffect_Format} that can be supported
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedFormats(OH_EffectFilterInfo *info, uint32_t size,
@@ -291,6 +296,7 @@ ImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedFormats(OH_EffectFilterInf
* @param formatArray Array of {@link ImageEffect_Format} that can be supported
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedFormats(OH_EffectFilterInfo *info, uint32_t *size,
@@ -303,6 +309,7 @@ ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedFormats(OH_EffectFilterInf
* @param info Encapsulate OH_EffectFilterInfo structure instance pointer
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilterInfo_Release(OH_EffectFilterInfo *info);
@@ -347,6 +354,7 @@ OH_EffectBufferInfo *OH_EffectBufferInfo_Create();
* @param addr Indicates the address of the image in memory
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_SetAddr(OH_EffectBufferInfo *info, void *addr);
@@ -359,6 +367,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_SetAddr(OH_EffectBufferInfo *info, voi
* @param addr Indicates the address of the image in memory
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_GetAddr(OH_EffectBufferInfo *info, void **addr);
@@ -371,6 +380,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_GetAddr(OH_EffectBufferInfo *info, voi
* @param width Indicates the width of the image
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_SetWidth(OH_EffectBufferInfo *info, int32_t width);
@@ -383,6 +393,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_SetWidth(OH_EffectBufferInfo *info, in
* @param width Indicates the width of the image
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_GetWidth(OH_EffectBufferInfo *info, int32_t *width);
@@ -395,6 +406,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_GetWidth(OH_EffectBufferInfo *info, in
* @param height Indicates the height of the image
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_SetHeight(OH_EffectBufferInfo *info, int32_t height);
@@ -407,6 +419,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_SetHeight(OH_EffectBufferInfo *info, i
* @param height Indicates the height of the image
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_GetHeight(OH_EffectBufferInfo *info, int32_t *height);
@@ -419,6 +432,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_GetHeight(OH_EffectBufferInfo *info, i
* @param rowSize Indicates number of bytes per row
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_SetRowSize(OH_EffectBufferInfo *info, int32_t rowSize);
@@ -431,6 +445,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_SetRowSize(OH_EffectBufferInfo *info,
* @param rowSize Indicates number of bytes per row
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_GetRowSize(OH_EffectBufferInfo *info, int32_t *rowSize);
@@ -443,6 +458,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_GetRowSize(OH_EffectBufferInfo *info,
* @param format Indicates {@link ImageEffect_Format} of the image
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_SetEffectFormat(OH_EffectBufferInfo *info, ImageEffect_Format format);
@@ -455,6 +471,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_SetEffectFormat(OH_EffectBufferInfo *i
* @param format Indicates {@link ImageEffect_Format} of the image
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_GetEffectFormat(OH_EffectBufferInfo *info, ImageEffect_Format *format);
@@ -466,6 +483,7 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_GetEffectFormat(OH_EffectBufferInfo *i
* @param info Encapsulate OH_EffectBufferInfo structure instance pointer
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectBufferInfo_Release(OH_EffectBufferInfo *info);
@@ -606,6 +624,9 @@ OH_EffectFilter *OH_EffectFilter_Create(const char *name);
* @param value Indicates the value corresponding to the key of the filter
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
+ * {@link EFFECT_KEY_ERROR}, the key of the filter parameter is invalid.
+ * {@link EFFECT_PARAM_ERROR}, the value of the filter parameter is invalid.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilter_SetValue(OH_EffectFilter *filter, const char *key, const ImageEffect_Any *value);
@@ -619,6 +640,8 @@ ImageEffect_ErrorCode OH_EffectFilter_SetValue(OH_EffectFilter *filter, const ch
* @param value Indicates the value corresponding to the key of the filter
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
+ * {@link EFFECT_KEY_ERROR}, the key of the filter parameter is invalid.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilter_GetValue(OH_EffectFilter *filter, const char *key, ImageEffect_Any *value);
@@ -631,6 +654,7 @@ ImageEffect_ErrorCode OH_EffectFilter_GetValue(OH_EffectFilter *filter, const ch
* @param delegate A collection of all callback functions, see {@link ImageEffect_FilterDelegate}
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilter_Register(const OH_EffectFilterInfo *info,
@@ -663,6 +687,7 @@ void OH_EffectFilter_ReleaseFilterNames();
* @param info Indicates the capabilities supported by the filter, see {@link OH_EffectFilterInfo}
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilter_LookupFilterInfo(const char *name, OH_EffectFilterInfo *info);
@@ -676,6 +701,7 @@ ImageEffect_ErrorCode OH_EffectFilter_LookupFilterInfo(const char *name, OH_Effe
* @param outputPixelmap Indicates the output image
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilter_Render(OH_EffectFilter *filter, OH_PixelmapNative *inputPixelmap,
@@ -688,6 +714,7 @@ ImageEffect_ErrorCode OH_EffectFilter_Render(OH_EffectFilter *filter, OH_Pixelma
* @param filter Encapsulate OH_EffectFilter structure instance pointer
* @return Returns EFFECT_SUCCESS if the execution is successful, otherwise returns a specific error code, refer to
* {@link ImageEffect_ErrorCode}
+ * {@link EFFECT_ERROR_PARAM_INVALID}, the input parameter is a null pointer.
* @since 12
*/
ImageEffect_ErrorCode OH_EffectFilter_Release(OH_EffectFilter *filter);
diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h
index a567e46151cc279c9c49300171ce17a65036aa57..c60eac8b37abf32b0b528765f7662a2ab4a417a0 100644
--- a/multimedia/image_framework/include/image/image_common.h
+++ b/multimedia/image_framework/include/image/image_common.h
@@ -1258,6 +1258,15 @@ static const char *OHOS_IMAGE_PROPERTY_SCENE_POINTER = "HwMnoteScenePointer";
* @since 12
*/
static const char *OHOS_IMAGE_PROPERTY_SCENE_VERSION = "HwMnoteSceneVersion";
+
+/**
+ * @brief Gif Loop Count
+ * It is used in {@link OH_ImageSource_GetImageProperty}.
+ * If infinite loop returns 0, other values represent the number of loops
+ *
+ * @since 12
+ */
+static const char *OHOS_IMAGE_PROPERTY_GIF_LOOP_COUNT = "GIFLoopCount";
#ifdef __cplusplus
};
#endif
diff --git a/multimedia/image_framework/include/image/image_native.h b/multimedia/image_framework/include/image/image_native.h
index 14cf96c2b4b02aadf4f61006aa1e476bf20477b9..b607129c4393b157358ddff2088a573ed47b53fd 100644
--- a/multimedia/image_framework/include/image/image_native.h
+++ b/multimedia/image_framework/include/image/image_native.h
@@ -36,7 +36,7 @@
#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_H
#include "image_common.h"
-#include "native_buffer.h"
+#include "native_buffer/native_buffer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/multimedia/media_foundation/native_avbuffer.h b/multimedia/media_foundation/native_avbuffer.h
index 19ec2be468ca77e35aa52ca8f73ce522630f3069..391fc0691d437512b9070ce35141b5f334a39c6c 100644
--- a/multimedia/media_foundation/native_avbuffer.h
+++ b/multimedia/media_foundation/native_avbuffer.h
@@ -34,6 +34,8 @@ typedef struct OH_NativeBuffer OH_NativeBuffer;
* @syscap SystemCapability.Multimedia.Media.Core
* @param capacity the buffer's capacity, bytes
* @return Returns a pointer to an OH_AVBuffer instance if the execution is successful, otherwise returns nullptr
+ * Possible failure causes: 1. capacity <= 0. 2. create allocator failed. 3. create OH_AVBuffer failed.
+ * 4. created buffer memory is nullptr. 5. created buffer memory's addr is nullptr. 6. failed to new OH_AVBuffer.
* @since 11
*/
OH_AVBuffer *OH_AVBuffer_Create(int32_t capacity);
@@ -42,8 +44,10 @@ OH_AVBuffer *OH_AVBuffer_Create(int32_t capacity);
* @brief Clear the internal resources of the buffer and destroy the buffer instance.
* @syscap SystemCapability.Multimedia.Media.Core
* @param buffer Encapsulate OH_AVBuffer structure instance pointer
- * @return Returns AV_ERR_OK if the execution is successful, otherwise returns a specific error code, refer to
- * {@link OH_AVErrCode}
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input buffer is nullptr or buffer's magic error.
+ * {@link AV_ERR_OPERATE_NOT_PERMIT} if input buffer is not user created.
* @since 11
*/
OH_AVErrCode OH_AVBuffer_Destroy(OH_AVBuffer *buffer);
@@ -54,8 +58,10 @@ OH_AVErrCode OH_AVBuffer_Destroy(OH_AVBuffer *buffer);
* @param buffer Encapsulate OH_AVBuffer structure instance pointer
* @param attr Encapsulate OH_AVCodecBufferAttr structure instance pointer, please refer to
* {@link OH_AVCodecBufferAttr}
- * @return Returns AV_ERR_OK if the execution is successful, otherwise returns a specific error code, refer to
- * {@link OH_AVErrCode}
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input buffer is nullptr, buffer's magic error,
+ * input buffer's buffer is nulllptr or attr is nullptr.
* @since 11
*/
OH_AVErrCode OH_AVBuffer_GetBufferAttr(OH_AVBuffer *buffer, OH_AVCodecBufferAttr *attr);
@@ -66,8 +72,10 @@ OH_AVErrCode OH_AVBuffer_GetBufferAttr(OH_AVBuffer *buffer, OH_AVCodecBufferAttr
* @param buffer Encapsulate OH_AVBuffer structure instance pointer
* @param attr Encapsulate OH_AVCodecBufferAttr structure instance pointer, please refer to
* {@link OH_AVCodecBufferAttr}
- * @return Returns AV_ERR_OK if the execution is successful, otherwise returns a specific error code, refer to
- * {@link OH_AVErrCode}
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input buffer is nullptr, buffer's magic error,
+ * input buffer's buffer is nulllptr, attr is nullptr, the size or offset of input buffer's memory is invalid.
* @since 11
*/
OH_AVErrCode OH_AVBuffer_SetBufferAttr(OH_AVBuffer *buffer, const OH_AVCodecBufferAttr *attr);
@@ -78,7 +86,8 @@ OH_AVErrCode OH_AVBuffer_SetBufferAttr(OH_AVBuffer *buffer, const OH_AVCodecBuff
* @syscap SystemCapability.Multimedia.Media.Core
* @param buffer Encapsulate OH_AVBuffer structure instance pointer
* @return Returns Encapsulate OH_AVFormat structure instance pointer if the execution is successful,
- * otherwise returns nullptr
+ * otherwise returns nullptr. Possible failure causes: 1. input buffer is nullptr. 2. buffer's magic error.
+ * 3. input buffer's buffer is nulllptr. 4. buffer's meta is nullptr.
* @since 11
*/
OH_AVFormat *OH_AVBuffer_GetParameter(OH_AVBuffer *buffer);
@@ -88,8 +97,10 @@ OH_AVFormat *OH_AVBuffer_GetParameter(OH_AVBuffer *buffer);
* @syscap SystemCapability.Multimedia.Media.Core
* @param buffer Encapsulate OH_AVBuffer structure instance pointer
* @param format Encapsulate OH_AVFormat structure instance pointer
- * @return Returns AV_ERR_OK if the execution is successful, otherwise returns a specific error code, refer to
- * {@link OH_AVErrCode}
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input buffer is nullptr, buffer's magic error,
+ * input buffer's buffer is nulllptr, input format is nullptr or input meta is nullptr.
* @since 11
*/
OH_AVErrCode OH_AVBuffer_SetParameter(OH_AVBuffer *buffer, const OH_AVFormat *format);
@@ -99,6 +110,8 @@ OH_AVErrCode OH_AVBuffer_SetParameter(OH_AVBuffer *buffer, const OH_AVFormat *fo
* @syscap SystemCapability.Multimedia.Media.Core
* @param buffer Encapsulate OH_AVBuffer structure instance pointer
* @return the buffer's virtual address if the buffer is valid, otherwise nullptr
+ * Possible failure causes: 1. input buffer is nullptr. 2. buffer's magic error.
+ * 3. input buffer's buffer is nulllptr. 4. buffer's memory is nullptr.
* @since 11
*/
uint8_t *OH_AVBuffer_GetAddr(OH_AVBuffer *buffer);
@@ -108,6 +121,8 @@ uint8_t *OH_AVBuffer_GetAddr(OH_AVBuffer *buffer);
* @syscap SystemCapability.Multimedia.Media.Core
* @param buffer Encapsulate OH_AVBuffer structure instance pointer
* @return the buffer's capacity if the buffer is valid, otherwise -1
+ * Possible failure causes: 1. input buffer is nullptr. 2. buffer's magic error.
+ * 3. input buffer's buffer is nulllptr. 4. buffer's memory is nullptr.
* @since 11
*/
int32_t OH_AVBuffer_GetCapacity(OH_AVBuffer *buffer);
@@ -117,8 +132,9 @@ int32_t OH_AVBuffer_GetCapacity(OH_AVBuffer *buffer);
* instance pointed to by the return value * needs to be manually released by {@link OH_NativeBuffer_Unreference}.
* @syscap SystemCapability.Multimedia.Media.Core
* @param buffer Encapsulate OH_AVBuffer structure instance pointer
- * @return Returns Encapsulate OH_NativeBuffer structure instance pointer is successful,
- * otherwise returns nullptr
+ * @return Returns Encapsulate OH_NativeBuffer structure instance pointer is successful, otherwise returns nullptr
+ * Possible failure causes: 1. input buffer is nullptr. 2. buffer's magic error.
+ * 3. input buffer's buffer is nulllptr. 4. buffer's memory is nullptr. 5. surfaceBuffer is nullptr.
* @since 11
*/
OH_NativeBuffer *OH_AVBuffer_GetNativeBuffer(OH_AVBuffer *buffer);
diff --git a/multimedia/media_foundation/native_averrors.h b/multimedia/media_foundation/native_averrors.h
index eb2ad2039021e031e55870fe3e6062f940750e2a..081af5f9153e7d94070b800bc4c31db66d41d424 100644
--- a/multimedia/media_foundation/native_averrors.h
+++ b/multimedia/media_foundation/native_averrors.h
@@ -27,47 +27,47 @@ extern "C" {
*/
typedef enum OH_AVErrCode {
/**
- * the operation completed successfully.
+ * @error the operation completed successfully.
*/
AV_ERR_OK = 0,
/**
- * no memory.
+ * @error no memory.
*/
AV_ERR_NO_MEMORY = 1,
/**
- * opertation not be permitted.
+ * @error opertation not be permitted.
*/
AV_ERR_OPERATE_NOT_PERMIT = 2,
/**
- * invalid argument.
+ * @error invalid argument.
*/
AV_ERR_INVALID_VAL = 3,
/**
- * IO error.
+ * @error IO error.
*/
AV_ERR_IO = 4,
/**
- * network timeout.
+ * @error network timeout.
*/
AV_ERR_TIMEOUT = 5,
/**
- * unknown error.
+ * @error unknown error.
*/
AV_ERR_UNKNOWN = 6,
/**
- * media service died.
+ * @error media service died.
*/
AV_ERR_SERVICE_DIED = 7,
/**
- * the state is not support this operation.
+ * @error the state is not support this operation.
*/
AV_ERR_INVALID_STATE = 8,
/**
- * unsupport interface.
+ * @error unsupport interface.
*/
AV_ERR_UNSUPPORT = 9,
/**
- * extend err start.
+ * @error extend err start.
*/
AV_ERR_EXTEND_START = 100,
/** drm error base.
diff --git a/multimedia/media_foundation/native_avformat.h b/multimedia/media_foundation/native_avformat.h
index 4335cee3370160b09cf5cf5d9b866ed699bc82c7..6868ce4de4147a229cee1e6f835cc7fae18c294e 100644
--- a/multimedia/media_foundation/native_avformat.h
+++ b/multimedia/media_foundation/native_avformat.h
@@ -70,7 +70,8 @@ struct OH_AVFormat *OH_AVFormat_Create(void);
* @param mimeType mime type
* @param sampleRate sample rate
* @param channelCount channel count
- * @return Returns a pointer to an OH_AVFormat instance
+ * @return Returns a pointer to an OH_AVFormat instance if the execution is successful, otherwise nullptr
+ * Possible failure causes: 1. mimeType is nullptr. 2. new format is nullptr.
* @since 10
* @version 1.0
*/
@@ -84,7 +85,8 @@ struct OH_AVFormat *OH_AVFormat_CreateAudioFormat(const char *mimeType,
* @param mimeType mime type
* @param width width
* @param height height
- * @return Returns a pointer to an OH_AVFormat instance
+ * @return Returns a pointer to an OH_AVFormat instance if the execution is successful, otherwise nullptr
+ * Possible failure causes: 1. mimeType is nullptr. 2. new format is nullptr.
* @since 10
* @version 1.0
*/
@@ -108,6 +110,7 @@ void OH_AVFormat_Destroy(struct OH_AVFormat *format);
* @param to OH_AVFormat handle pointer to receive data
* @param from pointer to the OH_AVFormat handle of the copied data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error.
* @since 9
* @version 1.0
*/
@@ -120,6 +123,7 @@ bool OH_AVFormat_Copy(struct OH_AVFormat *to, struct OH_AVFormat *from);
* @param key key to write data
* @param value written data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
* @since 9
* @version 1.0
*/
@@ -132,6 +136,7 @@ bool OH_AVFormat_SetIntValue(struct OH_AVFormat *format, const char *key, int32_
* @param key key to write data
* @param value written data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
* @since 9
* @version 1.0
*/
@@ -144,6 +149,7 @@ bool OH_AVFormat_SetLongValue(struct OH_AVFormat *format, const char *key, int64
* @param key key to write data
* @param value written data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
* @since 9
* @version 1.0
*/
@@ -156,6 +162,7 @@ bool OH_AVFormat_SetFloatValue(struct OH_AVFormat *format, const char *key, floa
* @param key key to write data
* @param value written data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
* @since 9
* @version 1.0
*/
@@ -168,6 +175,8 @@ bool OH_AVFormat_SetDoubleValue(struct OH_AVFormat *format, const char *key, dou
* @param key key to write data
* @param value written data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
+ * 4. value is nullptr.
* @since 9
* @version 1.0
*/
@@ -181,6 +190,8 @@ bool OH_AVFormat_SetStringValue(struct OH_AVFormat *format, const char *key, con
* @param addr written data addr
* @param size written data length
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
+ * 4. addr is nullptr. 5. size is zero.
* @since 9
* @version 1.0
*/
@@ -193,6 +204,8 @@ bool OH_AVFormat_SetBuffer(struct OH_AVFormat *format, const char *key, const ui
* @param key read key value
* @param out read data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
+ * 4. out is nullptr.
* @since 9
* @version 1.0
*/
@@ -205,6 +218,8 @@ bool OH_AVFormat_GetIntValue(struct OH_AVFormat *format, const char *key, int32_
* @param key read key value
* @param out read data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
+ * 4. out is nullptr.
* @since 9
* @version 1.0
*/
@@ -217,6 +232,8 @@ bool OH_AVFormat_GetLongValue(struct OH_AVFormat *format, const char *key, int64
* @param key read key value
* @param out read data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
+ * 4. out is nullptr.
* @since 9
* @version 1.0
*/
@@ -229,6 +246,8 @@ bool OH_AVFormat_GetFloatValue(struct OH_AVFormat *format, const char *key, floa
* @param key read key value
* @param out read data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
+ * 4. out is nullptr.
* @since 9
* @version 1.0
*/
@@ -242,6 +261,8 @@ bool OH_AVFormat_GetDoubleValue(struct OH_AVFormat *format, const char *key, dou
* @param out The read string pointer, the data life cycle pointed to is updated with GetString,
* and Format is destroyed. If the caller needs to hold it for a long time, it must copy the memory
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
+ * 4. out is nullptr. 5. malloc out string nullptr.
* @since 9
* @version 1.0
*/
@@ -256,6 +277,8 @@ bool OH_AVFormat_GetStringValue(struct OH_AVFormat *format, const char *key, con
* if the caller needs to hold it for a long time, it must copy the memory
* @param size Length of read and write data
* @return The return value is TRUE for success, FALSE for failure
+ * Possible failure causes: 1. input format is nullptr. 2. input format's magic error. 3. key is nullptr.
+ * 4. addr is nullptr. 5. size is nullptr.
* @since 9
* @version 1.0
*/
@@ -265,7 +288,8 @@ bool OH_AVFormat_GetBuffer(struct OH_AVFormat *format, const char *key, uint8_t
* @brief Output the information contained in OH_AVFormat as a string.
* @syscap SystemCapability.Multimedia.Media.Core
* @param format pointer to an OH_AVFormat instance
- * @return Returns a string consisting of key and data
+ * @return Returns a string consisting of key and data for success, nullptr for failure
+ * Possible failure causes: 1. input format is nullptr. 2. malloc dump info nullptr.
* @since 9
* @version 1.0
*/
diff --git a/multimedia/media_foundation/native_avmemory.h b/multimedia/media_foundation/native_avmemory.h
index 489a4ff49c3493e94dda7ed35772c061e156a7da..e4457d8350954b10ae4ccfc1afdccf11665c87dd 100644
--- a/multimedia/media_foundation/native_avmemory.h
+++ b/multimedia/media_foundation/native_avmemory.h
@@ -29,7 +29,9 @@ typedef struct OH_AVMemory OH_AVMemory;
* @brief Create an OH_AVMemory instance
* @syscap SystemCapability.Multimedia.Media.Core
* @param size the memory's size, bytes.
- * @return Returns a pointer to an OH_AVMemory instance, needs to be freed by OH_AVMemory_Destroy.
+ * @return Returns a pointer to an OH_AVMemory instance for success, needs to be freed by OH_AVMemory_Destroy,
+ * otherwise returns nullptr. Possible failure causes: 1. size <= 0. 2. create OH_AVMemory failed.
+ * 3.failed to new OH_AVMemory.
* @deprecated since 11
* @useinstead OH_AVBuffer_Create
* @since 10
@@ -41,6 +43,7 @@ OH_AVMemory *OH_AVMemory_Create(int32_t size);
* @syscap SystemCapability.Multimedia.Media.Core
* @param mem Encapsulate OH_AVMemory structure instance pointer
* @return the memory's virtual address if the memory is valid, otherwise nullptr.
+ * Possible failure causes: 1. input mem is nullptr. 2. mem's magic error. 3. mem's memory is nullptr.
* @deprecated since 11
* @useinstead OH_AVBuffer_GetAddr
* @since 9
@@ -53,6 +56,7 @@ uint8_t *OH_AVMemory_GetAddr(struct OH_AVMemory *mem);
* @syscap SystemCapability.Multimedia.Media.Core
* @param mem Encapsulate OH_AVMemory structure instance pointer
* @return the memory's size if the memory is valid, otherwise -1.
+ * Possible failure causes: 1. input mem is nullptr. 2. mem's magic error. 3. mem's memory is nullptr.
* @deprecated since 11
* @useinstead OH_AVBuffer_GetCapacity
* @since 9
@@ -65,8 +69,9 @@ int32_t OH_AVMemory_GetSize(struct OH_AVMemory *mem);
* instance
* @syscap SystemCapability.Multimedia.Media.Core
* @param mem Encapsulate OH_AVMemory structure instance pointer
- * @return Returns AV_ERR_OK if the execution is successful,
- * otherwise returns a specific error code, refer to {@link OH_AVErrCode}
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input mem is nullptr, mem's magic error or input mem is not user created.
* @deprecated since 11
* @useinstead OH_AVBuffer_Destroy
* @since 10
diff --git a/multimedia/media_library/media_asset_manager_capi.h b/multimedia/media_library/media_asset_manager_capi.h
index 74d3a657743bfc899b758ca60c9fbf072cd2c007..77d85cc823dcd6eec2e89cd15ddb80d3b55d569f 100644
--- a/multimedia/media_library/media_asset_manager_capi.h
+++ b/multimedia/media_library/media_asset_manager_capi.h
@@ -55,6 +55,7 @@ OH_MediaAssetManager* OH_MediaAssetManager_Create(void);
/**
* @brief Request image source with dest path.
*
+ * @permission ohos.permission.READ_IMAGEVIDEO
* @param manager Pointer to an OH_MediaAssetManager instance.
* @param uri The uri of the requested image resource.
* @param requestOptions Options model for requesting resource.
@@ -69,6 +70,7 @@ MediaLibrary_RequestId OH_MediaAssetManager_RequestImageForPath(OH_MediaAssetMan
/**
* @brief Request video source with dest path.
*
+ * @permission ohos.permission.READ_IMAGEVIDEO
* @param manager Pointer to an OH_MediaAssetManager instance.
* @param uri The uri of the requested video resource.
* @param requestOptions Options model for requesting resource.
@@ -83,6 +85,7 @@ MediaLibrary_RequestId OH_MediaAssetManager_RequestVideoForPath(OH_MediaAssetMan
/**
* @brief Cancel request by request id.
*
+ * @permission ohos.permission.READ_IMAGEVIDEO
* @param manager Pointer to an OH_MediaAssetManager instance.
* @param requestId The request id to be canceled.
* @return Returns true if the request is canceled successfully; returns false otherwise.
diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h
index 0939a6516453772642bb0d9e7c08cdc292cdef5c..fa63c5ae3c6e5a772738b10d3c58b9f5a6dc3fe0 100644
--- a/multimedia/player_framework/avplayer.h
+++ b/multimedia/player_framework/avplayer.h
@@ -43,6 +43,7 @@
#include "native_averrors.h"
#include "avplayer_base.h"
#include "native_window/external_window.h"
+#include "ohaudio/native_audiostream_base.h"
#ifdef __cplusplus
extern "C" {
@@ -65,7 +66,7 @@ typedef struct DRM_MediaKeySystemInfo DRM_MediaKeySystemInfo;
* @brief Call back will be invoked when updating DRM information.
* @param player Player instance.
* @param mediaKeySystemInfo DRM information.
- * @return DRM_ERR_INVALID_VAL when the params checked failure, return DRM_ERR_OK when function called successfully.
+ * @return void
* @since 12
* @version 1.0
*/
@@ -74,7 +75,8 @@ typedef void (*Player_MediaKeySystemInfoCallback)(OH_AVPlayer *player, DRM_Media
/**
* @brief Create a player
* @syscap SystemCapability.Multimedia.Media.AVPlayer
- * @return Returns a pointer to an OH_AVPlayer instance
+ * @return Returns a pointer to an OH_AVPlayer instance for success, nullptr for failure
+ * Possible failure causes: 1. failed to PlayerFactory::CreatePlayer. 2. failed to new PlayerObject.
* @since 11
* @version 1.0
*/
@@ -85,8 +87,9 @@ OH_AVPlayer *OH_AVPlayer_Create(void);
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param url Indicates the playback source.
- * @return Returns {@link AV_ERR_OK} if the url is set successfully; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr, url is null or player setUrlSource failed.
* @since 11
* @version 1.0
*/
@@ -99,8 +102,9 @@ OH_AVErrCode OH_AVPlayer_SetURLSource(OH_AVPlayer *player, const char *url);
* @param fd Indicates the file descriptor of media source.
* @param offset Indicates the offset of media source in file descriptor.
* @param size Indicates the size of media source.
- * @return Returns {@link AV_ERR_OK} if the fd source is set successfully; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player setFdSource failed.
* @since 11
* @version 1.0
*/
@@ -113,8 +117,9 @@ OH_AVErrCode OH_AVPlayer_SetFDSource(OH_AVPlayer *player, int32_t fd, int64_t of
*
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns {@link AV_ERR_OK} if {@link Prepare} is successfully added to the task queue;
- * returns an error code defined in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player Prepare failed.
* @since 11
* @version 1.0
*/
@@ -128,8 +133,9 @@ OH_AVErrCode OH_AVPlayer_Prepare(OH_AVPlayer *player);
*
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns {@link AV_ERR_OK} if the playback is started; otherwise returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player Play failed.
* @since 11
* @version 1.0
*/
@@ -139,8 +145,9 @@ OH_AVErrCode OH_AVPlayer_Play(OH_AVPlayer *player);
* @brief Pauses playback.
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns {@link AV_ERR_OK} if {@link Pause} is successfully added to the task queue;
- * returns an error code defined in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player Pause failed.
* @since 11
* @version 1.0
*/
@@ -150,8 +157,9 @@ OH_AVErrCode OH_AVPlayer_Pause(OH_AVPlayer *player);
* @brief Stop playback.
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns {@link AV_ERR_OK} if {@link Stop} is successfully added to the task queue;
- * returns an error code defined in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player Stop failed.
* @since 11
* @version 1.0
*/
@@ -165,8 +173,9 @@ OH_AVErrCode OH_AVPlayer_Stop(OH_AVPlayer *player);
*
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns {@link AV_ERR_OK} if {@link Reset} is successfully added to the task queue;
- * returns an error code defined in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player Reset failed.
* @since 11
* @version 1.0
*/
@@ -181,8 +190,9 @@ OH_AVErrCode OH_AVPlayer_Reset(OH_AVPlayer *player);
*
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns {@link AV_ERR_OK} if {@link Release} is successfully added to the task queue;
- * returns an error code defined in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player Release failed.
* @since 11
* @version 1.0
*/
@@ -197,8 +207,9 @@ OH_AVErrCode OH_AVPlayer_Release(OH_AVPlayer *player);
*
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns {@link AV_ERR_OK} if the playback is released; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player ReleaseSync failed.
* @since 11
* @version 1.0
*/
@@ -217,8 +228,9 @@ OH_AVErrCode OH_AVPlayer_ReleaseSync(OH_AVPlayer *player);
* ranging from 0 to 1. each step is 0.01.
* @param rightVolume Indicates the target volume of the right audio channel to set,
* ranging from 0 to 1. each step is 0.01.
- * @return Returns {@link AV_ERR_OK} if the volume is set; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player SetVolume failed.
* @since 11
* @version 1.0
*/
@@ -233,8 +245,9 @@ OH_AVErrCode OH_AVPlayer_SetVolume(OH_AVPlayer *player, float leftVolume, float
* @param player Pointer to an OH_AVPlayer instance
* @param mSeconds Indicates the target playback position, accurate to milliseconds.
* @param mode Indicates the player seek mode. For details, see {@link AVPlayerSeekMode}.
- * @return Returns {@link AV_ERR_OK} if the seek is done; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player Seek failed.
* @since 11
* @version 1.0
*/
@@ -245,8 +258,9 @@ OH_AVErrCode OH_AVPlayer_Seek(OH_AVPlayer *player, int32_t mSeconds, AVPlayerSee
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param currentTime Indicates the playback position.
- * @return Returns {@link AV_ERR_OK} if the current position is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player GetCurrentTime failed.
* @since 11
* @version 1.0
*/
@@ -257,8 +271,9 @@ OH_AVErrCode OH_AVPlayer_GetCurrentTime(OH_AVPlayer *player, int32_t *currentTim
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param videoWidth The video width
- * @return Returns {@link AV_ERR_OK} if the current position is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr.
* @since 11
* @version 1.0
*/
@@ -269,8 +284,9 @@ OH_AVErrCode OH_AVPlayer_GetVideoWidth(OH_AVPlayer *player, int32_t *videoWidth)
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param videoHeight The video height
- * @return Returns {@link AV_ERR_OK} if the current position is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr.
* @since 11
* @version 1.0
*/
@@ -281,8 +297,9 @@ OH_AVErrCode OH_AVPlayer_GetVideoHeight(OH_AVPlayer *player, int32_t *videoHeigh
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param speed the rate mode {@link AVPlaybackSpeed} which can set.
- * @return Returns {@link AV_ERR_OK} if the playback rate is set successful; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player SetPlaybackSpeed failed.
* @since 11
* @version 1.0
*/
@@ -293,13 +310,52 @@ OH_AVErrCode OH_AVPlayer_SetPlaybackSpeed(OH_AVPlayer *player, AVPlaybackSpeed s
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param speed the rate mode {@link AVPlaybackSpeed} which can get.
- * @return Returns {@link AV_ERR_OK} if the current player playback rate is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player GetPlaybackSpeed failed.
* @since 11
* @version 1.0
*/
OH_AVErrCode OH_AVPlayer_GetPlaybackSpeed(OH_AVPlayer *player, AVPlaybackSpeed *speed);
+/**
+ * @brief Set the renderer information of the player's audio renderer
+ * @param player Pointer to an OH_AVPlayer instance
+ * @param streamUsage The value {@link OH_AudioStream_Usage} used for the stream usage of the player audio render.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or streamUsage value is invalid.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVPlayer_SetAudioRendererInfo(OH_AVPlayer *player, OH_AudioStream_Usage streamUsage);
+
+/**
+ * @brief Set the interruption mode of the player's audio stream
+ * @param player Pointer to an OH_AVPlayer instance
+ * @param interruptMode The value {@link OH_AudioInterrupt_Mode} used for the interruption mode of
+ * the player audio stream.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or interruptMode value is invalid.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVPlayer_SetAudioInterruptMode(OH_AVPlayer *player, OH_AudioInterrupt_Mode interruptMode);
+
+/**
+ * @brief Set the effect mode of the player's audio stream
+ * @param player Pointer to an OH_AVPlayer instance
+ * @param effectMode The value {@link OH_AudioStream_AudioEffectMode} used for the effect mode of
+ * the player audio stream.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or effectMode value is invalid.
+ * @since 12
+ * @version 1.0
+ */
+OH_AVErrCode OH_AVPlayer_SetAudioEffectMode(OH_AVPlayer *player, OH_AudioStream_AudioEffectMode effectMode);
+
/**
* @brief set the bit rate use for hls player
*
@@ -313,8 +369,9 @@ OH_AVErrCode OH_AVPlayer_GetPlaybackSpeed(OH_AVPlayer *player, AVPlaybackSpeed *
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param bitRate the bit rate, The unit is bps.
- * @return Returns {@link AV_ERR_OK} if the bit rate is set successfully; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player SelectBitRate failed.
* @since 11
* @version 1.0
*/
@@ -325,8 +382,10 @@ OH_AVErrCode OH_AVPlayer_SelectBitRate(OH_AVPlayer *player, uint32_t bitRate);
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param window A pointer to a OHNativeWindow instance, see {@link OHNativeWindow}
- * @return Returns {@link AV_ERR_OK} if the surface is set; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr, input window is nullptr,
+ * or player SetVideoSurface failed.
* @since 11
* @version 1.0
*/
@@ -337,8 +396,9 @@ OH_AVErrCode OH_AVPlayer_SetVideoSurface(OH_AVPlayer *player, OHNativeWindow *w
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param duration Indicates the total duration of media files.
- * @return Returns {@link AV_ERR_OK} if the current duration is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player GetDuration failed.
* @since 11
* @version 1.0
*/
@@ -349,8 +409,9 @@ OH_AVErrCode OH_AVPlayer_GetDuration(OH_AVPlayer *player, int32_t *duration);
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param state the current playback state
- * @return Returns {@link AV_ERR_OK} if the current duration is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr.
* @since 11
* @version 1.0
*/
@@ -360,7 +421,7 @@ OH_AVErrCode OH_AVPlayer_GetState(OH_AVPlayer *player, AVPlayerState *state);
* @brief Checks whether the player is playing.
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns true if the playback is playing; false otherwise.
+ * @return Returns true if the playback is playing; Return false if not or input player is nullptr.
* @since 11
* @version 1.0
*/
@@ -370,7 +431,7 @@ bool OH_AVPlayer_IsPlaying(OH_AVPlayer *player);
* @brief Returns the value whether single looping is enabled or not .
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
- * @return Returns true if the playback is single looping; false otherwise.
+ * @return Returns true if the playback is single looping; Return false if not or input player is nullptr.
* @since 11
* @version 1.0
*/
@@ -381,8 +442,9 @@ bool OH_AVPlayer_IsLooping(OH_AVPlayer *player);
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param loop The switch to set loop
- * @return Returns {@link AV_ERR_OK} if the single looping is set; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player SetLooping failed.
* @since 11
* @version 1.0
*/
@@ -393,8 +455,10 @@ OH_AVErrCode OH_AVPlayer_SetLooping(OH_AVPlayer *player, bool loop);
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param callback object pointer.
- * @return Returns {@link AV_ERR_OK} if the playercallback is set; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr, callback.onInfo or callback.onError is null,
+ * or player SetPlayerCallback failed.
* @since 11
* @version 1.0
*/
@@ -410,8 +474,9 @@ OH_AVErrCode OH_AVPlayer_SetPlayerCallback(OH_AVPlayer *player, AVPlayerCallback
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param index Track index
- * @return Returns {@link AV_ERR_OK} if selected successfully; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player SelectTrack failed.
* @since 11
* @version 1.0
*/
@@ -427,8 +492,9 @@ OH_AVErrCode OH_AVPlayer_SelectTrack(OH_AVPlayer *player, int32_t index);
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param index Track index
- * @return Returns {@link AV_ERR_OK} if selected successfully; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player DeselectTrack failed.
* @since 11
* @version 1.0
*/
@@ -443,8 +509,9 @@ OH_AVErrCode OH_AVPlayer_DeselectTrack(OH_AVPlayer *player, int32_t index);
* @param player Pointer to an OH_AVPlayer instance
* @param trackType Media type.
* @param index Track index
- * @return Returns {@link AV_ERR_OK} if the track index is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player GetCurrentTrack failed.
* @since 11
* @version 1.0
*/
@@ -455,8 +522,10 @@ OH_AVErrCode OH_AVPlayer_GetCurrentTrack(OH_AVPlayer *player, int32_t trackType,
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param callback object pointer.
- * @return Returns {@link AV_ERR_OK} if the drm info callback is set; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr, MediaKeySystemInfoCallback is null
+ * player SetDrmSystemInfoCallback failed, SetDrmSystemInfoCallback failed or SetDrmSystemInfoCallback failed.
* @since 12
* @version 1.0
*/
@@ -468,8 +537,9 @@ OH_AVErrCode OH_AVPlayer_SetMediaKeySystemInfoCallback(OH_AVPlayer *player,
* @syscap SystemCapability.Multimedia.Media.AVPlayer
* @param player Pointer to an OH_AVPlayer instance
* @param mediaKeySystemInfo Media key system info.
- * @return Returns {@link AV_ERR_OK} if the current position is get; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or no memory.
* @since 12
* @version 1.0
*/
@@ -482,8 +552,9 @@ OH_AVErrCode OH_AVPlayer_GetMediaKeySystemInfo(OH_AVPlayer *player, DRM_MediaKey
* @param player Pointer to an OH_AVPlayer instance
* @param mediaKeySession A media key session instance with decryption function.
* @param secureVideoPath Require secure decoder or not.
- * @return Returns {@link AV_ERR_OK} if set successfully; returns an error code defined
- * in {@link native_averrors.h} otherwise.
+ * @return Function result code.
+ * {@link AV_ERR_OK} if the execution is successful.
+ * {@link AV_ERR_INVALID_VAL} if input player is nullptr or player SetDecryptConfig failed.
* @since 12
* @version 1.0
*/
diff --git a/multimedia/player_framework/avplayer/libavplayer.ndk.json b/multimedia/player_framework/avplayer/libavplayer.ndk.json
index 5c260ec089b7a9e6340f2a5075226dc48d831041..dbfa420edf150b49c60963d92591da2fcb4bb7b2 100644
--- a/multimedia/player_framework/avplayer/libavplayer.ndk.json
+++ b/multimedia/player_framework/avplayer/libavplayer.ndk.json
@@ -38,5 +38,17 @@
{
"first_introduced": "12",
"name": "OH_AVPlayer_SetDecryptionConfig"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVPlayer_SetAudioRendererInfo"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVPlayer_SetAudioInterruptMode"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVPlayer_SetAudioEffectMode"
}
]
\ No newline at end of file
diff --git a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json
index f0a7081dab36688f7c2df90665a2025c77986822..35becaca0a75cf370749c7bc79834e503776f7a0 100644
--- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json
+++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json
@@ -86,5 +86,9 @@
{
"first_introduced": "12",
"name": "OH_AVScreenCapture_ExcludeContent"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_AVScreenCapture_ContentFilter_AddWindowContent"
}
]
\ No newline at end of file
diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h
index e954386055a278052bc00d7ad70c33c31ca5a06e..07ecc8ab7c60025586a5e6e1f486b2e89b5b97f6 100644
--- a/multimedia/player_framework/native_avscreen_capture.h
+++ b/multimedia/player_framework/native_avscreen_capture.h
@@ -350,6 +350,19 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ContentFilter_AddAudioContent(
OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ExcludeContent(struct OH_AVScreenCapture *capture,
struct OH_AVScreenCapture_ContentFilter *filter);
+/**
+ * @brief Add Window content to the screen capture content filter
+ * @syscap SystemCapability.Multimedia.Media.AVScreenCapture
+ * @param filter Pointer to an OH_AVScreenCapture_ContentFilter instance
+ * @param Pointer to windowIDs to be added
+ * @param windowCount to be added
+ * @return Returns AV_SCREEN_CAPTURE_ERR_OK if the execution is successful,
+ * otherwise returns a specific error code, refer to {@link OH_AVSCREEN_CAPTURE_ErrCode}
+ * @since 12
+ * @version 1.0
+ */
+OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ContentFilter_AddWindowContent(
+ struct OH_AVScreenCapture_ContentFilter *filter, int32_t *windowIDs, int32_t windowCount);
#ifdef __cplusplus
}
#endif
diff --git a/resourceschedule/ffrt/ffrt.ndk.json b/resourceschedule/ffrt/ffrt.ndk.json
index ac87d49f85f54cb21d81a19bf277c0baf0600e3d..0c83414e04d1376626c3c10e964ed79abad22e73 100644
--- a/resourceschedule/ffrt/ffrt.ndk.json
+++ b/resourceschedule/ffrt/ffrt.ndk.json
@@ -51,7 +51,7 @@
{ "name": "ffrt_loop_timer_stop" },
{ "name": "ffrt_queue_attr_set_max_concurrency" },
{ "name": "ffrt_queue_atte_get_max_concurrency" },
- { "name": "ffrt_qet_main_queue" },
+ { "name": "ffrt_get_main_queue" },
{ "name": "ffrt_get_current_queue" },
{ "name": "ffrt_task_attr_set_queue_priority" },
{ "name": "ffrt_task_attr_get_queue_priority" },
diff --git a/resourceschedule/qos_manager/c/qos.h b/resourceschedule/qos_manager/c/qos.h
index c92ab5b8622578b0b086fb042b15bda961c48c97..62a7a19a9b17b882b566a728136528647bf46959 100644
--- a/resourceschedule/qos_manager/c/qos.h
+++ b/resourceschedule/qos_manager/c/qos.h
@@ -83,7 +83,8 @@ typedef enum QoS_Level {
* @brief Set the QoS level of the current thread.
*
* @param level Indicates the level to set. Specific level can be referenced {@link QoS_Level}.
- * @return Returns int32_t, return value == 0, success, otherwise value == -1, failed.
+ * @return Returns 0 if the operation is successful; returns -1 if level is out of range or
+ * internal error failed.
* @see QoS_Level
* @since 12
*/
@@ -92,7 +93,8 @@ int OH_QoS_SetThreadQoS(QoS_Level level);
/**
* @brief Cancel the QoS level of the current thread.
*
- * @return Returns int32_t, return value == 0, success, otherwise value == -1, failed.
+ * @return Returns 0 if the operation is successful; returns -1 if not set QoS for current thread
+ * or internal error failed.
* @see QoS_Level
* @since 12
*/
@@ -103,7 +105,8 @@ int OH_QoS_ResetThreadQoS();
*
* @param level This parameter is the output parameter,
* and the QoS level of the thread as a {@link QoS_Level} is written to this variable.
- * @return Returns int32_t, return value == 0, success, otherwise value == -1, failed.
+ * @return Returns 0 if the operation is successful; returns -1 if level is null, not
+ * set QoS for current thread or internal error failed.
* @see QoS_Level
* @since 12
*/
diff --git a/security/asset/inc/asset_api.h b/security/asset/inc/asset_api.h
index 87b2652dce5c320815ae412987a5054cb7472222..fc14226cb2edf2830758a95cdce185ea7119a8d6 100755
--- a/security/asset/inc/asset_api.h
+++ b/security/asset/inc/asset_api.h
@@ -52,7 +52,25 @@ extern "C" {
*
* @param attributes Pointer to the attributes of the asset to add.
* @param attributes Number of the attributes of the asset to add.
- * @return Returns ASSET_SUCCESS if the operation is successful; returns an error code otherwise.
+ * @return {@link ASSET_SUCCESS} 0 - The operation is successful.
+ * {@link ASSET_PERMISSION_DENIED} 201 - The caller doesn't have the permission.
+ * {@link ASSET_INVALID_ARGUMENT} 401 - Parameter error. Possible causes:
+ * 1. Mandatory parameters are left unspecified.
+ * 2. Incorrect parameter types.
+ * 3. Parameter verification failed.
+ * {@link ASSET_SERVICE_UNAVAILABLE} 24000001 - The ASSET service is unavailable.
+ * {@link ASSET_DUPLICATED} 24000003 - The asset already exists.
+ * {@link ASSET_STATUS_MISMATCH} 24000005 - The screen lock status does not match.
+ * {@link ASSET_OUT_OF_MEMORY} 24000006 - Insufficient memory.
+ * {@link ASSET_DATA_CORRUPTED} 24000007 - The asset is corrupted.
+ * {@link ASSET_DATABASE_ERROR} 24000008 - The database operation failed.
+ * {@link ASSET_CRYPTO_ERROR} 24000009 - The cryptography operation failed.
+ * {@link ASSET_IPC_ERROR} 24000010 - IPC failed.
+ * {@link ASSET_BMS_ERROR} 24000011 - Calling the Bundle Manager service failed.
+ * {@link ASSET_ACCOUNT_ERROR} 24000012 - Calling the OS Account service failed.
+ * {@link ASSET_ACCESS_TOKEN_ERROR} 24000013 - Calling the Access Token service failed.
+ * {@link ASSET_FILE_OPERATION_ERROR} 24000014 - The file operation failed.
+ * {@link ASSET_GET_SYSTEM_TIME_ERROR} 24000015 - Getting the system time failed.
* @since 11
*/
int32_t OH_Asset_Add(const Asset_Attr *attributes, uint32_t attrCnt);
@@ -62,7 +80,20 @@ int32_t OH_Asset_Add(const Asset_Attr *attributes, uint32_t attrCnt);
*
* @param query Pointer to the conditions for removing the assets.
* @param queryCnt Number of conditions for removing the assets.
- * @return Returns ASSET_SUCCESS if the operation is successful; returns an error code otherwise.
+ * @return {@link ASSET_SUCCESS} 0 - The operation is successful.
+ * {@link ASSET_INVALID_ARGUMENT} 401 - Parameter error. Possible causes:
+ * 1. Incorrect parameter types.
+ * 2. Parameter verification failed.
+ * {@link ASSET_SERVICE_UNAVAILABLE} 24000001 - The ASSET service is unavailable.
+ * {@link ASSET_NOT_FOUND} 24000002 - The asset is not found.
+ * {@link ASSET_OUT_OF_MEMORY} 24000006 - Insufficient memory.
+ * {@link ASSET_DATA_CORRUPTED} 24000007 - The asset is corrupted.
+ * {@link ASSET_DATABASE_ERROR} 24000008 - The database operation failed.
+ * {@link ASSET_IPC_ERROR} 24000010 - IPC failed.
+ * {@link ASSET_BMS_ERROR} 24000011 - Calling the Bundle Manager service failed.
+ * {@link ASSET_ACCOUNT_ERROR} 24000012 - Calling the OS Account service failed.
+ * {@link ASSET_ACCESS_TOKEN_ERROR} 24000013 - Calling the Access Token service failed.
+ * {@link ASSET_GET_SYSTEM_TIME_ERROR} 24000015 - Getting the system time failed.
* @since 11
*/
int32_t OH_Asset_Remove(const Asset_Attr *query, uint32_t queryCnt);
@@ -74,7 +105,23 @@ int32_t OH_Asset_Remove(const Asset_Attr *query, uint32_t queryCnt);
* @param queryCnt Number of conditions for updating the asset.
* @param attributes Pointer to the attributes of the asset to update.
* @param attributes Number of the attributes of the asset to update.
- * @return Returns ASSET_SUCCESS if the operation is successful; returns an error code otherwise.
+ * @return {@link ASSET_SUCCESS} 0 - The operation is successful.
+ * {@link ASSET_INVALID_ARGUMENT} 401 - Parameter error. Possible causes:
+ * 1. Mandatory parameters are left unspecified.
+ * 2. Incorrect parameter types.
+ * 3. Parameter verification failed.
+ * {@link ASSET_SERVICE_UNAVAILABLE} 24000001 - The ASSET service is unavailable.
+ * {@link ASSET_NOT_FOUND} 24000002 - The asset is not found.
+ * {@link ASSET_STATUS_MISMATCH} 24000005 - The screen lock status does not match.
+ * {@link ASSET_OUT_OF_MEMORY} 24000006 - Insufficient memory.
+ * {@link ASSET_DATA_CORRUPTED} 24000007 - The asset is corrupted.
+ * {@link ASSET_DATABASE_ERROR} 24000008 - The database operation failed.
+ * {@link ASSET_CRYPTO_ERROR} 24000009 - The cryptography operation failed.
+ * {@link ASSET_IPC_ERROR} 24000010 - IPC failed.
+ * {@link ASSET_BMS_ERROR} 24000011 - Calling the Bundle Manager service failed.
+ * {@link ASSET_ACCOUNT_ERROR} 24000012 - Calling the OS Account service failed.
+ * {@link ASSET_ACCESS_TOKEN_ERROR} 24000013 - Calling the Access Token service failed.
+ * {@link ASSET_GET_SYSTEM_TIME_ERROR} 24000015 - Getting the system time failed.
* @since 11
*/
int32_t OH_Asset_Update(const Asset_Attr *query, uint32_t queryCnt,
@@ -86,7 +133,23 @@ int32_t OH_Asset_Update(const Asset_Attr *query, uint32_t queryCnt,
* @param query Pointer to the search criteria of the asset.
* @param queryCnt Number of the search criteria.
* @param challenge Pointer to the challenge value to be used when OH_Asset_Query is called.
- * @return Returns ASSET_SUCCESS if the operation is successful; returns an error code otherwise.
+ * @return {@link ASSET_SUCCESS} 0 - The operation is successful.
+ * {@link ASSET_INVALID_ARGUMENT} 401 - Parameter error. Possible causes:
+ * 1. Incorrect parameter types.
+ * 2. Parameter verification failed.
+ * {@link ASSET_SERVICE_UNAVAILABLE} 24000001 - The ASSET service is unavailable.
+ * {@link ASSET_NOT_FOUND} 24000002 - The asset is not found.
+ * {@link ASSET_STATUS_MISMATCH} 24000005 - The screen lock status does not match.
+ * {@link ASSET_OUT_OF_MEMORY} 24000006 - Insufficient memory.
+ * {@link ASSET_DATA_CORRUPTED} 24000007 - The asset is corrupted.
+ * {@link ASSET_DATABASE_ERROR} 24000008 - The database operation failed.
+ * {@link ASSET_CRYPTO_ERROR} 24000009 - The cryptography operation failed.
+ * {@link ASSET_IPC_ERROR} 24000010 - IPC failed.
+ * {@link ASSET_BMS_ERROR} 24000011 - Calling the Bundle Manager service failed.
+ * {@link ASSET_ACCOUNT_ERROR} 24000012 - Calling the OS Account service failed.
+ * {@link ASSET_ACCESS_TOKEN_ERROR} 24000013 - Calling the Access Token service failed.
+ * {@link ASSET_LIMIT_EXCEEDED} 24000016 - The cache exceeds the limit.
+ * {@link ASSET_UNSUPPORTED} 24000017 - The capability is not supported.
* @since 11
*/
int32_t OH_Asset_PreQuery(const Asset_Attr *query, uint32_t queryCnt, Asset_Blob *challenge);
@@ -97,7 +160,23 @@ int32_t OH_Asset_PreQuery(const Asset_Attr *query, uint32_t queryCnt, Asset_Blob
* @param query Pointer to the search criteria.
* @param queryCnt Number of the search criteria.
* @param resultSet Pointer to the query result obtained.
- * @return Returns ASSET_SUCCESS if the operation is successful; returns an error code otherwise.
+ * @return {@link ASSET_SUCCESS} 0 - The operation is successful.
+ * {@link ASSET_INVALID_ARGUMENT} 401 - Parameter error. Possible causes:
+ * 1. Incorrect parameter types.
+ * 2. Parameter verification failed.
+ * {@link ASSET_SERVICE_UNAVAILABLE} 24000001 - The ASSET service is unavailable.
+ * {@link ASSET_NOT_FOUND} 24000002 - The asset is not found.
+ * {@link ASSET_ACCESS_DENIED} 24000004 - Access to the asset is denied.
+ * {@link ASSET_STATUS_MISMATCH} 24000005 - The screen lock status does not match.
+ * {@link ASSET_OUT_OF_MEMORY} 24000006 - Insufficient memory.
+ * {@link ASSET_DATA_CORRUPTED} 24000007 - The asset is corrupted.
+ * {@link ASSET_DATABASE_ERROR} 24000008 - The database operation failed.
+ * {@link ASSET_CRYPTO_ERROR} 24000009 - The cryptography operation failed.
+ * {@link ASSET_IPC_ERROR} 24000010 - IPC failed.
+ * {@link ASSET_BMS_ERROR} 24000011 - Calling the Bundle Manager service failed.
+ * {@link ASSET_ACCOUNT_ERROR} 24000012 - Calling the OS Account service failed.
+ * {@link ASSET_ACCESS_TOKEN_ERROR} 24000013 - Calling the Access Token service failed.
+ * {@link ASSET_UNSUPPORTED} 24000017 - The capability is not supported.
* @since 11
*/
int32_t OH_Asset_Query(const Asset_Attr *query, uint32_t queryCnt, Asset_ResultSet *resultSet);
@@ -108,7 +187,17 @@ int32_t OH_Asset_Query(const Asset_Attr *query, uint32_t queryCnt, Asset_ResultS
* @param handle Pointer to the handle of the data to process, which includes the challenge value returned by
* OH_Asset_PreQuery.
* @param handleCnt Number of the elements in the handle attribute set.
- * @return Returns ASSET_SUCCESS if the operation is successful; returns an error code otherwise.
+ * @return {@link ASSET_SUCCESS} 0 - The operation is successful.
+ * {@link ASSET_INVALID_ARGUMENT} 401 - Parameter error. Possible causes:
+ * 1. Mandatory parameters are left unspecified.
+ * 2. Incorrect parameter types.
+ * 3. Parameter verification failed.
+ * {@link ASSET_SERVICE_UNAVAILABLE} 24000001 - The ASSET service is unavailable.
+ * {@link ASSET_OUT_OF_MEMORY} 24000006 - Insufficient memory.
+ * {@link ASSET_IPC_ERROR} 24000010 - IPC failed.
+ * {@link ASSET_BMS_ERROR} 24000011 - Calling the Bundle Manager service failed.
+ * {@link ASSET_ACCOUNT_ERROR} 24000012 - Calling the OS Account service failed.
+ * {@link ASSET_ACCESS_TOKEN_ERROR} 24000013 - Calling the Access Token service failed.
* @since 11
*/
int32_t OH_Asset_PostQuery(const Asset_Attr *handle, uint32_t handleCnt);
diff --git a/security/asset/inc/asset_type.h b/security/asset/inc/asset_type.h
index cc2bd861d53ba93ab35e987554ab0479bb3a73b5..150d76021ae67b1f4ac91b7441554f7b89712530 100755
--- a/security/asset/inc/asset_type.h
+++ b/security/asset/inc/asset_type.h
@@ -216,85 +216,45 @@ typedef enum {
* @since 11
*/
typedef enum {
- /**
- * The operation is successful.
- */
+ /** @error The operation is successful. */
ASSET_SUCCESS = 0,
- /**
- * The caller does not have the required permission.
- */
+ /** @error The caller doesn't have the permission. */
ASSET_PERMISSION_DENIED = 201,
- /**
- * The parameter is invalid.
- */
+ /** @error The parameter is invalid. */
ASSET_INVALID_ARGUMENT = 401,
- /**
- * The asset service is unavailable.
- */
+ /** @error The ASSET service is unavailable. */
ASSET_SERVICE_UNAVAILABLE = 24000001,
- /**
- * The asset is not found.
- */
+ /** @error The asset is not found. */
ASSET_NOT_FOUND = 24000002,
- /**
- * The asset already exists.
- */
+ /** @error The asset already exists. */
ASSET_DUPLICATED = 24000003,
- /**
- * The access to the asset is denied.
- */
+ /** @error Access to the asset is denied. */
ASSET_ACCESS_DENIED = 24000004,
- /**
- * The lock screen status does not match the access control type specified.
- */
+ /** @error The screen lock status does not match. */
ASSET_STATUS_MISMATCH = 24000005,
- /**
- * The system memory is insufficient.
- */
+ /** @error Insufficient memory. */
ASSET_OUT_OF_MEMORY = 24000006,
- /**
- * The asset is corrupted.
- */
+ /** @error The asset is corrupted. */
ASSET_DATA_CORRUPTED = 24000007,
- /**
- * The database operation failed.
- */
+ /** @error The database operation failed. */
ASSET_DATABASE_ERROR = 24000008,
- /**
- * The cryptography operation failed.
- */
+ /** @error The cryptography operation failed. */
ASSET_CRYPTO_ERROR = 24000009,
- /**
- * The inter-process communication (IPC) failed.
- */
+ /** @error IPC failed. */
ASSET_IPC_ERROR = 24000010,
- /**
- * The Bundle Manager service is abnormal.
- */
+ /** @error Calling the Bundle Manager service failed. */
ASSET_BMS_ERROR = 24000011,
- /**
- * The Account service is abnormal.
- */
+ /** @error Calling the OS Account service failed. */
ASSET_ACCOUNT_ERROR = 24000012,
- /**
- * The Access Token service is abnormal.
- */
+ /** @error Calling the Access Token service failed. */
ASSET_ACCESS_TOKEN_ERROR = 24000013,
- /**
- * The file operation failed.
- */
+ /** @error The file operation failed. */
ASSET_FILE_OPERATION_ERROR = 24000014,
- /**
- * The operation for obtaining the system time failed.
- */
+ /** @error Getting the system time failed. */
ASSET_GET_SYSTEM_TIME_ERROR = 24000015,
- /**
- * The number of cached assets exceeds the limit.
- */
+ /** @error The cache exceeds the limit. */
ASSET_LIMIT_EXCEEDED = 24000016,
- /**
- * The function is not supported.
- */
+ /** @error The capability is not supported. */
ASSET_UNSUPPORTED = 24000017,
} Asset_ResultCode;
diff --git a/sensors/miscdevice/vibrator/include/vibrator.h b/sensors/miscdevice/vibrator/include/vibrator.h
index e01fe0e8a159247a9b85d2e97fc37a2b631deb96..8098122fa7e2433824dad7b236a4ac472f36eba1 100644
--- a/sensors/miscdevice/vibrator/include/vibrator.h
+++ b/sensors/miscdevice/vibrator/include/vibrator.h
@@ -44,8 +44,13 @@ extern "C" {
*
* @param duration - Vibration duration, in milliseconds.
* @param attribute - Vibration attribute. For details, see {@link Vibrator_Attribute}.
- * @return Returns 0 if the operation is successful; returns a non-zero value otherwise.
- * For details, see {@link Vibrator_ErrorCode}.
+ * @return Returns 0 if the operation is successful; returns the following error code otherwise.
+ * {@link PERMISSION_DENIED} Permission verification failed.\n
+ * {@link PARAMETER_ERROR} Parameter check failed. For example, the parameter is invalid,
+ * or the parameter type passed in is incorrect.\n
+ * {@link UNSUPPORTED} The API is not supported on the device. The device supports the corresponding SysCap,
+ * but does not support certain APIs in this SysCap.\n
+ * {@link DEVICE_OPERATION_FAILED} The operation on the device failed.\n
* @permission ohos.permission.VIBRATE
*
* @since 11
@@ -58,8 +63,13 @@ int32_t OH_Vibrator_PlayVibration(int32_t duration, Vibrator_Attribute attribute
* @param fileDescription - File descriptor of the custom vibration effect.
* For details, see {@link Vibrator_FileDescription}.
* @param vibrateAttribute - Vibration attribute. For details, see {@link Vibrator_Attribute}.
- * @return Returns 0 if the operation is successful; returns a non-zero value otherwise.
- * For details, see {@link Vibrator_ErrorCode}.
+ * @return Returns 0 if the operation is successful; returns the following error code otherwise.
+ * {@link PERMISSION_DENIED} Permission verification failed.\n
+ * {@link PARAMETER_ERROR} Parameter check failed. For example, the parameter is invalid,
+ * or the parameter type passed in is incorrect.\n
+ * {@link UNSUPPORTED} The API is not supported on the device. The device supports the corresponding SysCap,
+ * but does not support certain APIs in this SysCap.\n
+ * {@link DEVICE_OPERATION_FAILED} The operation on the device failed.\n
* @permission ohos.permission.VIBRATE
*
* @since 11
@@ -71,8 +81,11 @@ int32_t OH_Vibrator_PlayVibrationCustom(Vibrator_FileDescription fileDescription
* @brief Stop the motor vibration according to the input mode.
*
* @permission ohos.permission.VIBRATE
- * @return Returns 0 if the operation is successful; returns a non-zero value otherwise.
- * For details, see {@link Vibrator_ErrorCode}.
+ * @return Returns 0 if the operation is successful; returns the following error code otherwise.
+ * {@link PERMISSION_DENIED} Permission verification failed.\n
+ * {@link UNSUPPORTED} The API is not supported on the device. The device supports the corresponding SysCap,
+ * but does not support certain APIs in this SysCap.\n
+ * {@link DEVICE_OPERATION_FAILED} The operation on the device failed.\n
* @permission ohos.permission.VIBRATE
*
* @since 11
diff --git a/sensors/miscdevice/vibrator/include/vibrator_type.h b/sensors/miscdevice/vibrator/include/vibrator_type.h
index 991a6bf14d24e6411f62361eb6534ca90ac961b1..ffc0c528b5d89c3ee42dde351630df9df378c116 100644
--- a/sensors/miscdevice/vibrator/include/vibrator_type.h
+++ b/sensors/miscdevice/vibrator/include/vibrator_type.h
@@ -28,15 +28,15 @@ extern "C" {
* @since 11
*/
typedef enum Vibrator_ErrorCode : int32_t {
- /**< Permission verification failed. */
+ /**< @error Permission verification failed. */
PERMISSION_DENIED = 201,
- /**< Parameter check failed. For example, a mandatory parameter is not passed in,
+ /**< @error Parameter check failed. For example, a mandatory parameter is not passed in,
* or the parameter type passed in is incorrect. */
PARAMETER_ERROR = 401,
- /**< The API is not supported on the device. The device supports the corresponding SysCap,
+ /**< @error The API is not supported on the device. The device supports the corresponding SysCap,
* but does not support certain APIs in this SysCap. */
UNSUPPORTED = 801,
- /**< The operation on the device failed. */
+ /**< @error The operation on the device failed. */
DEVICE_OPERATION_FAILED = 14600101,
} Vibrator_ErrorCode;
diff --git a/sensors/sensor/oh_sensor.h b/sensors/sensor/oh_sensor.h
index 2f63c21978914e8ef3573f08dbce38e188863da6..282e379ba79412235d89ff4ef559ff0d08230672 100644
--- a/sensors/sensor/oh_sensor.h
+++ b/sensors/sensor/oh_sensor.h
@@ -45,8 +45,10 @@ extern "C" {
* @param infos - Double pointer to the information about all sensors on the device.
* For details, see {@link Sensor_Info}.
* @param count - Pointer to the number of sensors on the device.
- * @return Returns SENSOR_SUCCESS if the operation is successful;
- * returns an error code defined in {@link Sensor_Result} otherwise.
+ * @return Returns SENSOR_SUCCESS if the operation is successful; returns the following error code otherwise.
+ * {@link SENSOR_PARAMETER_ERROR} Parameter check failed. For example, the parameter is invalid,
+ * or the parameter type passed in is incorrect.\n
+ * {@link SENSOR_SERVICE_EXCEPTION} The sensor service is abnormal.\n
*
* @since 11
*/
@@ -65,8 +67,11 @@ Sensor_Result OH_Sensor_GetInfos(Sensor_Info **infos, uint32_t *count);
* For details, see {@link Sensor_SubscriptionAttribute}.
* @param subscriber - Pointer to the subscriber information, which is used to specify the callback function for
* reporting the sensor data. For details, see {@link Sensor_Subscriber}.
- * @return Returns SENSOR_SUCCESS if the operation is successful;
- * returns an error code defined in {@link Sensor_Result} otherwise.
+ * @return Returns SENSOR_SUCCESS if the operation is successful; returns the following error code otherwise.
+ * {@link SENSOR_PERMISSION_DENIED} Permission verification failed.\n
+ * {@link SENSOR_PARAMETER_ERROR} Parameter check failed. For example, the parameter is invalid,
+ * or the parameter type passed in is incorrect.\n
+ * {@link SENSOR_SERVICE_EXCEPTION} The sensor service is abnormal.\n
* @permission ohos.permission.ACCELEROMETER or ohos.permission.GYROSCOPE or
* ohos.permission.ACTIVITY_MOTION or ohos.permission.READ_HEALTH_DATA
* @since 11
@@ -85,8 +90,11 @@ Sensor_Result OH_Sensor_Subscribe(const Sensor_SubscriptionId *id,
* @param id - Pointer to the sensor subscription ID. For details, see {@link Sensor_SubscriptionId}.
* @param subscriber - Pointer to the subscriber information, which is used to specify the callback function for
* reporting the sensor data. For details, see {@link Sensor_Subscriber}.
- * @return Returns SENSOR_SUCCESS if the operation is successful;
- * returns an error code defined in {@link Sensor_Result} otherwise.
+ * @return Returns SENSOR_SUCCESS if the operation is successful; returns the following error code otherwise.
+ * {@link SENSOR_PERMISSION_DENIED} Permission verification failed.\n
+ * {@link SENSOR_PARAMETER_ERROR} Parameter check failed. For example, the parameter is invalid,
+ * or the parameter type passed in is incorrect.\n
+ * {@link SENSOR_SERVICE_EXCEPTION} The sensor service is abnormal.\n
* @permission ohos.permission.ACCELEROMETER or ohos.permission.GYROSCOPE or
* ohos.permission.ACTIVITY_MOTION or ohos.permission.READ_HEALTH_DATA
*
diff --git a/sensors/sensor/oh_sensor_type.h b/sensors/sensor/oh_sensor_type.h
index 545acd83e8f0456eb8e16fd07bc533f71121978b..cb40825fbc570d3167d3e99b41954c300345bb3a 100644
--- a/sensors/sensor/oh_sensor_type.h
+++ b/sensors/sensor/oh_sensor_type.h
@@ -120,23 +120,23 @@ typedef enum Sensor_Type {
*/
typedef enum Sensor_Result {
/**
- * The operation is successful.
+ * @error The operation is successful.
* @since 11
*/
SENSOR_SUCCESS = 0,
/**
- * Permission verification failed.
+ * @error Permission verification failed.
* @since 11
*/
SENSOR_PERMISSION_DENIED = 201,
/**
- * Parameter check failed. For example, a mandatory parameter is not passed in,
+ * @error Parameter check failed. For example, a mandatory parameter is not passed in,
* or the parameter type passed in is incorrect.
* @since 11
*/
SENSOR_PARAMETER_ERROR = 401,
/**
- * The sensor service is abnormal.
+ * @error The sensor service is abnormal.
* @since 11
*/
SENSOR_SERVICE_EXCEPTION = 14500101,
diff --git a/third_party/musl/ndk_musl_include/sys/cdefs.h b/third_party/musl/ndk_musl_include/sys/cdefs.h
index 84b7915ce7b8a5589f3f2d0de8fd9c3067eeb6bc..f8ce3d2b805f525272308d660cf373ca28d83482 100644
--- a/third_party/musl/ndk_musl_include/sys/cdefs.h
+++ b/third_party/musl/ndk_musl_include/sys/cdefs.h
@@ -41,10 +41,10 @@
#define __BEGIN_EXTERN_C extern "C" {
#define __END_EXTERN_C }
#ifndef __BEGIN_DECLS
-#define __BEGIN_DECLS extern "C" {
+#define __BEGIN_DECLS extern "C" {
#endif
#ifndef __END_DECLS
-#define __END_DECLS }
+#define __END_DECLS }
#endif
#else
#define __BEGIN_EXTERN_C
@@ -53,7 +53,7 @@
#define __BEGIN_DECLS
#endif
#ifndef __END_DECLS
-#define __END_DECLS
+#define __END_DECLS
#endif
#endif
diff --git a/web/webview/interfaces/native/arkweb_error_code.h b/web/webview/interfaces/native/arkweb_error_code.h
index 07f27402591ac122463d4f340482d6191aefc58f..d7e0a76d24dd62a8864c915cf03026d9bb272390 100644
--- a/web/webview/interfaces/native/arkweb_error_code.h
+++ b/web/webview/interfaces/native/arkweb_error_code.h
@@ -32,28 +32,13 @@
#define ARKWEB_ERROR_CODE_H
typedef enum ArkWeb_ErrorCode {
-/*
- * @brief Unknown error.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
- */
+/** @error Unknown error. */
ARKWEB_ERROR_UNKNOWN = 17100100,
-/*
- * @brief Invalid param.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
- */
+/** @error Invalid param. */
ARKWEB_INVALID_PARAM = 17100101,
-/*
- * @brief Register custom schemes should be called before create any ArkWeb.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
- */
+/** @error Register custom schemes should be called before create any ArkWeb. */
ARKWEB_SCHEME_REGISTER_FAILED = 17100102,
} ArkWeb_ErrorCode;
diff --git a/web/webview/interfaces/native/arkweb_interface.h b/web/webview/interfaces/native/arkweb_interface.h
index 90f3b80e5a4f1989d23f02a6599b2895d98f17cc..872e30d52e03d0af57827ef44461a14ae06398f5 100644
--- a/web/webview/interfaces/native/arkweb_interface.h
+++ b/web/webview/interfaces/native/arkweb_interface.h
@@ -63,7 +63,8 @@ typedef enum {
/*
* @brief Obtains the native API set of a specified type.
* @param type Indicates the type of the native API set provided by ArkWeb.
- * @return Returns the pointer to the native API abstract object that carries the size.
+ * @return Return the pointer to the native API abstract object that carries the size.
+ * If the type is incorrect, a null pointer is returned.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
diff --git a/web/webview/interfaces/native/arkweb_net_error_list.h b/web/webview/interfaces/native/arkweb_net_error_list.h
index f8ef5b247d5b4ce9a915405df58a2b13a5b968e4..2e0a1c16a0319250240bc7f749f37f9fd6bd2dfc 100644
--- a/web/webview/interfaces/native/arkweb_net_error_list.h
+++ b/web/webview/interfaces/native/arkweb_net_error_list.h
@@ -32,907 +32,598 @@
#define ARKWEB_NET_ERROR_LIST_H
typedef enum ArkWeb_NetError {
- /*
- * @brief Normal.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Normal.
*/
ARKWEB_NET_OK = 0,
- /*
- * @brief An asynchronous IO operation is not yet complete. This usually does not
+ /**
+ * @error An asynchronous IO operation is not yet complete. This usually does not
* indicate a fatal error. Typically this error will be generated as a
* notification to wait for some external notification that the IO operation
* finally completed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_IO_PENDING = -1,
- /*
- * @brief A generic failure occurred.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error A generic failure occurred.
*/
ARKWEB_ERR_FAILED = -2,
- /*
- * @brief An operation was aborted.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An operation was aborted.
*/
ARKWEB_ERR_ABORTED = -3,
- /*
- * @brief An argument to the function is incorrect.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An argument to the function is incorrect.
*/
ARKWEB_ERR_INVALID_ARGUMENT = -4,
- /*
- * @brief The handle or file descriptor is invalid.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The handle or file descriptor is invalid.
*/
ARKWEB_ERR_INVALID_HANDLE = -5,
- /*
- * @brief The file or directory cannot be found.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The file or directory cannot be found.
*/
ARKWEB_ERR_FILE_NOT_FOUND = -6,
- /*
- * @brief An operation timed out.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An operation timed out.
*/
ARKWEB_ERR_TIMED_OUT = -7,
- /*
- * @brief The file is too large.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The file is too large.
*/
ARKWEB_ERR_FILE_TOO_LARGE = -8,
- /*
- * @brief An unexpected error. This may be caused by a programming mistake or an
+ /**
+ * @error An unexpected error. This may be caused by a programming mistake or an
* invalid assumption.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_UNEXPECTED = -9,
- /*
- * @brief Permission to access a resource, other than the network, was denied.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Permission to access a resource, other than the network, was denied.
*/
ARKWEB_ERR_ACCESS_DENIED = -10,
- /*
- * @brief The operation failed because of unimplemented functionality.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The operation failed because of unimplemented functionality.
*/
ARKWEB_ERR_NOT_IMPLEMENTED = -11,
- /*
- * @brief There were not enough resources to complete the operation.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error There were not enough resources to complete the operation.
*/
ARKWEB_ERR_INSUFFICIENT_RESOURCES = -12,
- /*
- * @brief Memory allocation failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Memory allocation failed.
*/
ARKWEB_ERR_OUT_OF_MEMORY = -13,
- /*
- * @brief The file upload failed because the file's modification time was different
+ /**
+ * @error The file upload failed because the file's modification time was different
* from the expectation.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_UPLOAD_FILE_CHANGED = -14,
- /*
- * @brief The socket is not connected.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The socket is not connected.
*/
ARKWEB_ERR_SOCKET_NOT_CONNECTED = -15,
- /*
- * @brief The file already exists.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The file already exists.
*/
ARKWEB_ERR_FILE_EXISTS = -16,
- /*
- * @brief The path or file name is too long.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The path or file name is too long.
*/
ARKWEB_ERR_FILE_PATH_TOO_LONG = -17,
- /*
- * @brief Not enough room left on the disk.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Not enough room left on the disk.
*/
ARKWEB_ERR_FILE_NO_SPACE = -18,
- /*
- * @brief The file has a virus.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The file has a virus.
*/
ARKWEB_ERR_FILE_VIRUS_INFECTED = -19,
- /*
- * @brief The client chose to block the request.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The client chose to block the request.
*/
ARKWEB_ERR_BLOCKED_BY_CLIENT = -20,
- /*
- * @brief The network changed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The network changed.
*/
ARKWEB_ERR_NETWORK_CHANGED = -21,
- /*
- * @brief The request was blocked by the URL block list configured by the domain
+ /**
+ * @error The request was blocked by the URL block list configured by the domain
* administrator.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_BLOCKED_BY_ADMINISTRATOR = -22,
- /*
- * @brief The socket is already connected.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The socket is already connected.
*/
ARKWEB_ERR_SOCKET_CONNECTED = -23,
- /*
- * @brief The upload failed because the upload stream needed to be re-read, due to a
+ /**
+ * @error The upload failed because the upload stream needed to be re-read, due to a
* retry or a redirect, but the upload stream doesn't support that operation.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25,
- /*
- * @brief The request failed because the URLRequestContext is shutting down, or has
+ /**
+ * @error The request failed because the URLRequestContext is shutting down, or has
* been shut down.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CONTEXT_SHUT_DOWN = -26,
- /*
- * @brief The request failed because the response was delivered along with requirements
+ /**
+ * @error The request failed because the response was delivered along with requirements
* which are not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor
* checks and 'Cross-Origin-Resource-Policy' for instance).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_BLOCKED_BY_RESPONSE = -27,
- /*
- * @brief The request was blocked by system policy disallowing some or all cleartext
+ /**
+ * @error The request was blocked by system policy disallowing some or all cleartext
* requests.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CLEARTEXT_NOT_PERMITTED = -29,
- /*
- * @brief The request was blocked by a Content Security Policy.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The request was blocked by a Content Security Policy.
*/
ARKWEB_ERR_BLOCKED_BY_CSP = -30,
- /*
- * @brief The request was blocked because of no H/2 or QUIC session.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The request was blocked because of no H/2 or QUIC session.
*/
ARKWEB_ERR_H2_OR_QUIC_REQUIRED = -31,
- /*
- * @brief The request was blocked by CORB or ORB.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The request was blocked by CORB or ORB.
*/
ARKWEB_ERR_BLOCKED_BY_ORB = -32,
- /*
- * @brief A connection was closed (corresponding to a TCP FIN).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error A connection was closed (corresponding to a TCP FIN).
*/
ARKWEB_ERR_CONNECTION_CLOSED = -100,
- /*
- * @brief A connection was reset (corresponding to a TCP RST).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error A connection was reset (corresponding to a TCP RST).
*/
ARKWEB_ERR_CONNECTION_RESET = -101,
- /*
- * @brief A connection attempt was refused.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error A connection attempt was refused.
*/
ARKWEB_ERR_CONNECTION_REFUSED = -102,
- /*
- * @brief A connection timed out as a result of not receiving an ACK for data sent.
+ /**
+ * @error A connection timed out as a result of not receiving an ACK for data sent.
* This can include a FIN packet that did not get ACK'd.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CONNECTION_ABORTED = -103,
- /*
- * @brief A connection attempt failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error A connection attempt failed.
*/
ARKWEB_ERR_CONNECTION_FAILED = -104,
- /*
- * @brief The host name could not be resolved.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The host name could not be resolved.
*/
ARKWEB_ERR_NAME_NOT_RESOLVED = -105,
- /*
- * @brief The Internet connection has been lost.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The Internet connection has been lost.
*/
ARKWEB_ERR_INTERNET_DISCONNECTED = -106,
- /*
- * @brief An SSL protocol error occurred.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An SSL protocol error occurred.
*/
ARKWEB_ERR_SSL_PROTOCOL_ERROR = -107,
- /*
- * @brief The IP address or port number is invalid (e.g., cannot connect to the IP
+ /**
+ * @error The IP address or port number is invalid (e.g., cannot connect to the IP
* address 0 or the port 0).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_ADDRESS_INVALID = -108,
- /*
- * @brief The IP address is unreachable. This usually means that there is no route to
+ /**
+ * @error The IP address is unreachable. This usually means that there is no route to
* the specified host or network.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_ADDRESS_UNREACHABLE = -109,
- /*
- * @brief The server requested a client certificate for SSL client authentication.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The server requested a client certificate for SSL client authentication.
*/
ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,
- /*
- * @brief A tunnel connection through the proxy could not be established.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error A tunnel connection through the proxy could not be established.
*/
ARKWEB_ERR_TUNNEL_CONNECTION_FAILED = -111,
- /*
- * @brief No SSL protocol versions are enabled.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error No SSL protocol versions are enabled.
*/
ARKWEB_ERR_NO_SSL_VERSIONS_ENABLED = -112,
- /*
- * @brief The client and server don't support a common SSL protocol version or
+ /**
+ * @error The client and server don't support a common SSL protocol version or
* cipher suite.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
- /*
- * @brief The server requested a renegotiation (rehandshake).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The server requested a renegotiation (rehandshake).
*/
ARKWEB_ERR_SSL_RENEGOTIATION_REQUESTED = -114,
- /*
- * @brief The proxy requested authentication (for tunnel establishment, with an
+ /**
+ * @error The proxy requested authentication (for tunnel establishment, with an
* unsupported method.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_PROXY_AUTH_UNSUPPORTED = -115,
- /*
- * @brief The SSL handshake failed because of a bad or missing client certificate.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The SSL handshake failed because of a bad or missing client certificate.
*/
ARKWEB_ERR_BAD_SSL_CLIENT_AUTH_CERT = -117,
- /*
- * @brief A connection attempt timed out.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error A connection attempt timed out.
*/
ARKWEB_ERR_CONNECTION_TIMED_OUT = -118,
- /*
- * @brief There are too many pending DNS resolves, so a request in the queue was
+ /**
+ * @error There are too many pending DNS resolves, so a request in the queue was
* aborted.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119,
- /*
- * @brief Failed establishing a connection to the SOCKS proxy server for a target host.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Failed establishing a connection to the SOCKS proxy server for a target host.
*/
ARKWEB_ERR_SOCKS_CONNECTION_FAILED = -120,
- /*
- * @brief The SOCKS proxy server failed establishing connection to the target host
+ /**
+ * @error The SOCKS proxy server failed establishing connection to the target host
* because that host is unreachable.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121,
- /*
- * @brief The request to negotiate an alternate protocol failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The request to negotiate an alternate protocol failed.
*/
ARKWEB_ERR_ALPN_NEGOTIATION_FAILED = -122,
- /*
- * @brief The peer sent an SSL no_renegotiation alert message.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The peer sent an SSL no_renegotiation alert message.
*/
ARKWEB_ERR_SSL_NO_RENEGOTIATION = -123,
- /*
- * @brief Winsock sometimes reports more data written than passed. This is probably
+ /**
+ * @error Winsock sometimes reports more data written than passed. This is probably
* due to a broken LSP.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124,
- /*
- * @brief An SSL peer sent us a fatal decompression_failure alert. This typically
+ /**
+ * @error An SSL peer sent us a fatal decompression_failure alert. This typically
* occurs when a peer selects DEFLATE compression in the mistaken belief that
* it supports it.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125,
- /*
- * @brief An SSL peer sent us a fatal bad_record_mac alert. This has been observed
+ /**
+ * @error An SSL peer sent us a fatal bad_record_mac alert. This has been observed
* from servers with buggy DEFLATE support.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_BAD_RECORD_MAC_ALERT = -126,
- /*
- * @brief The proxy requested authentication (for tunnel establishment).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The proxy requested authentication (for tunnel establishment).
*/
ARKWEB_ERR_PROXY_AUTH_REQUESTED = -127,
- /*
- * @brief Could not create a connection to the proxy server. An error occurred
+ /**
+ * @error Could not create a connection to the proxy server. An error occurred
* either in resolving its name, or in connecting a socket to it.
* Note that this does NOT include failures during the actual "CONNECT" method
* of an HTTP proxy.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_PROXY_CONNECTION_FAILED = -130,
- /*
- * @brief A mandatory proxy configuration could not be used. Currently this means
+ /**
+ * @error A mandatory proxy configuration could not be used. Currently this means
* that a mandatory PAC script could not be fetched, parsed or executed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131,
- /*
- * @brief We've hit the max socket limit for the socket pool while preconnecting. We
+ /**
+ * @error We've hit the max socket limit for the socket pool while preconnecting. We
* don't bother trying to preconnect more sockets.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133,
- /*
- * @brief The permission to use the SSL client certificate's private key was denied.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The permission to use the SSL client certificate's private key was denied.
*/
ARKWEB_ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134,
- /*
- * @brief The SSL client certificate has no private key.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The SSL client certificate has no private key.
*/
ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135,
- /*
- * @brief The certificate presented by the HTTPS Proxy was invalid.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The certificate presented by the HTTPS Proxy was invalid.
*/
ARKWEB_ERR_PROXY_CERTIFICATE_INVALID = -136,
- /*
- * @brief An error occurred when trying to do a name resolution (DNS).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An error occurred when trying to do a name resolution (DNS).
*/
ARKWEB_ERR_NAME_RESOLUTION_FAILED = -137,
- /*
- * @brief Permission to access the network was denied. This is used to distinguish
+ /**
+ * @error Permission to access the network was denied. This is used to distinguish
* errors that were most likely caused by a firewall from other access denied
* errors. See also ERR_ACCESS_DENIED.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_NETWORK_ACCESS_DENIED = -138,
- /*
- * @brief The request throttler module cancelled this request to avoid DDOS.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The request throttler module cancelled this request to avoid DDOS.
*/
ARKWEB_ERR_TEMPORARILY_THROTTLED = -139,
- /*
- * @brief A request to create an SSL tunnel connection through the HTTPS proxy
+ /**
+ * @error A request to create an SSL tunnel connection through the HTTPS proxy
* received a 302 (temporary redirect, response. The response body might
* include a description of why the request failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140,
- /*
- * @brief We were unable to sign the CertificateVerify data of an SSL client auth
+ /**
+ * @error We were unable to sign the CertificateVerify data of an SSL client auth
* handshake with the client certificate's private key.
* Possible causes for this include the user implicitly or explicitly
* denying access to the private key, the private key may not be valid for
* signing, the key may be relying on a cached handle which is no longer
* valid, or the CSP won't allow arbitrary data to be signed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141,
- /*
- * @brief The message was too large for the transport. (for example a UDP message
+ /**
+ * @error The message was too large for the transport. (for example a UDP message
* which exceeds size threshold).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_MSG_TOO_BIG = -142,
- /*
- * @brief Websocket protocol error. Indicates that we are terminating the connection
+ /**
+ * @error Websocket protocol error. Indicates that we are terminating the connection
* due to a malformed frame or other protocol violation.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_WS_PROTOCOL_ERROR = -145,
- /*
- * @brief Returned when attempting to bind an address that is already in use.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Returned when attempting to bind an address that is already in use.
*/
ARKWEB_ERR_ADDRESS_IN_USE = -147,
- /*
- * @brief An operation failed because the SSL handshake has not completed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An operation failed because the SSL handshake has not completed.
*/
ARKWEB_ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148,
- /*
- * @brief SSL peer's public key is invalid.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error SSL peer's public key is invalid.
*/
ARKWEB_ERR_SSL_BAD_PEER_PUBLIC_KEY = -149,
- /*
- * @brief The certificate didn't match the built-in public key pins for the host name.
+ /**
+ * @error The certificate didn't match the built-in public key pins for the host name.
* The pins are set in net/http/transport_security_state.cc and require that
* one of a set of public keys exist on the path from the leaf to the root.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150,
- /*
- * @brief Server request for client certificate did not contain any types we support.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Server request for client certificate did not contain any types we support.
*/
ARKWEB_ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151,
- /*
- * @brief An SSL peer sent us a fatal decrypt_error alert. This typically occurs when
+ /**
+ * @error An SSL peer sent us a fatal decrypt_error alert. This typically occurs when
* a peer could not correctly verify a signature (in CertificateVerify or
* ServerKeyExchange, or validate a Finished message.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_DECRYPT_ERROR_ALERT = -153,
- /*
- * @brief There are too many pending WebSocketJob instances, so the new job was not
+ /**
+ * @error There are too many pending WebSocketJob instances, so the new job was not
* pushed to the queue.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154,
- /*
- * @brief The SSL server certificate changed in a renegotiation.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The SSL server certificate changed in a renegotiation.
*/
ARKWEB_ERR_SSL_SERVER_CERT_CHANGED = -156,
- /*
- * @brief The SSL server sent us a fatal unrecognized_name alert.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The SSL server sent us a fatal unrecognized_name alert.
*/
ARKWEB_ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159,
- /*
- * @brief Failed to set the socket's receive buffer size as requested.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Failed to set the socket's receive buffer size as requested.
*/
ARKWEB_ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160,
- /*
- * @brief Failed to set the socket's send buffer size as requested.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Failed to set the socket's send buffer size as requested.
*/
ARKWEB_ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161,
- /*
- * @brief Failed to set the socket's receive buffer size as requested, despite success
+ /**
+ * @error Failed to set the socket's receive buffer size as requested, despite success
* return code from setsockopt.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162,
- /*
- * @brief Failed to set the socket's send buffer size as requested, despite success
+ /**
+ * @error Failed to set the socket's send buffer size as requested, despite success
* return code from setsockopt.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163,
- /*
- * @brief Failed to import a client certificate from the platform store into the SSL
+ /**
+ * @error Failed to import a client certificate from the platform store into the SSL
* library.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164,
- /*
- * @brief Resolving a hostname to an IP address list included the IPv4 address
+ /**
+ * @error Resolving a hostname to an IP address list included the IPv4 address
* "127.0.53.53". This is a special IP address which ICANN has recommended to
* indicate there was a name collision, and alert admins to a potential
* problem.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_ICANN_NAME_COLLISION = -166,
- /*
- * @brief The SSL server presented a certificate which could not be decoded. This is
+ /**
+ * @error The SSL server presented a certificate which could not be decoded. This is
* not a certificate error code as no X509Certificate object is available. This
* error is fatal.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_SERVER_CERT_BAD_FORMAT = -167,
- /*
- * @brief Certificate Transparency: Received a signed tree head that failed to parse.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Certificate Transparency: Received a signed tree head that failed to parse.
*/
ARKWEB_ERR_CT_STH_PARSING_FAILED = -168,
- /*
- * @brief Certificate Transparency: Received a signed tree head whose JSON parsing was
+ /**
+ * @error Certificate Transparency: Received a signed tree head whose JSON parsing was
* OK but was missing some of the fields.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CT_STH_INCOMPLETE = -169,
- /*
- * @brief The attempt to reuse a connection to send proxy auth credentials failed
+ /**
+ * @error The attempt to reuse a connection to send proxy auth credentials failed
* before the AuthController was used to generate credentials. The caller should
* reuse the controller with a new connection. This error is only used
* internally by the network stack.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170,
- /*
- * @brief Certificate Transparency: Failed to parse the received consistency proof.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Certificate Transparency: Failed to parse the received consistency proof.
*/
ARKWEB_ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171,
- /*
- * @brief The SSL server required an unsupported cipher suite that has since been
+ /**
+ * @error The SSL server required an unsupported cipher suite that has since been
* removed. This error will temporarily be signaled on a fallback for one or two
* releases immediately following a cipher suite's removal, after which the
* fallback will be removed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_OBSOLETE_CIPHER = -172,
- /*
- * @brief When a WebSocket handshake is done successfully and the connection has been
+ /**
+ * @error When a WebSocket handshake is done successfully and the connection has been
* upgraded, the URLRequest is cancelled with this error code.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_WS_UPGRADE = -173,
- /*
- * @brief Socket ReadIfReady support is not implemented. This error should not be user
+ /**
+ * @error Socket ReadIfReady support is not implemented. This error should not be user
* visible, because the normal Read(, method is used as a fallback.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_READ_IF_READY_NOT_IMPLEMENTED = -174,
- /*
- * @brief No socket buffer space is available.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error No socket buffer space is available.
*/
ARKWEB_ERR_NO_BUFFER_SPACE = -176,
- /*
- * @brief There were no common signature algorithms between our client certificate
+ /**
+ * @error There were no common signature algorithms between our client certificate
* private key and the server's preferences.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177,
- /*
- * @brief TLS 1.3 early data was rejected by the server. This will be received before
+ /**
+ * @error TLS 1.3 early data was rejected by the server. This will be received before
* any data is returned from the socket. The request should be retried with
* early data disabled.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_EARLY_DATA_REJECTED = -178,
- /*
- * @brief TLS 1.3 early data was offered, but the server responded with TLS 1.2 or
+ /**
+ * @error TLS 1.3 early data was offered, but the server responded with TLS 1.2 or
* earlier. This is an internal error code to account for a
* backwards-compatibility issue with early data and TLS 1.2. It will be
* received before any data is returned from the socket. The request should be
* retried with early data disabled.
* See https://tools.ietf.org/html/rfc8446#appendix-D.3 for details.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_WRONG_VERSION_ON_EARLY_DATA = -179,
- /*
- * @brief TLS 1.3 was enabled, but a lower version was negotiated and the server
+ /**
+ * @error TLS 1.3 was enabled, but a lower version was negotiated and the server
* returned a value indicating it supported TLS 1.3. This is part of a security
* check in TLS 1.3, but it may also indicate the user is behind a buggy
* TLS-terminating proxy which implemented TLS 1.2 incorrectly. (See
* rhttps://crbug.com/boringssl/226.,
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_TLS13_DOWNGRADE_DETECTED = -180,
- /*
- * @brief The server's certificate has a keyUsage extension incompatible with the
+ /**
+ * @error The server's certificate has a keyUsage extension incompatible with the
* negotiated TLS key exchange method.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181,
- /*
- * @brief The ECHConfigList fetched over DNS cannot be parsed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The ECHConfigList fetched over DNS cannot be parsed.
*/
ARKWEB_ERR_INVALID_ECH_CONFIG_LIST = -182,
- /*
- * @brief ECH was enabled, but the server was unable to decrypt the encrypted
+ /**
+ * @error ECH was enabled, but the server was unable to decrypt the encrypted
* ClientHello.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_ECH_NOT_NEGOTIATED = -183,
- /*
- * @brief ECH was enabled, the server was unable to decrypt the encrypted ClientHello,
+ /**
+ * @error ECH was enabled, the server was unable to decrypt the encrypted ClientHello,
* and additionally did not present a certificate valid for the public name.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184,
- /*
- * @brief The server responded with a certificate whose common name did not match
+ /**
+ * @error The server responded with a certificate whose common name did not match
* the host name. This could mean:
* 1. An attacker has redirected our traffic to their server and is
* presenting a certificate for which they know the private key.
@@ -941,27 +632,21 @@ typedef enum ArkWeb_NetError {
* network's login page.
* 4. The OS has used a DNS search suffix and the server doesn't have
* a certificate for the abbreviated name in the address bar.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_COMMON_NAME_INVALID = -200,
- /*
- * @brief The server responded with a certificate that, by our clock, appears to
+ /**
+ * @error The server responded with a certificate that, by our clock, appears to
* either not yet be valid or to have expired. This could mean:
* 1. An attacker is presenting an old certificate for which they have
* managed to obtain the private key.
* 2. The server is misconfigured and is not presenting a valid cert.
* 3. Our clock is wrong.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_DATE_INVALID = -201,
- /*
- * @brief The server responded with a certificate that is signed by an authority
+ /**
+ * @error The server responded with a certificate that is signed by an authority
* we don't trust. The could mean:
* 1. An attacker has substituted the real certificate for a cert that
* contains their public key and is signed by their cousin.
@@ -969,1074 +654,696 @@ typedef enum ArkWeb_NetError {
* know about, but should trust.
* 3. The server is presenting a self-signed certificate, providing no
* defense against active attackers (but foiling passive attackers).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_AUTHORITY_INVALID = -202,
- /*
- * @brief The server responded with a certificate that contains errors.
+ /**
+ * @error The server responded with a certificate that contains errors.
* This error is not recoverable.
* MSDN describes this error as follows:
* "The SSL certificate contains errors."
* NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency,
* use that code instead of this one from now on.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_CONTAINS_ERRORS = -203,
- /*
- * @brief The certificate has no mechanism for determining if it is revoked. In
+ /**
+ * @error The certificate has no mechanism for determining if it is revoked. In
* effect, this certificate cannot be revoked.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_NO_REVOCATION_MECHANISM = -204,
- /*
- * @brief Revocation information for the security certificate for this site is not
+ /**
+ * @error Revocation information for the security certificate for this site is not
* available. This could mean:
* 1. An attacker has compromised the private key in the certificate and is
* blocking our attempt to find out that the cert was revoked.
* 2. The certificate is unrevoked, but the revocation server is busy or
* unavailable.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
- /*
- * @brief The server responded with a certificate has been revoked.
+ /**
+ * @error The server responded with a certificate has been revoked.
* We have the capability to ignore this error, but it is probably not the
* thing to do.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_REVOKED = -206,
- /*
- * @brief The server responded with a certificate that is invalid.
+ /**
+ * @error The server responded with a certificate that is invalid.
* This error is not recoverable.
* MSDN describes this error as follows:
* "The SSL certificate is invalid."
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_INVALID = -207,
- /*
- * @brief The server responded with a certificate that is signed using a weak
+ /**
+ * @error The server responded with a certificate that is signed using a weak
* signature algorithm.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208,
- /*
- * @brief The host name specified in the certificate is not unique.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The host name specified in the certificate is not unique.
*/
ARKWEB_ERR_CERT_NON_UNIQUE_NAME = -210,
- /*
- * @brief The server responded with a certificate that contains a weak key (e.g.
+ /**
+ * @error The server responded with a certificate that contains a weak key (e.g.
* a too-small RSA key).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_WEAK_KEY = -211,
- /*
- * @brief The certificate claimed DNS names that are in violation of name constraints.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The certificate claimed DNS names that are in violation of name constraints.
*/
ARKWEB_ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212,
- /*
- * @brief The certificate's validity period is too long.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The certificate's validity period is too long.
*/
ARKWEB_ERR_CERT_VALIDITY_TOO_LONG = -213,
- /*
- * @brief Certificate Transparency was required for this connection, but the server
+ /**
+ * @error Certificate Transparency was required for this connection, but the server
* did not provide CT information that complied with the policy.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214,
- /*
- * @brief The certificate chained to a legacy Symantec root that is no longer trusted.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The certificate chained to a legacy Symantec root that is no longer trusted.
*/
ARKWEB_ERR_CERT_SYMANTEC_LEGACY = -215,
- /*
- * @brief The certificate is known to be used for interception by an entity other
+ /**
+ * @error The certificate is known to be used for interception by an entity other
* the device owner.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217,
- /*
- * @brief The connection uses an obsolete version of SSL/TLS or cipher.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The connection uses an obsolete version of SSL/TLS or cipher.
*/
ARKWEB_ERR_SSL_OBSOLETE_VERSION_OR_CIPHER = -218,
- /*
- * @brief The value immediately past the last certificate error code.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The value immediately past the last certificate error code.
*/
ARKWEB_ERR_CERT_END = -219,
- /*
- * @brief The URL is invalid.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The URL is invalid.
*/
ARKWEB_ERR_INVALID_URL = -300,
- /*
- * @brief The scheme of the URL is disallowed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The scheme of the URL is disallowed.
*/
ARKWEB_ERR_DISALLOWED_URL_SCHEME = -301,
- /*
- * @brief The scheme of the URL is unknown.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The scheme of the URL is unknown.
*/
ARKWEB_ERR_UNKNOWN_URL_SCHEME = -302,
- /*
- * @brief Attempting to load an URL resulted in a redirect to an invalid URL.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Attempting to load an URL resulted in a redirect to an invalid URL.
*/
ARKWEB_ERR_INVALID_REDIRECT = -303,
- /*
- * @brief Attempting to load an URL resulted in too many redirects.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Attempting to load an URL resulted in too many redirects.
*/
ARKWEB_ERR_TOO_MANY_REDIRECTS = -310,
- /*
- * @brief Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect
+ /**
+ * @error Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect
* to file:// is considered unsafe).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_UNSAFE_REDIRECT = -311,
- /*
- * @brief Attempting to load an URL with an unsafe port number.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Attempting to load an URL with an unsafe port number.
*/
ARKWEB_ERR_UNSAFE_PORT = -312,
- /*
- * @brief The server's response was invalid.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The server's response was invalid.
*/
ARKWEB_ERR_INVALID_RESPONSE = -320,
- /*
- * @brief Error in chunked transfer encoding.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Error in chunked transfer encoding.
*/
ARKWEB_ERR_INVALID_CHUNKED_ENCODING = -321,
- /*
- * @brief The server did not support the request method.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The server did not support the request method.
*/
ARKWEB_ERR_METHOD_UNSUPPORTED = -322,
- /*
- * @brief The response was 407 (Proxy Authentication Required,, yet we did not send
+ /**
+ * @error The response was 407 (Proxy Authentication Required,, yet we did not send
* the request to a proxy.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_UNEXPECTED_PROXY_AUTH = -323,
- /*
- * @brief The server closed the connection without sending any data.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The server closed the connection without sending any data.
*/
ARKWEB_ERR_EMPTY_RESPONSE = -324,
- /*
- * @brief The headers section of the response is too large.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The headers section of the response is too large.
*/
ARKWEB_ERR_RESPONSE_HEADERS_TOO_BIG = -325,
- /*
- * @brief The evaluation of the PAC script failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The evaluation of the PAC script failed.
*/
ARKWEB_ERR_PAC_SCRIPT_FAILED = -327,
- /*
- * @brief The response was 416 (Requested range not satisfiable, and the server cannot
+ /**
+ * @error The response was 416 (Requested range not satisfiable, and the server cannot
* satisfy the range requested.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328,
- /*
- * @brief The identity used for authentication is invalid.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The identity used for authentication is invalid.
*/
ARKWEB_ERR_MALFORMED_IDENTITY = -329,
- /*
- * @brief Content decoding of the response body failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Content decoding of the response body failed.
*/
ARKWEB_ERR_CONTENT_DECODING_FAILED = -330,
- /*
- * @brief An operation could not be completed because all network IO
+ /**
+ * @error An operation could not be completed because all network IO
* is suspended.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_NETWORK_IO_SUSPENDED = -331,
- /*
- * @brief FLIP data received without receiving a SYN_REPLY on the stream.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error FLIP data received without receiving a SYN_REPLY on the stream.
*/
ARKWEB_ERR_SYN_REPLY_NOT_RECEIVED = -332,
- /*
- * @brief Converting the response to target encoding failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Converting the response to target encoding failed.
*/
ARKWEB_ERR_ENCODING_CONVERSION_FAILED = -333,
- /*
- * @brief The server sent an FTP directory listing in a format we do not understand.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The server sent an FTP directory listing in a format we do not understand.
*/
ARKWEB_ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334,
- /*
- * @brief There are no supported proxies in the provided list.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error There are no supported proxies in the provided list.
*/
ARKWEB_ERR_NO_SUPPORTED_PROXIES = -336,
- /*
- * @brief There is an HTTP/2 protocol error.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error There is an HTTP/2 protocol error.
*/
ARKWEB_ERR_HTTP2_PROTOCOL_ERROR = -337,
- /*
- * @brief Credentials could not be established during HTTP Authentication.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Credentials could not be established during HTTP Authentication.
*/
ARKWEB_ERR_INVALID_AUTH_CREDENTIALS = -338,
- /*
- * @brief An HTTP Authentication scheme was tried which is not supported on this
+ /**
+ * @error An HTTP Authentication scheme was tried which is not supported on this
* machine.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_UNSUPPORTED_AUTH_SCHEME = -339,
- /*
- * @brief Detecting the encoding of the response failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Detecting the encoding of the response failed.
*/
ARKWEB_ERR_ENCODING_DETECTION_FAILED = -340,
- /*
- * @brief (GSSAPI, No Kerberos credentials were available during HTTP Authentication.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error (GSSAPI, No Kerberos credentials were available during HTTP Authentication.
*/
ARKWEB_ERR_MISSING_AUTH_CREDENTIALS = -341,
- /*
- * @brief An unexpected, but documented, SSPI or GSSAPI status code was returned.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An unexpected, but documented, SSPI or GSSAPI status code was returned.
*/
ARKWEB_ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342,
- /*
- * @brief The environment was not set up correctly for authentication (for
+ /**
+ * @error The environment was not set up correctly for authentication (for
* example, no KDC could be found or the principal is unknown.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343,
- /*
- * @brief An undocumented SSPI or GSSAPI status code was returned.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An undocumented SSPI or GSSAPI status code was returned.
*/
ARKWEB_ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344,
- /*
- * @brief The HTTP response was too big to drain.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The HTTP response was too big to drain.
*/
ARKWEB_ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345,
- /*
- * @brief The HTTP response contained multiple distinct Content-Length headers.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The HTTP response contained multiple distinct Content-Length headers.
*/
ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346,
- /*
- * @brief HTTP/2 headers have been received, but not all of them - status or version
+ /**
+ * @error HTTP/2 headers have been received, but not all of them - status or version
* headers are missing, so we're expecting additional frames to complete them.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_INCOMPLETE_HTTP2_HEADERS = -347,
- /*
- * @brief No PAC URL configuration could be retrieved from DHCP. This can indicate
+ /**
+ * @error No PAC URL configuration could be retrieved from DHCP. This can indicate
* either a failure to retrieve the DHCP configuration, or that there was no
* PAC URL configured in DHCP.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_PAC_NOT_IN_DHCP = -348,
- /*
- * @brief The HTTP response contained multiple Content-Disposition headers.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The HTTP response contained multiple Content-Disposition headers.
*/
ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349,
- /*
- * @brief The HTTP response contained multiple Location headers.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The HTTP response contained multiple Location headers.
*/
ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350,
- /*
- * @brief HTTP/2 server refused the request without processing, and sent either a
+ /**
+ * @error HTTP/2 server refused the request without processing, and sent either a
* GOAWAY frame with error code NO_ERROR and Last-Stream-ID lower than the
* stream id corresponding to the request indicating that this request has not
* been processed yet, or a RST_STREAM frame with error code REFUSED_STREAM.
* Client MAY retry (on a different connection). See RFC7540 Section 8.1.4.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_HTTP2_SERVER_REFUSED_STREAM = -351,
- /*
- * @brief HTTP/2 server didn't respond to the PING message.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error HTTP/2 server didn't respond to the PING message.
*/
ARKWEB_ERR_HTTP2_PING_FAILED = -352,
- /*
- * @brief The HTTP response body transferred fewer bytes than were advertised by the
+ /**
+ * @error The HTTP response body transferred fewer bytes than were advertised by the
* Content-Length header when the connection is closed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CONTENT_LENGTH_MISMATCH = -354,
- /*
- * @brief The HTTP response body is transferred with Chunked-Encoding, but the
+ /**
+ * @error The HTTP response body is transferred with Chunked-Encoding, but the
* terminating zero-length chunk was never sent when the connection is closed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_INCOMPLETE_CHUNKED_ENCODING = -355,
- /*
- * @brief There is a QUIC protocol error.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error There is a QUIC protocol error.
*/
ARKWEB_ERR_QUIC_PROTOCOL_ERROR = -356,
- /*
- * @brief The HTTP headers were truncated by an EOF.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The HTTP headers were truncated by an EOF.
*/
ARKWEB_ERR_RESPONSE_HEADERS_TRUNCATED = -357,
- /*
- * @brief The QUIC crypto handshake failed. This means that the server was unable
+ /**
+ * @error The QUIC crypto handshake failed. This means that the server was unable
* to read any requests sent, so they may be resent.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_QUIC_HANDSHAKE_FAILED = -358,
- /*
- * @brief Transport security is inadequate for the HTTP/2 version.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Transport security is inadequate for the HTTP/2 version.
*/
ARKWEB_ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360,
- /*
- * @brief The peer violated HTTP/2 flow control.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The peer violated HTTP/2 flow control.
*/
ARKWEB_ERR_HTTP2_FLOW_CONTROL_ERROR = -361,
- /*
- * @brief The peer sent an improperly sized HTTP/2 frame.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The peer sent an improperly sized HTTP/2 frame.
*/
ARKWEB_ERR_HTTP2_FRAME_SIZE_ERROR = -362,
- /*
- * @brief Decoding or encoding of compressed HTTP/2 headers failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Decoding or encoding of compressed HTTP/2 headers failed.
*/
ARKWEB_ERR_HTTP2_COMPRESSION_ERROR = -363,
- /*
- * @brief Proxy Auth Requested without a valid Client Socket Handle.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Proxy Auth Requested without a valid Client Socket Handle.
*/
ARKWEB_ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364,
- /*
- * @brief HTTP_1_1_REQUIRED error code received on HTTP/2 session.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error HTTP_1_1_REQUIRED error code received on HTTP/2 session.
*/
ARKWEB_ERR_HTTP_1_1_REQUIRED = -365,
- /*
- * @brief HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy.
*/
ARKWEB_ERR_PROXY_HTTP_1_1_REQUIRED = -366,
- /*
- * @brief The PAC script terminated fatally and must be reloaded.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The PAC script terminated fatally and must be reloaded.
*/
ARKWEB_ERR_PAC_SCRIPT_TERMINATED = -367,
- /*
- * @brief The server was expected to return an HTTP/1.x response, but did not. Rather
+ /**
+ * @error The server was expected to return an HTTP/1.x response, but did not. Rather
* than treat it as HTTP/0.9, this error is returned.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_INVALID_HTTP_RESPONSE = -370,
- /*
- * @brief Initializing content decoding failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Initializing content decoding failed.
*/
ARKWEB_ERR_CONTENT_DECODING_INIT_FAILED = -371,
- /*
- * @brief Received HTTP/2 RST_STREAM frame with NO_ERROR error code. This error should
+ /**
+ * @error Received HTTP/2 RST_STREAM frame with NO_ERROR error code. This error should
* be handled internally by HTTP/2 code, and should not make it above the
* SpdyStream layer.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372,
- /*
- * @brief The pushed stream claimed by the request is no longer available.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The pushed stream claimed by the request is no longer available.
*/
ARKWEB_ERR_HTTP2_PUSHED_STREAM_NOT_AVAILABLE = -373,
- /*
- * @brief A pushed stream was claimed and later reset by the server. When this happens,
+ /**
+ * @error A pushed stream was claimed and later reset by the server. When this happens,
* the request should be retried.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER = -374,
- /*
- * @brief An HTTP transaction was retried too many times due for authentication or
+ /**
+ * @error An HTTP transaction was retried too many times due for authentication or
* invalid certificates.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_TOO_MANY_RETRIES = -375,
- /*
- * @brief Received an HTTP/2 frame on a closed stream.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Received an HTTP/2 frame on a closed stream.
*/
ARKWEB_ERR_HTTP2_STREAM_CLOSED = -376,
- /*
- * @brief Client is refusing an HTTP/2 stream.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Client is refusing an HTTP/2 stream.
*/
ARKWEB_ERR_HTTP2_CLIENT_REFUSED_STREAM = -377,
- /*
- * @brief A pushed HTTP/2 stream was claimed by a request based on matching URL and
+ /**
+ * @error A pushed HTTP/2 stream was claimed by a request based on matching URL and
* request headers, but the pushed response headers do not match the request.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH = -378,
- /*
- * @brief The server returned a non-2xx HTTP response code.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The server returned a non-2xx HTTP response code.
*/
ARKWEB_ERR_HTTP_RESPONSE_CODE_FAILURE = -379,
- /*
- * @brief The certificate presented on a QUIC connection does not chain to a known root
+ /**
+ * @error The certificate presented on a QUIC connection does not chain to a known root
* and the origin connected to is not on a list of domains where unknown roots
* are allowed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_QUIC_UNKNOWN_CERT_ROOT = -380,
- /*
- * @brief A GOAWAY frame has been received indicating that the request has not been
+ /**
+ * @error A GOAWAY frame has been received indicating that the request has not been
* processed and is therefore safe to retry on a different connection.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381,
- /*
- * @brief The ACCEPT_CH restart has been triggered too many times.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The ACCEPT_CH restart has been triggered too many times.
*/
ARKWEB_ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382,
- /*
- * @brief The IP address space of the remote endpoint differed from the previous
+ /**
+ * @error The IP address space of the remote endpoint differed from the previous
* observed value during the same request. Any cache entry for the affected
* request should be invalidated.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383,
- /*
- * @brief The IP address space of the cached remote endpoint is blocked by local
+ /**
+ * @error The IP address space of the cached remote endpoint is blocked by local
* network access check.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_LOCAL_NETWORK_ACCESS_POLICY = -384,
- /*
- * @brief The cache does not have the requested entry.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The cache does not have the requested entry.
*/
ARKWEB_ERR_CACHE_MISS = -400,
- /*
- * @brief Unable to read from the disk cache.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Unable to read from the disk cache.
*/
ARKWEB_ERR_CACHE_READ_FAILURE = -401,
- /*
- * @brief Unable to write to the disk cache.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Unable to write to the disk cache.
*/
ARKWEB_ERR_CACHE_WRITE_FAILURE = -402,
- /*
- * @brief The operation is not supported for this entry.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The operation is not supported for this entry.
*/
ARKWEB_ERR_CACHE_OPERATION_UNSUPPORTED = -403,
- /*
- * @brief The disk cache is unable to open this entry.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The disk cache is unable to open this entry.
*/
ARKWEB_ERR_CACHE_OPEN_FAILURE = -404,
- /*
- * @brief The disk cache is unable to create this entry.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The disk cache is unable to create this entry.
*/
ARKWEB_ERR_CACHE_CREATE_FAILURE = -405,
- /*
- * @brief Multiple transactions are racing to create disk cache entries.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Multiple transactions are racing to create disk cache entries.
*/
ARKWEB_ERR_CACHE_RACE = -406,
- /*
- * @brief The cache was unable to read a checksum record on an entry.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The cache was unable to read a checksum record on an entry.
*/
ARKWEB_ERR_CACHE_CHECKSUM_READ_FAILURE = -407,
- /*
- * @brief The cache found an entry with an invalid checksum.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The cache found an entry with an invalid checksum.
*/
ARKWEB_ERR_CACHE_CHECKSUM_MISMATCH = -408,
- /*
- * @brief Internal error code for the HTTP cache.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Internal error code for the HTTP cache.
*/
ARKWEB_ERR_CACHE_LOCK_TIMEOUT = -409,
- /*
- * @brief Received a challenge after the transaction has read some data, and the
+ /**
+ * @error Received a challenge after the transaction has read some data, and the
* credentials aren't available.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410,
- /*
- * @brief Internal not-quite error code for the HTTP cache.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Internal not-quite error code for the HTTP cache.
*/
ARKWEB_ERR_CACHE_ENTRY_NOT_SUITABLE = -411,
- /*
- * @brief The disk cache is unable to doom this entry.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The disk cache is unable to doom this entry.
*/
ARKWEB_ERR_CACHE_DOOM_FAILURE = -412,
- /*
- * @brief The disk cache is unable to open or create this entry.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The disk cache is unable to open or create this entry.
*/
ARKWEB_ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413,
- /*
- * @brief The server's response was insecure (e.g. there was a cert error).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The server's response was insecure (e.g. there was a cert error).
*/
ARKWEB_ERR_INSECURE_RESPONSE = -501,
- /*
- * @brief An attempt to import a client certificate failed, as the user's key
+ /**
+ * @error An attempt to import a client certificate failed, as the user's key
* database lacked a corresponding private key.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_NO_PRIVATE_KEY_FOR_CERT = -502,
- /*
- * @brief An error adding a certificate to the OS certificate database.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An error adding a certificate to the OS certificate database.
*/
ARKWEB_ERR_ADD_USER_CERT_FAILED = -503,
- /*
- * @brief An error occurred while handling a signed exchange.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An error occurred while handling a signed exchange.
*/
ARKWEB_ERR_INVALID_SIGNED_EXCHANGE = -504,
- /*
- * @brief An error occurred while handling a Web Bundle source.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error An error occurred while handling a Web Bundle source.
*/
ARKWEB_ERR_INVALID_WEB_BUNDLE = -505,
- /*
- * @brief A Trust Tokens protocol operation-executing request failed for one of a
+ /**
+ * @error A Trust Tokens protocol operation-executing request failed for one of a
* number of reasons (precondition failure, internal error, bad response).
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_TRUST_TOKEN_OPERATION_FAILED = -506,
- /*
- * @brief When handling a Trust Tokens protocol operation-executing request, the system
+ /**
+ * @error When handling a Trust Tokens protocol operation-executing request, the system
* was able to execute the request's Trust Tokens operation without sending the
* request to its destination.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507,
- /*
- * @brief A generic error for failed FTP control connection command.
+ /**
+ * @error A generic error for failed FTP control connection command.
* If possible, please use or add a more specific error code.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_FTP_FAILED = -601,
- /*
- * @brief The server cannot fulfill the request at this point. This is a temporary error.
+ /**
+ * @error The server cannot fulfill the request at this point. This is a temporary error.
* FTP response code 421.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_FTP_SERVICE_UNAVAILABLE = -602,
- /*
- * @brief The server has aborted the transfer.
+ /**
+ * @error The server has aborted the transfer.
* FTP response code 426.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_FTP_TRANSFER_ABORTED = -603,
- /*
- * @brief The file is busy, or some other temporary error condition on opening the file.
+ /**
+ * @error The file is busy, or some other temporary error condition on opening the file.
* FTP response code 450.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_FTP_FILE_BUSY = -604,
- /*
- * @brief Server rejected our command because of syntax errors.
+ /**
+ * @error Server rejected our command because of syntax errors.
* FTP response codes 500, 501.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_FTP_SYNTAX_ERROR = -605,
- /*
- * @brief Server does not support the command we issued.
+ /**
+ * @error Server does not support the command we issued.
* FTP response codes 502, 504.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_FTP_COMMAND_UNSUPPORTED = -606,
- /*
- * @brief Server rejected our command because we didn't issue the commands in right order.
+ /**
+ * @error Server rejected our command because we didn't issue the commands in right order.
* FTP response code 503.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_FTP_BAD_COMMAND_SEQUENCE = -607,
- /*
- * @brief PKCS #12 import failed due to incorrect password.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error PKCS #12 import failed due to incorrect password.
*/
ARKWEB_ERR_PKCS12_IMPORT_BAD_PASSWORD = -701,
- /*
- * @brief PKCS #12 import failed due to other error.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error PKCS #12 import failed due to other error.
*/
ARKWEB_ERR_PKCS12_IMPORT_FAILED = -702,
- /*
- * @brief CA import failed - not a CA cert.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error CA import failed - not a CA cert.
*/
ARKWEB_ERR_IMPORT_CA_CERT_NOT_CA = -703,
- /*
- * @brief Import failed - certificate already exists in database.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Import failed - certificate already exists in database.
*/
ARKWEB_ERR_IMPORT_CERT_ALREADY_EXISTS = -704,
- /*
- * @brief CA import failed due to some other error.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error CA import failed due to some other error.
*/
ARKWEB_ERR_IMPORT_CA_CERT_FAILED = -705,
- /*
- * @brief Server certificate import failed due to some internal error.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Server certificate import failed due to some internal error.
*/
ARKWEB_ERR_IMPORT_SERVER_CERT_FAILED = -706,
- /*
- * @brief PKCS #12 import failed due to invalid MAC.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error PKCS #12 import failed due to invalid MAC.
*/
ARKWEB_ERR_PKCS12_IMPORT_INVALID_MAC = -707,
- /*
- * @brief PKCS #12 import failed due to invalid/corrupt file.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error PKCS #12 import failed due to invalid/corrupt file.
*/
ARKWEB_ERR_PKCS12_IMPORT_INVALID_FILE = -708,
- /*
- * @brief PKCS #12 import failed due to unsupported features.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error PKCS #12 import failed due to unsupported features.
*/
ARKWEB_ERR_PKCS12_IMPORT_UNSUPPORTED = -709,
- /*
- * @brief Key generation failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Key generation failed.
*/
ARKWEB_ERR_KEY_GENERATION_FAILED = -710,
- /*
- * @brief Failure to export private key.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Failure to export private key.
*/
ARKWEB_ERR_PRIVATE_KEY_EXPORT_FAILED = -712,
- /*
- * @brief Self-signed certificate generation failed.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Self-signed certificate generation failed.
*/
ARKWEB_ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713,
- /*
- * @brief The certificate database changed in some way.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The certificate database changed in some way.
*/
ARKWEB_ERR_CERT_DATABASE_CHANGED = -714,
- /*
- * @brief The certificate verifier configuration changed in some way.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error The certificate verifier configuration changed in some way.
*/
ARKWEB_ERR_CERT_VERIFIER_CHANGED = -716,
- /*
- * @brief DNS resolver received a malformed response.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error DNS resolver received a malformed response.
*/
ARKWEB_ERR_DNS_MALFORMED_RESPONSE = -800,
- /*
- * @brief DNS server requires TCP.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error DNS server requires TCP.
*/
ARKWEB_ERR_DNS_SERVER_REQUIRES_TCP = -801,
- /*
- * @brief DNS server failed. This error is returned for all of the following
+ /**
+ * @error DNS server failed. This error is returned for all of the following
* error conditions:
* 1 - Format error - The name server was unable to interpret the query.
* 2 - Server failure - The name server was unable to process this query
@@ -2045,77 +1352,50 @@ typedef enum ArkWeb_NetError {
* kind of query.
* 5 - Refused - The name server refuses to perform the specified
* operation for policy reasons.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_DNS_SERVER_FAILED = -802,
- /*
- * @brief DNS transaction timed out.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error DNS transaction timed out.
*/
ARKWEB_ERR_DNS_TIMED_OUT = -803,
- /*
- * @brief The entry was not found in cache or other local sources, for lookups where
+ /**
+ * @error The entry was not found in cache or other local sources, for lookups where
* only local sources were queried.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_DNS_CACHE_MISS = -804,
- /*
- * @brief Suffix search list rules prevent resolution of the given host name.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Suffix search list rules prevent resolution of the given host name.
*/
ARKWEB_ERR_DNS_SEARCH_EMPTY = -805,
- /*
- * @brief Failed to sort addresses according to RFC3484.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Failed to sort addresses according to RFC3484.
*/
ARKWEB_ERR_DNS_SORT_ERROR = -806,
- /*
- * @brief Failed to resolve the hostname of a DNS-over-HTTPS server.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error Failed to resolve the hostname of a DNS-over-HTTPS server.
*/
ARKWEB_ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808,
- /*
- * @brief DNS identified the request as disallowed for insecure connection (http/ws).
+ /**
+ * @error DNS identified the request as disallowed for insecure connection (http/ws).
* Error should be handled as if an HTTP redirect was received to redirect to
* https or wss.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_DNS_NAME_HTTPS_ONLY = -809,
- /*
- * @brief All DNS requests associated with this job have been cancelled.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /**
+ * @error All DNS requests associated with this job have been cancelled.
*/
ARKWEB_ERR_DNS_REQUEST_CANCELED = -810,
- /*
- * @brief The hostname resolution of HTTPS record was expected to be resolved with
+ /**
+ * @error The hostname resolution of HTTPS record was expected to be resolved with
* alpn values of supported protocols, but did not.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
*/
ARKWEB_ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811,
} ArkWeb_NetError;
diff --git a/web/webview/interfaces/native/arkweb_scheme_handler.h b/web/webview/interfaces/native/arkweb_scheme_handler.h
index 9de9b94b4fb12ef9511732e4a4e6e9c7e0021009..7750265cff729ec6a998ed34759de7baf604e158 100644
--- a/web/webview/interfaces/native/arkweb_scheme_handler.h
+++ b/web/webview/interfaces/native/arkweb_scheme_handler.h
@@ -40,7 +40,7 @@
extern "C" {
#endif
-/*
+/**
* @brief Configuration information for custom schemes.
*
* @syscap SystemCapability.Web.Webview.Core
@@ -49,95 +49,133 @@ extern "C" {
typedef enum ArkWeb_CustomSchemeOption {
OH_ARKWEB_SCHEME_OPTION_NONE = 0,
- /*
- * @brief If ARKWEB_SCHEME_OPTION_STANDARD is set the scheme will be handled as a standard scheme. The standard
- * schemes needs to comply with the URL normalization and parsing rules defined in Section 3.1 of RFC 1738,
- * which can be found in the http://www.ietf.org/rfc/rfc1738.txt.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /** If ARKWEB_SCHEME_OPTION_STANDARD is set, the scheme will be handled as a standard scheme. The standard
+ * schemes need to comply with the URL normalization and parsing rules defined in Section 3.1 of RFC 1738,
+ * which can be found in the http://www.ietf.org/rfc/rfc1738.txt.
*/
ARKWEB_SCHEME_OPTION_STANDARD = 1 << 0,
- /*
- * @brief If ARKWEB_SCHEME_OPTION_LOCAL is set, the same security rules as those applied to the "file" URL will be
- * used to handle the scheme.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /** If ARKWEB_SCHEME_OPTION_LOCAL is set, the same security rules as those applied to the "file" URL will be
+ * used to handle the scheme.
*/
ARKWEB_SCHEME_OPTION_LOCAL = 1 << 1,
- /*
- * @brief If ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED is set, then the scheme can only be displayed from other content
- * hosted using the same scheme.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /** If ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED is set, then the scheme can only be displayed from other content
+ * hosted using the same scheme.
*/
ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2,
- /*
- * @brief If ARKWEB_SCHEME_OPTION_SECURE is set, the same security rules as those applied to the "https" URL will be
- * used to handle the scheme.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /** If ARKWEB_SCHEME_OPTION_SECURE is set, the same security rules as those applied to the "https" URL will be
+ * used to handle the scheme.
*/
ARKWEB_SCHEME_OPTION_SECURE = 1 << 3,
- /*
- * @brief If ARKWEB_SCHEME_OPTION_CORS_ENABLED is set, then the scheme can be sent CORS requests. In most case this
- * value should be set when ARKWEB_SCHEME_OPTION_STANDARD is set.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /** If ARKWEB_SCHEME_OPTION_CORS_ENABLED is set, then the scheme can be sent CORS requests. In most cases this
+ * value should be set when ARKWEB_SCHEME_OPTION_STANDARD is set.
*/
ARKWEB_SCHEME_OPTION_CORS_ENABLED = 1 << 4,
- /*
- * @brief If ARKWEB_SCHEME_OPTION_CSP_BYPASSING is set, then this scheme can bypass Content Security Policy (CSP)
- * checks. In most cases, this value should not be set when ARKWEB_SCHEME_OPTION_STANDARD is set.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
+ /** If ARKWEB_SCHEME_OPTION_CSP_BYPASSING is set, then this scheme can bypass Content Security Policy (CSP)
+ * checks. In most cases, this value should not be set when ARKWEB_SCHEME_OPTION_STANDARD is set.
*/
ARKWEB_SCHEME_OPTION_CSP_BYPASSING = 1 << 5,
- /*
- * @brief If ARKWEB_SCHEME_OPTION_FETCH_ENABLED is set, then this scheme can perform FETCH API requests.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
- */
+ /** If ARKWEB_SCHEME_OPTION_FETCH_ENABLED is set, then this scheme can perform FETCH API requests. */
ARKWEB_SCHEME_OPTION_FETCH_ENABLED = 1 << 6,
- /*
- * @brief If ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED is set, then the js of this scheme can generate code cache.
- *
- * @syscap SystemCapability.Web.Webview.Core
- * @since 12
- */
+ /** If ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED is set, then the js of this scheme can generate code cache. */
ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED = 1 << 7,
} ArkWeb_CustomSchemeOption;
-/*
- * @brief This class is used to intercept requests for a specified scheme.
+/**
+ * @brief Resource type for a request.
+ *
+ * These constants match their equivalents in Chromium's ResourceType and should not be renumbered.\n
+ *
+ * @syscap SystemCapability.Web.Webview.Core
+ * @since 12
+ */
+typedef enum ArkWeb_ResourceType {
+ /** Top level page. */
+ MAIN_FRAME = 0,
+
+ /** Frame or Iframe. */
+ SUB_FRAME = 1,
+
+ /** CSS stylesheet. */
+ STYLE_SHEET = 2,
+
+ /** External script. */
+ SCRIPT = 3,
+
+ /** Image(jpg/gif/png/etc). */
+ IMAGE = 4,
+
+ /** Font. */
+ FONT_RESOURCE = 5,
+
+ /** Some other subresource. This is the default type if the actual type is unknown. */
+ SUB_RESOURCE = 6,
+
+ /** Object (or embed) tag for a plugin, or a resource that a plugin requested. */
+ OBJECT = 7,
+
+ /** Media resource. */
+ MEDIA = 8,
+
+ /** Main resource of a dedicated worker. */
+ WORKER = 9,
+
+ /** Main resource of a shared worker. */
+ SHARED_WORKER = 10,
+
+ /** Explicitly requested prefetch. */
+ PREFETCH = 11,
+
+ /** Favicon. */
+ FAVICON = 12,
+
+ /** XMLHttpRequest. */
+ XHR = 13,
+
+ /** Ping request for /sendBeacon. */
+ PING = 14,
+
+ /** The main resource of a service worker. */
+ SERVICE_WORKER = 15,
+
+ /** Report of Content Security Policy violations. */
+ CSP_REPORT = 16,
+
+ /** Resource that a plugin requested. */
+ PLUGIN_RESOURCE = 17,
+
+ /** A main-frame service worker navigation preload request. */
+ NAVIGATION_PRELOAD_MAIN_FRAME = 19,
+
+ /** A sub-frame service worker navigation preload request. */
+ NAVIGATION_PRELOAD_SUB_FRAME = 20,
+} ArkWeb_ResourceType;
+
+/**
+ * @brief This class is used to intercept requests for a specified scheme.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
typedef struct ArkWeb_SchemeHandler_ ArkWeb_SchemeHandler;
-/*
- * @brief Used to intercept url requests. Response headers and body can be sent through ArkWeb_ResourceHandler.
+/**
+ * @brief Used to intercept url requests.
+ *
+ * Response headers and body can be sent through ArkWeb_ResourceHandler.\n
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
typedef struct ArkWeb_ResourceHandler_ ArkWeb_ResourceHandler;
-/*
+/**
* @brief The response of the intercepted request.
*
* @syscap SystemCapability.Web.Webview.Core
@@ -145,16 +183,17 @@ typedef struct ArkWeb_ResourceHandler_ ArkWeb_ResourceHandler;
*/
typedef struct ArkWeb_Response_ ArkWeb_Response;
-/*
- * @brief The info of the request. You can obtain the requested URL, method, post data, and other information through
- * OH_ArkWeb_ResourceRequest.
+/**
+ * @brief The info of the request.
+ *
+ * You can obtain the requested URL, method, post data, and other information through OH_ArkWeb_ResourceRequest.\n
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
typedef struct ArkWeb_ResourceRequest_ ArkWeb_ResourceRequest;
-/*
+/**
* @brief The request headers of the request.
*
* @syscap SystemCapability.Web.Webview.Core
@@ -162,8 +201,10 @@ typedef struct ArkWeb_ResourceRequest_ ArkWeb_ResourceRequest;
*/
typedef struct ArkWeb_RequestHeaderList_ ArkWeb_RequestHeaderList;
-/*
- * @brief The http body of the request. Use OH_ArkWebHttpBodyStream_* interface to read the body.
+/**
+ * @brief The http body of the request.
+ *
+ * Use OH_ArkWebHttpBodyStream_* interface to read the body.\n
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -171,9 +212,11 @@ typedef struct ArkWeb_RequestHeaderList_ ArkWeb_RequestHeaderList;
typedef struct ArkWeb_HttpBodyStream_ ArkWeb_HttpBodyStream;
-/*
- * @brief Callback for handling the request. This will called on the IO thread. should not use resourceHandler in the
- * function.
+/**
+ * @brief Callback for handling the request.
+ *
+ * This will be called on the IO thread.\n
+ *
* @param schemeHandler The ArkWeb_SchemeHandler.
* @param resourceRequest Obtain request's information through this.
* @param resourceHandler The ArkWeb_ResourceHandler for the request. It should not be used if intercept is set to
@@ -188,10 +231,13 @@ typedef void (*ArkWeb_OnRequestStart)(const ArkWeb_SchemeHandler* schemeHandler,
const ArkWeb_ResourceHandler* resourceHandler,
bool* intercept);
-/*
- * @brief Callback when the request is completed. This will called on the IO thread.
- * Should destory the resourceRequest by ArkWeb_ResourceRequest_Destroy and use ArkWeb_ResourceHandler_Destroy
- * destroy the ArkWeb_ResourceHandler received in ArkWeb_OnRequestStart.
+/**
+ * @brief Callback when the request is completed.
+ *
+ * This will be called on the IO thread.\n
+ * Should destory the resourceRequest by ArkWeb_ResourceRequest_Destroy and use ArkWeb_ResourceHandler_Destroy\n
+ * destroy the ArkWeb_ResourceHandler received in ArkWeb_OnRequestStart.\n
+ *
* @param schemeHandler The ArkWeb_SchemeHandler.
* @param resourceRequest The ArkWeb_ResourceRequest.
*
@@ -201,7 +247,7 @@ typedef void (*ArkWeb_OnRequestStart)(const ArkWeb_SchemeHandler* schemeHandler,
typedef void (*ArkWeb_OnRequestStop)(const ArkWeb_SchemeHandler* schemeHandler,
const ArkWeb_ResourceRequest* resourceRequest);
-/*
+/**
* @brief Callback when the read operation done.
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @param buffer The buffer to receive data.
@@ -216,17 +262,17 @@ typedef void (*ArkWeb_HttpBodyStreamReadCallback)(const ArkWeb_HttpBodyStream* h
uint8_t* buffer,
int bytesRead);
-/*
+/**
* @brief Callback when the init operation done.
* @param httpBodyStream The ArkWeb_HttpBodyStream.
- * @param result ARKWEB_NET_OK on success otherwise refer to ARKWEB_NET_ERROR.
+ * @param result {@link ARKWEB_NET_OK} on success otherwise refer to arkweb_net_error_list.h.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
typedef void (*ArkWeb_HttpBodyStreamInitCallback)(const ArkWeb_HttpBodyStream* httpBodyStream, ArkWeb_NetError result);
-/*
+/**
* @brief Destroy the ArkWeb_RequestHeaderList.
* @param requestHeaderList The ArkWeb_RequestHeaderList to be destroyed.
*
@@ -235,7 +281,7 @@ typedef void (*ArkWeb_HttpBodyStreamInitCallback)(const ArkWeb_HttpBodyStream* h
*/
void OH_ArkWebRequestHeaderList_Destroy(ArkWeb_RequestHeaderList* requestHeaderList);
-/*
+/**
* @brief Get the request headers size.
* @param requestHeaderList The list of request header.
* @return The size of request headers. -1 if requestHeaderList is invalid.
@@ -245,7 +291,7 @@ void OH_ArkWebRequestHeaderList_Destroy(ArkWeb_RequestHeaderList* requestHeaderL
*/
int32_t OH_ArkWebRequestHeaderList_GetSize(const ArkWeb_RequestHeaderList* requestHeaderList);
-/*
+/**
* @brief Get the specified request header.
* @param requestHeaderList The list of request header.
* @param index The index of request header.
@@ -260,18 +306,19 @@ void OH_ArkWebRequestHeaderList_GetHeader(const ArkWeb_RequestHeaderList* reques
char** key,
char** value);
-/*
+/**
* @brief Set a user data to ArkWeb_ResourceRequest.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @param userData The user data to set.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResourceRequest_SetUserData(ArkWeb_ResourceRequest* resourceRequest, void* userData);
-/*
+/**
* @brief Get the user data from ArkWeb_ResourceRequest.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @return The set user data.
@@ -281,7 +328,7 @@ int32_t OH_ArkWebResourceRequest_SetUserData(ArkWeb_ResourceRequest* resourceReq
*/
void* OH_ArkWebResourceRequest_GetUserData(const ArkWeb_ResourceRequest* resourceRequest);
-/*
+/**
* @brief Get the method of request.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @param method The request's http method. This function will allocate memory for the method string and caller must
@@ -292,7 +339,7 @@ void* OH_ArkWebResourceRequest_GetUserData(const ArkWeb_ResourceRequest* resourc
*/
void OH_ArkWebResourceRequest_GetMethod(const ArkWeb_ResourceRequest* resourceRequest, char** method);
-/*
+/**
* @brief Get the url of request.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @param url The request's url. This function will allocate memory for the url string and caller must release the
@@ -303,7 +350,7 @@ void OH_ArkWebResourceRequest_GetMethod(const ArkWeb_ResourceRequest* resourceRe
*/
void OH_ArkWebResourceRequest_GetUrl(const ArkWeb_ResourceRequest* resourceRequest, char** url);
-/*
+/**
* @brief Create a ArkWeb_HttpBodyStream which used to read the http body.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @param httpBodyStream The request's http body. This function will allocate memory for the http body stream and
@@ -315,7 +362,7 @@ void OH_ArkWebResourceRequest_GetUrl(const ArkWeb_ResourceRequest* resourceReque
void OH_ArkWebResourceRequest_GetHttpBodyStream(const ArkWeb_ResourceRequest* resourceRequest,
ArkWeb_HttpBodyStream** httpBodyStream);
-/*
+/**
* @brief Destroy the http body stream.
* @param httpBodyStream The httpBodyStream to be destroyed.
*
@@ -324,18 +371,40 @@ void OH_ArkWebResourceRequest_GetHttpBodyStream(const ArkWeb_ResourceRequest* re
*/
void OH_ArkWebResourceRequest_DestroyHttpBodyStream(ArkWeb_HttpBodyStream* httpBodyStream);
-/*
+/**
+ * @brief Get the resource type of request.
+ * @param resourceRequest The ArkWeb_ResourceRequest.
+ * @return The resource type of request. -1 if resourceRequest is invalid.
+ *
+ * @syscap SystemCapability.Web.Webview.Core
+ * @since 12
+ */
+int32_t OH_ArkWebResourceRequest_GetResourceType(const ArkWeb_ResourceRequest* resourceRequest);
+
+/**
+ * @brief Get the url of frame which trigger this request.
+ * @param resourceRequest The ArkWeb_ResourceRequest.
+ * @param frameUrl The url of frame which trigger this request. This function will allocate memory for the url string
+ * and caller must release the string by OH_ArkWeb_ReleaseString.
+ *
+ * @syscap SystemCapability.Web.Webview.Core
+ * @since 12
+ */
+void OH_ArkWebResourceRequest_GetFrameUrl(const ArkWeb_ResourceRequest* resourceRequest, char** frameUrl);
+
+/**
* @brief Set a user data to ArkWeb_HttpBodyStream.
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @param userData The user data to set.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebHttpBodyStream_SetUserData(ArkWeb_HttpBodyStream* httpBodyStream, void* userData);
-/*
+/**
* @brief Get the user data from ArkWeb_HttpBodyStream.
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @return The set user data.
@@ -345,13 +414,16 @@ int32_t OH_ArkWebHttpBodyStream_SetUserData(ArkWeb_HttpBodyStream* httpBodyStrea
*/
void* OH_ArkWebHttpBodyStream_GetUserData(const ArkWeb_HttpBodyStream* httpBodyStream);
-/*
- * @brief Set the callback for OH_ArkWebHttpBodyStream_Read, the result of OH_ArkWebHttpBodyStream_Read will be
- * notified to caller through the readCallback. The callback will runs in the same thread as
- * OH_ArkWebHttpBodyStream_Read.
+/**
+ * @brief Set the callback for OH_ArkWebHttpBodyStream_Read.
+ *
+ * The result of OH_ArkWebHttpBodyStream_Read will be notified to caller through the readCallback.\n
+ * The callback will run in the same thread as OH_ArkWebHttpBodyStream_Read.\n
+ *
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @param readCallback The callback of read function.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -359,11 +431,15 @@ void* OH_ArkWebHttpBodyStream_GetUserData(const ArkWeb_HttpBodyStream* httpBodyS
int32_t OH_ArkWebHttpBodyStream_SetReadCallback(ArkWeb_HttpBodyStream* httpBodyStream,
ArkWeb_HttpBodyStreamReadCallback readCallback);
-/*
- * @brief Init the http body stream. This function must be called before calling any other functions.
+/**
+ * @brief Init the http body stream.
+ *
+ * This function must be called before calling any other functions.\n
+ *
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @param initCallback The callback of init.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -371,10 +447,12 @@ int32_t OH_ArkWebHttpBodyStream_SetReadCallback(ArkWeb_HttpBodyStream* httpBodyS
int32_t OH_ArkWebHttpBodyStream_Init(ArkWeb_HttpBodyStream* httpBodyStream,
ArkWeb_HttpBodyStreamInitCallback initCallback);
-/*
- * @brief Read the http body to the buffer. The buffer must be larger than the bufLen. We will be reading data from a
- * worker thread to the buffer, so should not use the buffer in other threads before the callback to avoid
- * concurrency issues.
+/**
+ * @brief Read the http body to the buffer.
+ *
+ * The buffer must be larger than the bufLen. We will be reading data from a worker thread to the buffer,\n
+ * so should not use the buffer in other threads before the callback to avoid concurrency issues.\n
+ *
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @param buffer The buffer to receive data.
* @param bufLen The size of bytes to read.
@@ -384,9 +462,11 @@ int32_t OH_ArkWebHttpBodyStream_Init(ArkWeb_HttpBodyStream* httpBodyStream,
*/
void OH_ArkWebHttpBodyStream_Read(const ArkWeb_HttpBodyStream* httpBodyStream, uint8_t* buffer, int bufLen);
-/*
+/**
* @brief Get the total size of the data stream.
- * When data is chunked or httpBodyStream is invalid, always return zero.
+ *
+ * When data is chunked or httpBodyStream is invalid, always return zero.\n
+ *
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @return The size of data stream.
*
@@ -395,7 +475,7 @@ void OH_ArkWebHttpBodyStream_Read(const ArkWeb_HttpBodyStream* httpBodyStream, u
*/
uint64_t OH_ArkWebHttpBodyStream_GetSize(const ArkWeb_HttpBodyStream* httpBodyStream);
-/*
+/**
* @brief Get the current position of the data stream.
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @return The current position of data stream. 0 if httpBodyStream is invalid.
@@ -405,7 +485,7 @@ uint64_t OH_ArkWebHttpBodyStream_GetSize(const ArkWeb_HttpBodyStream* httpBodySt
*/
uint64_t OH_ArkWebHttpBodyStream_GetPosition(const ArkWeb_HttpBodyStream* httpBodyStream);
-/*
+/**
* @brief Get if the data stream is chunked.
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @return True if is chunked; false otherwise.
@@ -416,9 +496,11 @@ uint64_t OH_ArkWebHttpBodyStream_GetPosition(const ArkWeb_HttpBodyStream* httpBo
bool OH_ArkWebHttpBodyStream_IsChunked(const ArkWeb_HttpBodyStream* httpBodyStream);
-/*
- * @brief Returns true if all data has been consumed from this upload data stream. For chunked uploads, returns false
- * until the first read attempt.
+/**
+ * @brief Returns true if all data has been consumed from this upload data stream.
+ *
+ * For chunked uploads, returns false until the first read attempt.\n
+ *
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @return True if all data has been consumed; false otherwise.
*
@@ -427,9 +509,12 @@ bool OH_ArkWebHttpBodyStream_IsChunked(const ArkWeb_HttpBodyStream* httpBodyStre
*/
bool OH_ArkWebHttpBodyStream_IsEof(const ArkWeb_HttpBodyStream* httpBodyStream);
-/*
- * @brief Returns true if the upload data in the stream is entirely in memory, and all read requests will succeed
- * synchronously. Expected to return false for chunked requests.
+/**
+ * @brief Returns true if the upload data in the stream is entirely in memory,
+ * and all read requests will succeed synchronously.
+ *
+ * Expected to return false for chunked requests.\n
+ *
* @param httpBodyStream The ArkWeb_HttpBodyStream.
* @return True if the upload data is in memory; false otherwise.
*
@@ -438,17 +523,18 @@ bool OH_ArkWebHttpBodyStream_IsEof(const ArkWeb_HttpBodyStream* httpBodyStream);
*/
bool OH_ArkWebHttpBodyStream_IsInMemory(const ArkWeb_HttpBodyStream* httpBodyStream);
-/*
+/**
* @brief Destroy the ArkWeb_ResourceRequest.
* @param resourceRequest The ArkWeb_ResourceRequest.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResourceRequest_Destroy(const ArkWeb_ResourceRequest* resourceRequest);
-/*
+/**
* @brief Get the referrer of request.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @param referrer The request's referrer. This function will allocate memory for the post data string and caller
@@ -459,7 +545,7 @@ int32_t OH_ArkWebResourceRequest_Destroy(const ArkWeb_ResourceRequest* resourceR
*/
void OH_ArkWebResourceRequest_GetReferrer(const ArkWeb_ResourceRequest* resourceRequest, char** referrer);
-/*
+/**
* @brief Get the OH_ArkWeb_RequestHeaderList of the request.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @param requestHeaderList The RequestHeaderList of request.
@@ -470,7 +556,7 @@ void OH_ArkWebResourceRequest_GetReferrer(const ArkWeb_ResourceRequest* resource
void OH_ArkWebResourceRequest_GetRequestHeaders(const ArkWeb_ResourceRequest* resourceRequest,
ArkWeb_RequestHeaderList** requestHeaderList);
-/*
+/**
* @brief Get if this is a redirect request.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @return True if this is a redirect; false otherwise.
@@ -480,7 +566,7 @@ void OH_ArkWebResourceRequest_GetRequestHeaders(const ArkWeb_ResourceRequest* re
*/
bool OH_ArkWebResourceRequest_IsRedirect(const ArkWeb_ResourceRequest* resourceRequest);
-/*
+/**
* @brief Get if this is a request from main frame.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @return True if this is from main frame; false otherwise.
@@ -490,7 +576,7 @@ bool OH_ArkWebResourceRequest_IsRedirect(const ArkWeb_ResourceRequest* resourceR
*/
bool OH_ArkWebResourceRequest_IsMainFrame(const ArkWeb_ResourceRequest* resourceRequest);
-/*
+/**
* @brief Get if this is a request is triggered by user gesutre.
* @param resourceRequest The ArkWeb_ResourceRequest.
* @return True if this is triggered by user gesture; false otherwise.
@@ -500,22 +586,30 @@ bool OH_ArkWebResourceRequest_IsMainFrame(const ArkWeb_ResourceRequest* resource
*/
bool OH_ArkWebResourceRequest_HasGesture(const ArkWeb_ResourceRequest* resourceRequest);
-/*
- * @brief Register custom scheme to the ArkWeb. Should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT and
- * DATA schemes. This function should be called on main thread.
+/**
+ * @brief Register custom scheme to the ArkWeb.
+ *
+ * Should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.\n
+ * This function should be called on main thread.\n
+ *
* @param scheme The scheme to regist.
* @param option The configuration of the scheme.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_ERROR_UNKNOWN} 17100100 - Unknown error.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
+ * {@link ARKWEB_SCHEME_REGISTER_FAILED} 17100102 - Register custom schemes should be called
+ * before create any ArkWeb.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWeb_RegisterCustomSchemes(const char* scheme, int32_t option);
-/*
+/**
* @brief Set a ArkWeb_SchemeHandler for a specific scheme to intercept requests of that scheme type.
- * SchemeHandler should be set after the BrowserContext created.
- * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.
+ *
+ * SchemeHandler should be set after the BrowserContext created.\n
+ * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.\n
*
* @param scheme Scheme that need to be intercepted.
* @param schemeHandler The SchemeHandler for the scheme. Only requests triggered by ServiceWorker will be notified
@@ -527,10 +621,11 @@ int32_t OH_ArkWeb_RegisterCustomSchemes(const char* scheme, int32_t option);
*/
bool OH_ArkWebServiceWorker_SetSchemeHandler(const char* scheme, ArkWeb_SchemeHandler* schemeHandler);
-/*
+/**
* @brief Set a ArkWeb_SchemeHandler for a specific scheme to intercept requests of that scheme type.
- * SchemeHandler should be set after the BrowserContext created.
- * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.
+ *
+ * SchemeHandler should be set after the BrowserContext created.\n
+ * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.\n
*
* @param scheme Scheme that need to be intercepted.
* @param webTag The name of the web component.
@@ -543,26 +638,27 @@ bool OH_ArkWebServiceWorker_SetSchemeHandler(const char* scheme, ArkWeb_SchemeHa
*/
bool OH_ArkWeb_SetSchemeHandler(const char* scheme, const char* webTag, ArkWeb_SchemeHandler* schemeHandler);
-/*
+/**
* @brief Clear the handler registered on the specified web for service worker.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebServiceWorker_ClearSchemeHandlers();
-/*
+/**
* @brief Clear the handler registered on the specified web.
* @param webTag The name of the web component.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWeb_ClearSchemeHandlers(const char* webTag);
-/*
+/**
* @brief Create a SchemeHandler.
* @param schemeHandler Return the created SchemeHandler. Use OH_ArkWeb_DestroySchemeHandler destroy it when donn't
* need it.
@@ -572,7 +668,7 @@ int32_t OH_ArkWeb_ClearSchemeHandlers(const char* webTag);
*/
void OH_ArkWeb_CreateSchemeHandler(ArkWeb_SchemeHandler** schemeHandler);
-/*
+/**
* @brief Destroy a SchemeHandler.
* @param The ArkWeb_SchemeHandler to be destroy.
*
@@ -581,18 +677,19 @@ void OH_ArkWeb_CreateSchemeHandler(ArkWeb_SchemeHandler** schemeHandler);
*/
void OH_ArkWeb_DestroySchemeHandler(ArkWeb_SchemeHandler* schemeHandler);
-/*
+/**
* @brief Set a user data to ArkWeb_SchemeHandler.
* @param schemeHandler The ArkWeb_SchemeHandler.
* @param userData The user data to set.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebSchemeHandler_SetUserData(ArkWeb_SchemeHandler* schemeHandler, void* userData);
-/*
+/**
* @brief Get the user data from ArkWeb_SchemeHandler.
* @param schemeHandler The ArkWeb_SchemeHandler.
* @return The set user data.
@@ -602,11 +699,12 @@ int32_t OH_ArkWebSchemeHandler_SetUserData(ArkWeb_SchemeHandler* schemeHandler,
*/
void* OH_ArkWebSchemeHandler_GetUserData(const ArkWeb_SchemeHandler* schemeHandler);
-/*
+/**
* @brief Set the OnRequestStart callback for SchemeHandler.
* @param schemeHandler The SchemeHandler for the scheme.
* @param onRequestStart The OnRequestStart callback.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -614,11 +712,12 @@ void* OH_ArkWebSchemeHandler_GetUserData(const ArkWeb_SchemeHandler* schemeHandl
int32_t OH_ArkWebSchemeHandler_SetOnRequestStart(ArkWeb_SchemeHandler* schemeHandler,
ArkWeb_OnRequestStart onRequestStart);
-/*
+/**
* @brief Set the OnRequestStop callback for SchemeHandler.
* @param schemeHandler The SchemeHandler for the scheme.
* @param onRequestStop The OnRequestStop callback.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -626,16 +725,16 @@ int32_t OH_ArkWebSchemeHandler_SetOnRequestStart(ArkWeb_SchemeHandler* schemeHan
int32_t OH_ArkWebSchemeHandler_SetOnRequestStop(ArkWeb_SchemeHandler* schemeHandler,
ArkWeb_OnRequestStop onRequestStop);
-/*
+/**
* @brief Create a Response for a request.
- * @param Return the created Response. Use OH_ArkWeb_DestroyResponse to destroy when donn't need it.
+ * @param response The created Response. Use OH_ArkWeb_DestroyResponse to destroy when donn't need it.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
void OH_ArkWeb_CreateResponse(ArkWeb_Response** response);
-/*
+/**
* @brief Destroy the Reponse.
* @param response The Response needs destroy.
*
@@ -644,18 +743,19 @@ void OH_ArkWeb_CreateResponse(ArkWeb_Response** response);
*/
void OH_ArkWeb_DestroyResponse(ArkWeb_Response* response);
-/*
+/**
* @brief Set the resolved URL after redirects or changed as a result of HSTS.
* @param response The ArkWeb_Response.
* @param url The resolved URL.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResponse_SetUrl(ArkWeb_Response* response, const char* url);
-/*
+/**
* @brief Get the resolved URL after redirects or changed as a result of HSTS.
* @param response The ArkWeb_Response.
* @param url The resolved URL.
@@ -665,18 +765,19 @@ int32_t OH_ArkWebResponse_SetUrl(ArkWeb_Response* response, const char* url);
*/
void OH_ArkWebResponse_GetUrl(const ArkWeb_Response* response, char** url);
-/*
+/**
* @brief Set a error code to ArkWeb_Response.
* @param response The ArkWeb_Response.
* @param errorCode The error code for the failed request.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResponse_SetError(ArkWeb_Response* response, ArkWeb_NetError errorCode);
-/*
+/**
* @brief Get the response's error code.
* @param response The ArkWeb_Response.
* @return The response's error code.
@@ -686,18 +787,19 @@ int32_t OH_ArkWebResponse_SetError(ArkWeb_Response* response, ArkWeb_NetError er
*/
ArkWeb_NetError OH_ArkWebResponse_GetError(const ArkWeb_Response* response);
-/*
+/**
* @brief Set a status code to ArkWebResponse.
* @param response The ArkWeb_Response.
* @param status The http status code for the request.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResponse_SetStatus(ArkWeb_Response* response, int status);
-/*
+/**
* @brief Get the response's status code.
* @param response The ArkWeb_Response.
* @return The response's http status code. -1 if response is invalid.
@@ -707,18 +809,19 @@ int32_t OH_ArkWebResponse_SetStatus(ArkWeb_Response* response, int status);
*/
int OH_ArkWebResponse_GetStatus(const ArkWeb_Response* response);
-/*
+/**
* @brief Set a status text to ArkWebResponse.
* @param response The ArkWeb_Response.
* @param statusText The status text for the request.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResponse_SetStatusText(ArkWeb_Response* response, const char* statusText);
-/*
+/**
* @brief Get the response's status text.
* @param response The ArkWeb_Response.
* @param statusText Return the response's statusText. This function will allocate memory for the statusText string and
@@ -729,18 +832,19 @@ int32_t OH_ArkWebResponse_SetStatusText(ArkWeb_Response* response, const char* s
*/
void OH_ArkWebResponse_GetStatusText(const ArkWeb_Response* response, char** statusText);
-/*
+/**
* @brief Set mime type to ArkWebResponse.
* @param response The ArkWeb_Response.
* @param mimeType The mime type for the request.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResponse_SetMimeType(ArkWeb_Response* response, const char* mimeType);
-/*
+/**
* @brief Get the response's mime type.
* @param response The ArkWeb_Response.
* @param mimeType Return the response's mime type. This function will allocate memory for the mime type string and
@@ -751,18 +855,19 @@ int32_t OH_ArkWebResponse_SetMimeType(ArkWeb_Response* response, const char* mim
*/
void OH_ArkWebResponse_GetMimeType(const ArkWeb_Response* response, char** mimeType);
-/*
+/**
* @brief Set charset to ArkWeb_Response.
* @param response The ArkWeb_Response.
* @param charset The charset for the request.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResponse_SetCharset(ArkWeb_Response* response, const char* charset);
-/*
+/**
* @brief Get the response's charset.
* @param response The ArkWeb_Response.
* @param charset Return the response's charset. This function will allocate memory for the charset string and caller
@@ -773,13 +878,14 @@ int32_t OH_ArkWebResponse_SetCharset(ArkWeb_Response* response, const char* char
*/
void OH_ArkWebResponse_GetCharset(const ArkWeb_Response* response, char** charset);
-/*
+/**
* @brief Set a header to ArkWeb_Response.
* @param response The ArkWeb_Response.
* @param name The name of the header.
* @param value The value of the header.
- * @bool overwirte If true will overwrite the exsits header, if false otherwise.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @param overwirte If true will overwrite the exsits header, if false otherwise.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -789,7 +895,7 @@ int32_t OH_ArkWebResponse_SetHeaderByName(ArkWeb_Response* response,
const char* value,
bool overwrite);
-/*
+/**
* @brief Get the header from the response.
* @param response The ArkWeb_Response.
* @param name The name of the header.
@@ -801,21 +907,23 @@ int32_t OH_ArkWebResponse_SetHeaderByName(ArkWeb_Response* response,
*/
void OH_ArkWebResponse_GetHeaderByName(const ArkWeb_Response* response, const char* name, char** value);
-/*
+/**
* @brief Destroy the ArkWeb_ResourceHandler.
* @param resourceHandler The ArkWeb_ResourceHandler.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResourceHandler_Destroy(const ArkWeb_ResourceHandler* resourceHandler);
-/*
+/**
* @brief Pass response headers to intercepted requests.
* @param resourceHandler The ArkWeb_ResourceHandler for the request.
* @param response The ArkWeb_Response for the intercepting requests.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -823,12 +931,13 @@ int32_t OH_ArkWebResourceHandler_Destroy(const ArkWeb_ResourceHandler* resourceH
int32_t OH_ArkWebResourceHandler_DidReceiveResponse(const ArkWeb_ResourceHandler* resourceHandler,
const ArkWeb_Response* response);
-/*
+/**
* @brief Pass response body data to intercepted requests.
* @param resourceHandler The ArkWeb_ResourceHandler for the request.
* @param buffer Buffer data to send.
* @param bufLen The size of buffer.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -837,21 +946,23 @@ int32_t OH_ArkWebResourceHandler_DidReceiveData(const ArkWeb_ResourceHandler* re
const uint8_t* buffer,
int64_t bufLen);
-/*
+/**
* @brief Notify the ArkWeb that this request should be finished and there is no more data available.
* @param resourceHandler The ArkWeb_ResourceHandler for the request.
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
*/
int32_t OH_ArkWebResourceHandler_DidFinish(const ArkWeb_ResourceHandler* resourceHandler);
-/*
+/**
* @brief Notify the ArkWeb that this request should be failed.
* @param resourceHandler The ArkWeb_ResourceHandler for the request.
- * @param errorCode The error code for this request. refer to arkweb_net_error_list.h
- * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h.
+ * @param errorCode The error code for this request. Refer to arkweb_net_error_list.h.
+ * @return {@link ARKWEB_NET_OK} 0 - Success.
+ * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 12
@@ -859,7 +970,7 @@ int32_t OH_ArkWebResourceHandler_DidFinish(const ArkWeb_ResourceHandler* resourc
int32_t OH_ArkWebResourceHandler_DidFailWithError(const ArkWeb_ResourceHandler* resourceHandler,
ArkWeb_NetError errorCode);
-/*
+/**
* @brief Release the string acquired by native function.
* @param string The string to be released.
*
@@ -868,7 +979,7 @@ int32_t OH_ArkWebResourceHandler_DidFailWithError(const ArkWeb_ResourceHandler*
*/
void OH_ArkWeb_ReleaseString(char* string);
-/*
+/**
* @brief Release the byte array acquired by native function.
* @param byteArray The byte array to be released.
*
diff --git a/web/webview/interfaces/native/libohweb.ndk.json b/web/webview/interfaces/native/libohweb.ndk.json
index 4e226f72c15cc3872d96c4557f6d9753f7245fc6..a92438ec859e9a67ab90686dbbeb52e44fe24ba3 100644
--- a/web/webview/interfaces/native/libohweb.ndk.json
+++ b/web/webview/interfaces/native/libohweb.ndk.json
@@ -91,6 +91,14 @@
"first_introduced": "12",
"name": "OH_ArkWebResourceRequest_DestroyHttpBodyStream"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkWebResourceRequest_GetResourceType"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkWebResourceRequest_GetFrameUrl"
+ },
{
"first_introduced": "12",
"name": "OH_ArkWebHttpBodyStream_SetReadCallback"
diff --git a/web/webview/interfaces/native/native_interface_arkweb.h b/web/webview/interfaces/native/native_interface_arkweb.h
index 149128c99331235b46f148e74123d1058e4a55a8..e994c46bb21e2a91dcf889fbc8af8322e947a05d 100644
--- a/web/webview/interfaces/native/native_interface_arkweb.h
+++ b/web/webview/interfaces/native/native_interface_arkweb.h
@@ -119,7 +119,8 @@ void OH_NativeArkWeb_SetJavaScriptProxyValidCallback(const char* webTag, NativeA
* @brief Get the valid callback.
*
* @param webTag The name of the web component.
- * @return return the valid callback function registered.
+ * @return Return the valid callback function registered. If the valid callback function
+ * specified by the parameter webTag is not set, a null pointer is returned.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 11
@@ -141,7 +142,9 @@ void OH_NativeArkWeb_SetDestroyCallback(const char* webTag, NativeArkWeb_OnDestr
* @brief Get the destroy callback.
*
* @param webTag The name of the web component.
- * @return return the destroy callback function registered.
+ * @return Return the destroy callback function registered. If the destroy callback
+ * function specified by the parameter webTag is not set,
+ * a null pointer is returned.
*
* @syscap SystemCapability.Web.Webview.Core
* @since 11