mirror of
https://gitee.com/openharmony/interface_sdk_c
synced 2024-11-27 00:41:01 +00:00
add new UDS(OpenHarmonyFrom, FileUri)
Signed-off-by: lizhuojun <lizhuojun3@huawei.com>
This commit is contained in:
parent
400e741b95
commit
707c83df36
@ -56,22 +56,14 @@ typedef enum Udmf_ErrCode {
|
||||
* The error code in the correct case.
|
||||
*/
|
||||
UDMF_E_OK = 0,
|
||||
/**
|
||||
* @brief The error when the capability not supported.
|
||||
*/
|
||||
UDMF_E_NOT_SUPPORTED = 801,
|
||||
/**
|
||||
* @brief The error code for common exceptions.
|
||||
*/
|
||||
UDMF_ERR = 20400000,
|
||||
/**
|
||||
* @brief The error code for not support this data parse exceptions.
|
||||
*/
|
||||
UDMF_E_NOT_PARSE_DATA = (UDMF_ERR + 1),
|
||||
/**
|
||||
* @brief The error code for common invalid args.
|
||||
*/
|
||||
UDMF_E_INVALID_PARAM = (UDMF_ERR + 2),
|
||||
UDMF_E_INVALID_PARAM = (UDMF_ERR + 1),
|
||||
} Udmf_ErrCode;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -72,6 +72,20 @@ typedef struct OH_UdsHtml OH_UdsHtml;
|
||||
*/
|
||||
typedef struct OH_UdsAppItem OH_UdsAppItem;
|
||||
|
||||
/**
|
||||
* @brief Describes the unified data struct of open harmony form.
|
||||
*
|
||||
* @since 12
|
||||
*/
|
||||
typedef struct OH_UdsForm OH_UdsForm;
|
||||
|
||||
/**
|
||||
* @brief Describes the unified data struct of file uri.
|
||||
*
|
||||
* @since 12
|
||||
*/
|
||||
typedef struct OH_UdsFileUri OH_UdsFileUri;
|
||||
|
||||
/**
|
||||
* @brief Creation a pointer to the instance of the {@link OH_UdsPlainText}.
|
||||
*
|
||||
@ -464,6 +478,133 @@ int OH_UdsAppItem_SetBundleName(OH_UdsAppItem* pThis, const char* bundleName);
|
||||
*/
|
||||
int OH_UdsAppItem_SetAbilityName(OH_UdsAppItem* pThis, const char* abilityName);
|
||||
|
||||
/**
|
||||
* @brief Creation a pointer to the instance of the {@link OH_UdsForm}.
|
||||
*
|
||||
* @return If the operation is successful, a pointer to the instance of the {@link OH_UdsForm}
|
||||
* structure is returned. If the operation is failed, nullptr is returned.
|
||||
* @see OH_UdsForm
|
||||
* @since 12
|
||||
*/
|
||||
OH_UdsForm* OH_UdsForm_Create();
|
||||
|
||||
/**
|
||||
* @brief Destroy a pointer that points to the {@link OH_UdsForm} instance.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsForm}.
|
||||
* @see OH_UdsForm
|
||||
* @since 12
|
||||
*/
|
||||
void OH_UdsForm_Destroy(OH_UdsForm* pThis);
|
||||
|
||||
/**
|
||||
* @brief Get type id from the {@link OH_UdsForm}.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsForm}.
|
||||
* @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
|
||||
* @see OH_UdsForm
|
||||
* @since 12
|
||||
*/
|
||||
const char* OH_UdsForm_GetType(OH_UdsForm* pThis);
|
||||
|
||||
/**
|
||||
* @brief Get form content from the {@link OH_UdsForm}.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsForm}.
|
||||
* @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
|
||||
* @see OH_UdsForm
|
||||
* @since 12
|
||||
*/
|
||||
const char* OH_UdsForm_GetFormContent(OH_UdsForm* pThis);
|
||||
|
||||
/**
|
||||
* @brief Set form content to the {@link OH_UdsForm}.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsForm}.
|
||||
* @param content Represents a new form content string.
|
||||
* @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
|
||||
* {@link UDMF_E_OK} success.
|
||||
* {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
|
||||
* @see OH_UdsForm Udmf_ErrCode
|
||||
* @since 12
|
||||
*/
|
||||
int OH_UdsForm_SetFormContent(OH_UdsForm* pThis, const char* formContent);
|
||||
|
||||
/**
|
||||
* @brief Creation a pointer to the instance of the {@link OH_UdsFileUri}.
|
||||
*
|
||||
* @return If the operation is successful, a pointer to the instance of the {@link OH_UdsFileUri}
|
||||
* structure is returned. If the operation is failed, nullptr is returned.
|
||||
* @see OH_UdsFileUri
|
||||
* @since 12
|
||||
*/
|
||||
OH_UdsFileUri* OH_UdsFileUri_Create();
|
||||
|
||||
/**
|
||||
* @brief Destroy a pointer that points to the {@link OH_UdsFileUri} instance.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
|
||||
* @see OH_UdsFileUri
|
||||
* @since 12
|
||||
*/
|
||||
void OH_UdsFileUri_Destroy(OH_UdsFileUri* pThis);
|
||||
|
||||
/**
|
||||
* @brief Get type id from the {@link OH_UdsFileUri}.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
|
||||
* @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
|
||||
* @see OH_UdsFileUri
|
||||
* @since 12
|
||||
*/
|
||||
const char* OH_UdsFileUri_GetType(OH_UdsFileUri* pThis);
|
||||
|
||||
/**
|
||||
* @brief Get file uri from the {@link OH_UdsFileUri}.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
|
||||
* @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
|
||||
* @see OH_UdsFileUri
|
||||
* @since 12
|
||||
*/
|
||||
const char* OH_UdsFileUri_GetFileUri(OH_UdsFileUri* pThis);
|
||||
|
||||
/**
|
||||
* @brief Get file type from the {@link OH_UdsFileUri}.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
|
||||
* @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
|
||||
* @see OH_UdsFileUri
|
||||
* @since 12
|
||||
*/
|
||||
const char* OH_UdsFileUri_GetFileType(OH_UdsFileUri* pThis);
|
||||
|
||||
/**
|
||||
* @brief Set file uri to the {@link OH_UdsFileUri}.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
|
||||
* @param content Represents a new content string.
|
||||
* @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
|
||||
* {@link UDMF_E_OK} success.
|
||||
* {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
|
||||
* @see OH_UdsFileUri Udmf_ErrCode
|
||||
* @since 12
|
||||
*/
|
||||
int OH_UdsFileUri_SetFileUri(OH_UdsFileUri* pThis, const char* fileUri);
|
||||
|
||||
/**
|
||||
* @brief Set file type to the {@link OH_UdsFileUri}.
|
||||
*
|
||||
* @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
|
||||
* @param content Represents a new content string.
|
||||
* @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
|
||||
* {@link UDMF_E_OK} success.
|
||||
* {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
|
||||
* @see OH_UdsFileUri Udmf_ErrCode
|
||||
* @since 12
|
||||
*/
|
||||
int OH_UdsFileUri_SetFileType(OH_UdsFileUri* pThis, const char* fileType);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user