openharmony 鸿蒙 capi-uds-h

2026-08-25 浏览 (1)

uds.h

Overview

Defines the APIs and structs related to the uniform data structs.

File to include: <database/udmf/uds.h>

Library: libudmf.so

System capability: SystemCapability.DistributedDataManager.UDMF.Core

Since: 12

Related module: UDMF

Summary

Structs

Nametypedef KeywordDescription
OH_UdsPlainTextOH_UdsPlainTextDefines a struct for the unified data of the plaintext type.
OH_UdsHyperlinkOH_UdsHyperlinkDefines a struct for the unified data of the hyperlink type.
OH_UdsHtmlOH_UdsHtmlDefines a struct for the unified data of the Hypertext Markup Language (HTML) type.
OH_UdsAppItemOH_UdsAppItemDefines a struct for the unified data of the home screen icon type.
OH_UdsFileUriOH_UdsFileUriDefines a struct for the unified data of the file URI type.
OH_UdsPixelMapOH_UdsPixelMapDefines a struct for the unified data of the pixel map type.
OH_UdsArrayBufferOH_UdsArrayBufferDefines a struct for the unified data of the ArrayBuffer type.
OH_UdsContentFormOH_UdsContentFormDefines a struct for the unified data of the content card type.
OH_UdsDetailsOH_UdsDetailsDefines a struct for the unified data of the dictionary type.

Functions

NameDescription
OH_UdsPlainText* OH_UdsPlainText_Create()Creates an OH_UdsPlainText instance and a pointer to it. If this pointer is no longer required, use OH_UdsPlainText_Destroy to destroy it. Otherwise, memory leaks may occur.
void OH_UdsPlainText_Destroy(OH_UdsPlainText* pThis)Destroys an OH_UdsPlainText instance.
const char* OH_UdsPlainText_GetType(OH_UdsPlainText* pThis)Obtains the type ID from an OH_UdsPlainText instance.
const char* OH_UdsPlainText_GetContent(OH_UdsPlainText* pThis)Obtains the plaintext from an OH_UdsPlainText instance.
const char* OH_UdsPlainText_GetAbstract(OH_UdsPlainText* pThis)Obtains the abstract from an OH_UdsPlainText instance.
int OH_UdsPlainText_SetContent(OH_UdsPlainText* pThis, const char* content)Sets the plaintext content for an OH_UdsPlainText instance.
int OH_UdsPlainText_SetAbstract(OH_UdsPlainText* pThis, const char* abstract)Sets the abstract for an OH_UdsPlainText instance.
OH_UdsHyperlink* OH_UdsHyperlink_Create()Creates an OH_UdsHyperlink instance and a pointer to it. If this pointer is no longer required, use OH_UdsHyperlink_Destroy to destroy it. Otherwise, memory leaks may occur.
void OH_UdsHyperlink_Destroy(OH_UdsHyperlink* pThis)Destroys an OH_UdsHyperlink instance.
const char* OH_UdsHyperlink_GetType(OH_UdsHyperlink* pThis)Obtains the type ID from an OH_UdsHyperlink instance.
const char* OH_UdsHyperlink_GetUrl(OH_UdsHyperlink* pThis)Obtains the URL from an OH_UdsHyperlink instance.
const char* OH_UdsHyperlink_GetDescription(OH_UdsHyperlink* pThis)Obtains the description from an OH_UdsHyperlink instance.
int OH_UdsHyperlink_SetUrl(OH_UdsHyperlink* pThis, const char* url)Sets the URL for an OH_UdsHyperlink instance.
int OH_UdsHyperlink_SetDescription(OH_UdsHyperlink* pThis, const char* description)Sets the description for an OH_UdsHyperlink instance.
OH_UdsHtml* OH_UdsHtml_Create()Creates an OH_UdsHtml instance and a pointer to it. If this pointer is no longer required, use OH_UdsHtml_Destroy to destroy it. Otherwise, memory leaks may occur.
void OH_UdsHtml_Destroy(OH_UdsHtml* pThis)Destroys an OH_UdsHtml instance.
const char* OH_UdsHtml_GetType(OH_UdsHtml* pThis)Obtains the type ID from an OH_UdsHtml instance.
const char* OH_UdsHtml_GetContent(OH_UdsHtml* pThis)Obtains the HTML content from an OH_UdsHtml instance.
const char* OH_UdsHtml_GetPlainContent(OH_UdsHtml* pThis)Obtains the plaintext content from an OH_UdsHtml instance.
int OH_UdsHtml_SetContent(OH_UdsHtml* pThis, const char* content)Sets the HTML content for an OH_UdsHtml instance.
int OH_UdsHtml_SetPlainContent(OH_UdsHtml* pThis, const char* plainContent)Sets the plaintext content for an OH_UdsHtml instance.
OH_UdsAppItem* OH_UdsAppItem_Create()Creates an OH_UdsAppItem instance and a pointer to it. If this pointer is no longer required, use OH_UdsAppItem_Destroy to destroy it. Otherwise, memory leaks may occur.
void OH_UdsAppItem_Destroy(OH_UdsAppItem* pThis)Destroys an OH_UdsAppItem instance.
const char* OH_UdsAppItem_GetType(OH_UdsAppItem* pThis)Obtains the type ID from an OH_UdsAppItem instance.
const char* OH_UdsAppItem_GetId(OH_UdsAppItem* pThis)Obtains the application ID from an OH_UdsAppItem instance.
const char* OH_UdsAppItem_GetName(OH_UdsAppItem* pThis)Obtains the application name from an OH_UdsAppItem instance.
const char* OH_UdsAppItem_GetIconId(OH_UdsAppItem* pThis)Obtains the image ID from an OH_UdsAppItem instance.
const char* OH_UdsAppItem_GetLabelId(OH_UdsAppItem* pThis)Obtains the label ID from an OH_UdsAppItem instance.
const char* OH_UdsAppItem_GetBundleName(OH_UdsAppItem* pThis)Obtains the bundle name from an OH_UdsAppItem instance.
const char* OH_UdsAppItem_GetAbilityName(OH_UdsAppItem* pThis)Obtains the ability name from an OH_UdsAppItem instance.
int OH_UdsAppItem_SetId(OH_UdsAppItem* pThis, const char* appId)Sets the application ID for an OH_UdsAppItem instance.
int OH_UdsAppItem_SetName(OH_UdsAppItem* pThis, const char* appName)Sets the application name for an OH_UdsAppItem instance.
int OH_UdsAppItem_SetIconId(OH_UdsAppItem* pThis, const char* appIconId)Sets the image ID for an OH_UdsAppItem instance.
int OH_UdsAppItem_SetLabelId(OH_UdsAppItem* pThis, const char* appLabelId)Sets the label ID for an OH_UdsAppItem instance.
int OH_UdsAppItem_SetBundleName(OH_UdsAppItem* pThis, const char* bundleName)Sets the bundle name for an OH_UdsAppItem instance.
int OH_UdsAppItem_SetAbilityName(OH_UdsAppItem* pThis, const char* abilityName)Sets the ability name for an OH_UdsAppItem instance.
OH_UdsFileUri* OH_UdsFileUri_Create()Creates an OH_UdsFileUri instance and a pointer to it. If this pointer is no longer required, use OH_UdsFileUri_Destroy to destroy it. Otherwise, memory leaks may occur.
void OH_UdsFileUri_Destroy(OH_UdsFileUri* pThis)Destroys an OH_UdsFileUri instance.
const char* OH_UdsFileUri_GetType(OH_UdsFileUri* pThis)Obtains the type ID from an OH_UdsFileUri instance.
const char* OH_UdsFileUri_GetFileUri(OH_UdsFileUri* pThis)Obtains the file URI from an OH_UdsFileUri instance.
const char* OH_UdsFileUri_GetFileType(OH_UdsFileUri* pThis)Obtains the file type from an OH_UdsFileUri instance.
int OH_UdsFileUri_SetFileUri(OH_UdsFileUri* pThis, const char* fileUri)Sets the URI information for an OH_UdsFileUri instance.
int OH_UdsFileUri_SetFileType(OH_UdsFileUri* pThis, const char* fileType)Sets the file type for an OH_UdsFileUri instance.
OH_UdsPixelMap* OH_UdsPixelMap_Create()Creates an OH_UdsPixelMap instance and a pointer to it. If this pointer is no longer required, use OH_UdsPixelMap_Destroy to destroy it. Otherwise, memory leaks may occur.
void OH_UdsPixelMap_Destroy(OH_UdsPixelMap* pThis)Destroys an OH_UdsPixelMap instance.
const char* OH_UdsPixelMap_GetType(OH_UdsPixelMap* pThis)Obtains the type ID from an OH_UdsPixelMap instance.
void OH_UdsPixelMap_GetPixelMap(OH_UdsPixelMap* pThis, OH_PixelmapNative* pixelmapNative)Obtains the pointer to the OH_PixelmapNative instance from an OH_UdsPixelMap instance.
int OH_UdsPixelMap_SetPixelMap(OH_UdsPixelMap* pThis, OH_PixelmapNative* pixelmapNative)Sets the pixel image content for an OH_UdsPixelMap instance.
OH_UdsArrayBuffer* OH_UdsArrayBuffer_Create()Creates an OH_UdsArrayBuffer instance and a pointer to it. If this pointer is no longer required, use OH_UdsArrayBuffer_Destroy to destroy it. Otherwise, memory leaks may occur.
int OH_UdsArrayBuffer_Destroy(OH_UdsArrayBuffer* buffer)Destroys an OH_UdsArrayBuffer instance.
int OH_UdsArrayBuffer_SetData(OH_UdsArrayBuffer* buffer, unsigned char* data, unsigned int len)Sets the data content for an OH_UdsArrayBuffer instance.
int OH_UdsArrayBuffer_GetData(OH_UdsArrayBuffer* buffer, unsigned char** data, unsigned int* len)Obtains the custom ArrayBuffer data from an OH_UdsArrayBuffer instance.
OH_UdsContentForm* OH_UdsContentForm_Create()Creates an OH_UdsContentForm instance and a pointer to it.
void OH_UdsContentForm_Destroy(OH_UdsContentForm* pThis)Destroys an OH_UdsContentForm instance.
const char* OH_UdsContentForm_GetType(OH_UdsContentForm* pThis)Obtains the type ID from an OH_UdsContentForm instance.
int OH_UdsContentForm_GetThumbData(OH_UdsContentForm* pThis, unsigned char** thumbData, unsigned int* len)Obtains the image data from an OH_UdsContentForm instance.
const char* OH_UdsContentForm_GetDescription(OH_UdsContentForm* pThis)Obtains the description from an OH_UdsContentForm instance.
const char* OH_UdsContentForm_GetTitle(OH_UdsContentForm* pThis)Obtains the title from an OH_UdsContentForm instance.
int OH_UdsContentForm_GetAppIcon(OH_UdsContentForm* pThis, unsigned char** appIcon, unsigned int* len)Obtains the application icon data from an OH_UdsContentForm instance.
const char* OH_UdsContentForm_GetAppName(OH_UdsContentForm* pThis)Obtains the application name from an OH_UdsContentForm instance.
const char* OH_UdsContentForm_GetLinkUri(OH_UdsContentForm* pThis)Obtains the hyperlink from an OH_UdsContentForm instance.
int OH_UdsContentForm_SetThumbData(OH_UdsContentForm* pThis, const unsigned char* thumbData, unsigned int len)Sets the image data for an OH_UdsContentForm instance.
int OH_UdsContentForm_SetDescription(OH_UdsContentForm* pThis, const char* description)Sets the description for an OH_UdsContentForm instance.
int OH_UdsContentForm_SetTitle(OH_UdsContentForm* pThis, const char* title)Sets the title for an OH_UdsContentForm instance.
int OH_UdsContentForm_SetAppIcon(OH_UdsContentForm* pThis, const unsigned char* appIcon, unsigned int len)Sets the application icon data for an OH_UdsContentForm instance.
int OH_UdsContentForm_SetAppName(OH_UdsContentForm* pThis, const char* appName)Sets the application name for an OH_UdsContentForm instance.
int OH_UdsContentForm_SetLinkUri(OH_UdsContentForm* pThis, const char* linkUri)Sets the hyperlink for an OH_UdsContentForm instance.
int OH_UdsPlainText_GetDetails(OH_UdsPlainText* pThis, OH_UdsDetails* details)Obtains the pointer to the OH_UdsDetails instance from an OH_UdsPlainText instance.
int OH_UdsPlainText_SetDetails(OH_UdsPlainText* pThis, const OH_UdsDetails* details)Sets the OH_UdsDetails parameter for an OH_UdsPlainText instance.
int OH_UdsHyperlink_GetDetails(OH_UdsHyperlink* pThis, OH_UdsDetails* details)Obtains the pointer to the OH_UdsDetails instance from an OH_UdsHyperlink instance.
int OH_UdsHyperlink_SetDetails(OH_UdsHyperlink* pThis, const OH_UdsDetails* details)Sets the OH_UdsDetails parameter for an OH_UdsHyperlink instance.
int OH_UdsHtml_GetDetails(OH_UdsHtml* pThis, OH_UdsDetails* details)Obtains the pointer to the OH_UdsDetails instance from an OH_UdsHtml instance.
int OH_UdsHtml_SetDetails(OH_UdsHtml* pThis, const OH_UdsDetails* details)Sets the OH_UdsDetails parameter for an OH_UdsHtml instance.
int OH_UdsAppItem_GetDetails(OH_UdsAppItem* pThis, OH_UdsDetails* details)Obtains the pointer to the OH_UdsDetails instance from an OH_UdsAppItem object.
int OH_UdsAppItem_SetDetails(OH_UdsAppItem* pThis, const OH_UdsDetails* details)Sets the OH_UdsDetails parameter for an OH_UdsAppItem instance.
int OH_UdsFileUri_GetDetails(OH_UdsFileUri* pThis, OH_UdsDetails* details)Obtains the pointer to the OH_UdsDetails instance from an OH_UdsFileUri instance.
int OH_UdsFileUri_SetDetails(OH_UdsFileUri* pThis, const OH_UdsDetails* details)Sets the OH_UdsDetails parameter for an OH_UdsFileUri instance.
int OH_UdsPixelMap_GetDetails(OH_UdsPixelMap* pThis, OH_UdsDetails* details)Obtains the pointer to the OH_UdsDetails instance from an OH_UdsPixelMap instance.
int OH_UdsPixelMap_SetDetails(OH_UdsPixelMap* pThis, const OH_UdsDetails* details)Sets the OH_UdsDetails parameter for an OH_UdsPixelMap instance.
OH_UdsDetails* OH_UdsDetails_Create()Creates an OH_UdsDetails instance and a pointer to it.
If this pointer is no longer required, use OH_UdsDetails_Destroy to destroy it. Otherwise, memory leaks may occur.
void OH_UdsDetails_Destroy(OH_UdsDetails* pThis)Destroys an OH_UdsDetails instance.
bool OH_UdsDetails_HasKey(const OH_UdsDetails* pThis, const char* key)Checks whether the OH_UdsDetails instance contains the specified key.
int OH_UdsDetails_Remove(OH_UdsDetails* pThis, const char* key)Deletes the specified KV pair from the OH_UdsDetails instance.
int OH_UdsDetails_Clear(OH_UdsDetails* pThis)Clears all data from the OH_UdsDetails instance.
int OH_UdsDetails_SetValue(OH_UdsDetails* pThis, const char* key, const char* value)Adds a KV pair to an OH_UdsDetails instance.
const char* OH_UdsDetails_GetValue(const OH_UdsDetails* pThis, const char* key)Obtains the value of a specified key from an OH_UdsDetails instance.
char** OH_UdsDetails_GetAllKeys(OH_UdsDetails* pThis, unsigned int* count)Obtains the result set of all keys from an OH_UdsDetails instance.

Function Description

OH_UdsPlainText_Create()

OH_UdsPlainText* OH_UdsPlainText_Create()

Description

Creates an OH_UdsPlainText instance and a pointer to it. If this pointer is no longer required, use OH_UdsPlainText_Destroy to destroy it. Otherwise, memory leaks may occur.

Since: 12

Returns

TypeDescription
OH_UdsPlainText*Returns a pointer to the OH_UdsPlainText instance created if the operation is successful; returns nullptr otherwise.

OH_UdsPlainText_Destroy()

void OH_UdsPlainText_Destroy(OH_UdsPlainText* pThis)

Description

Destroys an OH_UdsPlainText instance.

Since: 12

Parameters

NameDescription
OH_UdsPlainText* pThisPointer to the OH_UdsPlainText instance.

OH_UdsPlainText_GetType()

const char* OH_UdsPlainText_GetType(OH_UdsPlainText* pThis)

Description

Obtains the type ID from an OH_UdsPlainText instance.

Since: 12

Parameters

NameDescription
OH_UdsPlainText* pThisPointer to the OH_UdsPlainText instance.

Returns

TypeDescription
const char*Returns a pointer to the type ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsPlainText_GetContent()

const char* OH_UdsPlainText_GetContent(OH_UdsPlainText* pThis)

Description

Obtains the plaintext from an OH_UdsPlainText instance.

Since: 12

Parameters

NameDescription
OH_UdsPlainText* pThisPointer to the OH_UdsPlainText instance.

Returns

TypeDescription
const char*Returns a pointer to the plaintext obtained if the operation is successful; returns nullptr otherwise.

OH_UdsPlainText_GetAbstract()

const char* OH_UdsPlainText_GetAbstract(OH_UdsPlainText* pThis)

Description

Obtains the abstract from an OH_UdsPlainText instance.

Since: 12

Parameters

NameDescription
OH_UdsPlainText* pThisPointer to the OH_UdsPlainText instance.

Returns

TypeDescription
const char*Returns a pointer to the abstract obtained if the operation is successful; returns nullptr otherwise.

OH_UdsPlainText

OH_UdsPlainText_SetContent()

int OH_UdsPlainText_SetContent(OH_UdsPlainText* pThis, const char* content)

Description

Sets the plaintext content for an OH_UdsPlainText instance.

Since: 12

Parameters

NameDescription
OH_UdsPlainText* pThisPointer to the OH_UdsPlainText instance.
const char* contentPointer to the plain text content to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsPlainText_SetAbstract()

int OH_UdsPlainText_SetAbstract(OH_UdsPlainText* pThis, const char* abstract)

Description

Sets the abstract for an OH_UdsPlainText instance.

Since: 12

Parameters

NameDescription
OH_UdsPlainText* pThisPointer to the OH_UdsPlainText instance.
const char* abstractPointer to the abstract to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsHyperlink_Create()

OH_UdsHyperlink* OH_UdsHyperlink_Create()

Description

Creates an OH_UdsHyperlink instance and a pointer to it. If this pointer is no longer required, use OH_UdsHyperlink_Destroy to destroy it. Otherwise, memory leaks may occur.

Since: 12

Returns

TypeDescription
OH_UdsHyperlink*Returns a pointer to the OH_UdsHyperlink instance created if the operation is successful; returns nullptr otherwise.

OH_UdsHyperlink_Destroy()

void OH_UdsHyperlink_Destroy(OH_UdsHyperlink* pThis)

Description

Destroys an OH_UdsHyperlink instance.

Since: 12

Parameters

NameDescription
OH_UdsHyperlink* pThisPointer to the OH_UdsHyperlink instance.

OH_UdsHyperlink_GetType()

const char* OH_UdsHyperlink_GetType(OH_UdsHyperlink* pThis)

Description

Obtains the type ID from an OH_UdsHyperlink instance.

Since: 12

Parameters

NameDescription
OH_UdsHyperlink* pThisPointer to the OH_UdsHyperlink instance.

Returns

TypeDescription
const char*Returns a pointer to the type ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsHyperlink_GetUrl()

const char* OH_UdsHyperlink_GetUrl(OH_UdsHyperlink* pThis)

Description

Obtains the URL from an OH_UdsHyperlink instance.

Since: 12

Parameters

NameDescription
OH_UdsHyperlink* pThisPointer to the OH_UdsHyperlink instance.

Returns

TypeDescription
const char*Returns a pointer to the URL obtained if the operation is successful; returns nullptr otherwise.

OH_UdsHyperlink_GetDescription()

const char* OH_UdsHyperlink_GetDescription(OH_UdsHyperlink* pThis)

Description

Obtains the description from an OH_UdsHyperlink instance.

Since: 12

Parameters

NameDescription
OH_UdsHyperlink* pThisPointer to the OH_UdsHyperlink instance.

Returns

TypeDescription
const char*Returns a pointer to the description obtained if the operation is successful; returns nullptr otherwise.

OH_UdsHyperlink_SetUrl()

int OH_UdsHyperlink_SetUrl(OH_UdsHyperlink* pThis, const char* url)

Description

Sets the URL for an OH_UdsHyperlink instance.

Since: 12

Parameters

NameDescription
OH_UdsHyperlink* pThisPointer to the OH_UdsHyperlink instance.
const char* urlPointer to the URL to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsHyperlink_SetDescription()

int OH_UdsHyperlink_SetDescription(OH_UdsHyperlink* pThis, const char* description)

Description

Sets the description for an OH_UdsHyperlink instance.

Since: 12

Parameters

NameDescription
OH_UdsHyperlink* pThisPointer to the OH_UdsHyperlink instance.
const char* descriptionPointer to the description to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsHtml_Create()

OH_UdsHtml* OH_UdsHtml_Create()

Description

Creates an OH_UdsHtml instance and a pointer to it. If this pointer is no longer required, use OH_UdsHtml_Destroy to destroy it. Otherwise, memory leaks may occur.

Since: 12

Returns

TypeDescription
OH_UdsHtml*Returns a pointer to the OH_UdsHtml instance created if the operation is successful; returns nullptr otherwise.

OH_UdsHtml_Destroy()

void OH_UdsHtml_Destroy(OH_UdsHtml* pThis)

Description

Destroys an OH_UdsHtml instance.

Since: 12

Parameters

NameDescription
OH_UdsHtml* pThisPointer to the OH_UdsHtml instance.

OH_UdsHtml_GetType()

const char* OH_UdsHtml_GetType(OH_UdsHtml* pThis)

Description

Obtains the type ID from an OH_UdsHtml instance.

Since: 12

Parameters

NameDescription
OH_UdsHtml* pThisPointer to the OH_UdsHtml instance.

Returns

TypeDescription
const char*Returns a pointer to the type ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsHtml_GetContent()

const char* OH_UdsHtml_GetContent(OH_UdsHtml* pThis)

Description

Obtains the HTML content from an OH_UdsHtml instance.

Since: 12

Parameters

NameDescription
OH_UdsHtml* pThisPointer to the OH_UdsHtml instance.

Returns

TypeDescription
const char*Returns a pointer to the HTML content obtained if the operation is successful; returns nullptr otherwise.

OH_UdsHtml_GetPlainContent()

const char* OH_UdsHtml_GetPlainContent(OH_UdsHtml* pThis)

Description

Obtains the plaintext content from an OH_UdsHtml instance.

Since: 12

Parameters

NameDescription
OH_UdsHtml* pThisPointer to the OH_UdsHtml instance.

Returns

TypeDescription
const char*Returns a pointer to the plaintext obtained if the operation is successful; returns nullptr otherwise.

OH_UdsHtml_SetContent()

int OH_UdsHtml_SetContent(OH_UdsHtml* pThis, const char* content)

Description

Sets the HTML content for an OH_UdsHtml instance.

Since: 12

Parameters

NameDescription
OH_UdsHtml* pThisPointer to the OH_UdsHtml instance.
const char* contentPointer to the content in HTML format to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsHtml_SetPlainContent()

int OH_UdsHtml_SetPlainContent(OH_UdsHtml* pThis, const char* plainContent)

Description

Sets the plaintext content for an OH_UdsHtml instance.

Since: 12

Parameters

NameDescription
OH_UdsHtml* pThisPointer to the OH_UdsHtml instance.
const char* plainContentPointer to the plain text content to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsAppItem_Create()

OH_UdsAppItem* OH_UdsAppItem_Create()

Description

Creates an OH_UdsAppItem instance and a pointer to it. If this pointer is no longer required, use OH_UdsAppItem_Destroy to destroy it. Otherwise, memory leaks may occur.

Since: 12

Returns

TypeDescription
OH_UdsAppItem*Returns a pointer to the OH_UdsAppItem instance created if the operation is successful; returns nullptr otherwise.

OH_UdsAppItem_Destroy()

void OH_UdsAppItem_Destroy(OH_UdsAppItem* pThis)

Description

Destroys an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.

OH_UdsAppItem_GetType()

const char* OH_UdsAppItem_GetType(OH_UdsAppItem* pThis)

Description

Obtains the type ID from an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.

Returns

TypeDescription
const char*Returns a pointer to the type ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsAppItem_GetId()

const char* OH_UdsAppItem_GetId(OH_UdsAppItem* pThis)

Description

Obtains the application ID from an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.

Returns

TypeDescription
const char*Returns a pointer to the application ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsAppItem_GetName()

const char* OH_UdsAppItem_GetName(OH_UdsAppItem* pThis)

Description

Obtains the application name from an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.

Returns

TypeDescription
const char*Returns a pointer to the application name obtained if the operation is successful; returns nullptr otherwise.

OH_UdsAppItem_GetIconId()

const char* OH_UdsAppItem_GetIconId(OH_UdsAppItem* pThis)

Description

Obtains the image ID from an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.

Returns

TypeDescription
const char*Returns a pointer to the application icon ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsAppItem_GetLabelId()

const char* OH_UdsAppItem_GetLabelId(OH_UdsAppItem* pThis)

Description

Obtains the label ID from an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.

Returns

TypeDescription
const char*Returns a pointer to the application label ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsAppItem_GetBundleName()

const char* OH_UdsAppItem_GetBundleName(OH_UdsAppItem* pThis)

Description

Obtains the bundle name from an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.

Returns

TypeDescription
const char*Returns a pointer to the bundle name obtained if the operation is successful; returns nullptr otherwise.

OH_UdsAppItem_GetAbilityName()

const char* OH_UdsAppItem_GetAbilityName(OH_UdsAppItem* pThis)

Description

Obtains the ability name from an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.

Returns

TypeDescription
const char*Returns a pointer to the ability name obtained if the operation is successful; returns nullptr otherwise.

OH_UdsAppItem_SetId()

int OH_UdsAppItem_SetId(OH_UdsAppItem* pThis, const char* appId)

Description

Sets the application ID for an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.
const char* appIdPointer to the application ID to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsAppItem_SetName()

int OH_UdsAppItem_SetName(OH_UdsAppItem* pThis, const char* appName)

Description

Sets the application name for an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.
const char* appNamePointer to the application name to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsAppItem_SetIconId()

int OH_UdsAppItem_SetIconId(OH_UdsAppItem* pThis, const char* appIconId)

Description

Sets the icon ID for an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.
const char* appIconIdPointer to the application icon ID to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsAppItem_SetLabelId()

int OH_UdsAppItem_SetLabelId(OH_UdsAppItem* pThis, const char* appLabelId)

Description

Sets the label ID for an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.
const char* appLabelIdPointer to the application label ID to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsAppItem_SetBundleName()

int OH_UdsAppItem_SetBundleName(OH_UdsAppItem* pThis, const char* bundleName)

Description

Sets the bundle name for an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.
const char* bundleNamePointer to the bundle name to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsAppItem_SetAbilityName()

int OH_UdsAppItem_SetAbilityName(OH_UdsAppItem* pThis, const char* abilityName)

Description

Sets the ability name for an OH_UdsAppItem instance.

Since: 12

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.
const char* abilityNamePointer to the ability name to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsFileUri_Create()

OH_UdsFileUri* OH_UdsFileUri_Create()

Description

Creates an OH_UdsFileUri instance and a pointer to it. If this pointer is no longer required, use OH_UdsFileUri_Destroy to destroy it. Otherwise, memory leaks may occur.

Since: 13

Returns

TypeDescription
OH_UdsFileUri*Returns a pointer to the OH_UdsFileUri instance if the operation is successful; returns nullptr otherwise.

OH_UdsFileUri_Destroy()

void OH_UdsFileUri_Destroy(OH_UdsFileUri* pThis)

Description

Destroys an OH_UdsFileUri instance.

Since: 13

Parameters

NameDescription
OH_UdsFileUri* pThisPointer to the OH_UdsFileUri instance.

OH_UdsFileUri_GetType()

const char* OH_UdsFileUri_GetType(OH_UdsFileUri* pThis)

Description

Obtains the type ID from an OH_UdsFileUri instance.

Since: 13

Parameters

NameDescription
OH_UdsFileUri* pThisPointer to the OH_UdsFileUri instance.

Returns

TypeDescription
const char*Returns a pointer to the type ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsFileUri_GetFileUri()

const char* OH_UdsFileUri_GetFileUri(OH_UdsFileUri* pThis)

Description

Obtains the file URI from an OH_UdsFileUri instance.

Since: 13

Parameters

NameDescription
OH_UdsFileUri* pThisPointer to the OH_UdsFileUri instance.

Returns

TypeDescription
const char*Returns a pointer to the file URI obtained if the operation is successful; returns nullptr otherwise.

OH_UdsFileUri_GetFileType()

const char* OH_UdsFileUri_GetFileType(OH_UdsFileUri* pThis)

Description

Obtains the file type from an OH_UdsFileUri instance.

Since: 13

Parameters

NameDescription
OH_UdsFileUri* pThisPointer to the OH_UdsFileUri instance.

Returns

TypeDescription
const char*Returns a pointer to the file type obtained if the operation is successful; returns nullptr otherwise.

OH_UdsFileUri_SetFileUri()

int OH_UdsFileUri_SetFileUri(OH_UdsFileUri* pThis, const char* fileUri)

Description

Sets the URI information for an OH_UdsFileUri instance.

Since: 13

Parameters

NameDescription
OH_UdsFileUri* pThisPointer to the OH_UdsFileUri instance.
const char* fileUriPointer to the file URI to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsFileUri_SetFileType()

int OH_UdsFileUri_SetFileType(OH_UdsFileUri* pThis, const char* fileType)

Description

Sets the file type for an OH_UdsFileUri instance.

Since: 13

Parameters

NameDescription
OH_UdsFileUri* pThisPointer to the OH_UdsFileUri instance.
const char* fileTypePointer to the file type to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsPixelMap_Create()

OH_UdsPixelMap* OH_UdsPixelMap_Create()

Description

Creates an OH_UdsPixelMap instance and a pointer to it. If this pointer is no longer required, use OH_UdsPixelMap_Destroy to destroy it. Otherwise, memory leaks may occur.

Since: 13

Returns

TypeDescription
OH_UdsPixelMap*Returns a pointer to the OH_UdsPixelMap instance if the operation is successful; returns nullptr otherwise.

OH_UdsPixelMap_Destroy()

void OH_UdsPixelMap_Destroy(OH_UdsPixelMap* pThis)

Description

Destroys an OH_UdsPixelMap instance.

Since: 13

Parameters

NameDescription
OH_UdsPixelMap* pThisPointer to the OH_UdsPixelMap instance.

OH_UdsPixelMap_GetType()

const char* OH_UdsPixelMap_GetType(OH_UdsPixelMap* pThis)

Description

Obtains the type ID from an OH_UdsPixelMap instance.

Since: 13

Parameters

NameDescription
OH_UdsPixelMap* pThisPointer to the OH_UdsPixelMap instance.

Returns

TypeDescription
const char*Returns a pointer to the type ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsPixelMap_GetPixelMap()

void OH_UdsPixelMap_GetPixelMap(OH_UdsPixelMap* pThis, OH_PixelmapNative* pixelmapNative)

Description

Obtains the pointer to the OH_PixelmapNative instance from an OH_UdsPixelMap instance.

Since: 13

Parameters

NameDescription
OH_UdsPixelMap* pThisPointer to the OH_UdsPixelMap instance.
OH_PixelmapNative* pixelmapNativePointer to the OH_PixelmapNative instance.

OH_UdsPixelMap_SetPixelMap()

int OH_UdsPixelMap_SetPixelMap(OH_UdsPixelMap* pThis, OH_PixelmapNative* pixelmapNative)

Description

Sets the pixel image content for an OH_UdsPixelMap instance.

Since: 13

Parameters

NameDescription
OH_UdsPixelMap* pThisPointer to the OH_UdsPixelMap instance.
OH_PixelmapNative* pixelmapNativePointer to the OH_PixelmapNative instance.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsArrayBuffer_Create()

OH_UdsArrayBuffer* OH_UdsArrayBuffer_Create()

Description

Creates an OH_UdsArrayBuffer instance and a pointer to it. If this pointer is no longer required, use OH_UdsArrayBuffer_Destroy to destroy it. Otherwise, memory leaks may occur.

Since: 13

Returns

TypeDescription
OH_UdsArrayBuffer*Returns a pointer to the OH_UdsArrayBuffer instance if the operation is successful; returns nullptr otherwise.

OH_UdsArrayBuffer_Destroy()

int OH_UdsArrayBuffer_Destroy(OH_UdsArrayBuffer* buffer)

Description

Destroys an OH_UdsArrayBuffer instance.

Since: 13

Parameters

NameDescription
OH_UdsArrayBuffer* bufferPointer to the OH_UdsArrayBuffer instance.

Returns

TypeDescription
intError codes. For details, see OH_UdsArrayBuffer.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsArrayBuffer_SetData()

int OH_UdsArrayBuffer_SetData(OH_UdsArrayBuffer* buffer, unsigned char* data, unsigned int len)

Description

Sets the data content for an OH_UdsArrayBuffer instance.

Since: 13

Parameters

NameDescription
OH_UdsArrayBuffer* bufferPointer to the OH_UdsArrayBuffer instance.
unsigned char* dataPointer to the ArrayBuffer data to set.
unsigned int lenLength of the ArrayBuffer data to set.

Returns

TypeDescription
intError codes. For details, see OH_UdsArrayBuffer.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsArrayBuffer_GetData()

int OH_UdsArrayBuffer_GetData(OH_UdsArrayBuffer* buffer, unsigned char** data, unsigned int* len)

Description

Obtains the custom ArrayBuffer data from an OH_UdsArrayBuffer instance.

Since: 13

Parameters

NameDescription
OH_UdsArrayBuffer* bufferPointer to the OH_UdsArrayBuffer instance.
unsigned char** dataDouble pointer to the ArrayBuffer data obtained.
unsigned int* lenPointer to the length of the ArrayBuffer data obtained.

Returns

TypeDescription
intError codes. For details, see OH_UdsArrayBuffer.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsContentForm_Create()

OH_UdsContentForm* OH_UdsContentForm_Create()

Description

Creates an OH_UdsContentForm instance and a pointer to it.

Since: 14

Returns

TypeDescription
OH_UdsContentForm*Returns a pointer to the OH_UdsContentForm instance if the operation is successful; returns nullptr otherwise.

OH_UdsContentForm_Destroy()

void OH_UdsContentForm_Destroy(OH_UdsContentForm* pThis)

Description

Destroys an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.

OH_UdsContentForm_GetType()

const char* OH_UdsContentForm_GetType(OH_UdsContentForm* pThis)

Description

Obtains the type ID from an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.

Returns

TypeDescription
const char*Returns a pointer to the type ID obtained if the operation is successful; returns nullptr otherwise.

OH_UdsContentForm_GetThumbData()

int OH_UdsContentForm_GetThumbData(OH_UdsContentForm* pThis, unsigned char** thumbData, unsigned int* len)

Description

Obtains the image data from an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.
unsigned char** thumbDataDouble pointer to the binary image data obtained.
unsigned int* lenPointer to the length of the binary image data obtained.

Returns

TypeDescription
intError codes. For details, see OH_UdsContentForm.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.
Returns UDMF_ERR if an internal system error occurs.

OH_UdsContentForm_GetDescription()

const char* OH_UdsContentForm_GetDescription(OH_UdsContentForm* pThis)

Description

Obtains the description from an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.

Returns

TypeDescription
const char*Returns a pointer to the description string obtained if the operation is successful; returns nullptr otherwise.

OH_UdsContentForm_GetTitle()

const char* OH_UdsContentForm_GetTitle(OH_UdsContentForm* pThis)

Description

Obtains the title from an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.

Returns

TypeDescription
const char*Returns a pointer to the title string obtained if the operation is successful; returns nullptr otherwise.

OH_UdsContentForm_GetAppIcon()

int OH_UdsContentForm_GetAppIcon(OH_UdsContentForm* pThis, unsigned char** appIcon, unsigned int* len)

Description

Obtains the application icon data from an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.
unsigned char** appIconDouble pointer to the binary application icon data obtained.
unsigned int* lenPointer to the length of the binary application icon data obtained.

Returns

TypeDescription
intError codes. For details, see OH_UdsContentForm.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.
Returns UDMF_ERR if an internal system error occurs.

OH_UdsContentForm_GetAppName()

const char* OH_UdsContentForm_GetAppName(OH_UdsContentForm* pThis)

Description

Obtains the application name from an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.

Returns

TypeDescription
const char*Returns a pointer to the application name obtained if the operation is successful; returns nullptr otherwise.

OH_UdsContentForm_GetLinkUri()

const char* OH_UdsContentForm_GetLinkUri(OH_UdsContentForm* pThis)

Description

Obtains the hyperlink from an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.

Returns

TypeDescription
const char*Returns a pointer to the hyperlink obtained if the operation is successful; returns nullptr otherwise.

OH_UdsContentForm_SetThumbData()

int OH_UdsContentForm_SetThumbData(OH_UdsContentForm* pThis, const unsigned char* thumbData, unsigned int len)

Description

Sets the image data for an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.
const unsigned char* thumbDataPointer to the binary image data to set.
unsigned int lenLength of the binary image data to set.

Returns

TypeDescription
intError codes. For details, see OH_UdsContentForm.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsContentForm_SetDescription()

int OH_UdsContentForm_SetDescription(OH_UdsContentForm* pThis, const char* description)

Description

Sets the description for an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.
const char* descriptionPointer to the description to set.

Returns

TypeDescription
intError codes. For details, see OH_UdsContentForm.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsContentForm_SetTitle()

int OH_UdsContentForm_SetTitle(OH_UdsContentForm* pThis, const char* title)

Description

Sets the title for an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.
const char* titlePointer to the title to set.

Returns

TypeDescription
intError codes. For details, see OH_UdsContentForm.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsContentForm_SetAppIcon()

int OH_UdsContentForm_SetAppIcon(OH_UdsContentForm* pThis, const unsigned char* appIcon, unsigned int len)

Description

Sets the application icon data for an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.
const unsigned char* appIconPointer to the binary application icon data to set.
unsigned int lenLength of the binary application icon data to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsContentForm_SetAppName()

int OH_UdsContentForm_SetAppName(OH_UdsContentForm* pThis, const char* appName)

Description

Sets the application name for an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.
const char* appNamePointer to the application name to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsContentForm_SetLinkUri()

int OH_UdsContentForm_SetLinkUri(OH_UdsContentForm* pThis, const char* linkUri)

Description

Sets the hyperlink for an OH_UdsContentForm instance.

Since: 14

Parameters

NameDescription
OH_UdsContentForm* pThisPointer to the OH_UdsContentForm instance.
const char* linkUriPointer to the hyperlink to set.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsPlainText_GetDetails()

int OH_UdsPlainText_GetDetails(OH_UdsPlainText* pThis, OH_UdsDetails* details)

Description

Obtains the pointer to the OH_UdsDetails instance from an OH_UdsPlainText instance.

Since: 22

Parameters

NameDescription
OH_UdsPlainText* pThisPointer to the OH_UdsPlainText instance.
OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsPlainText_SetDetails()

int OH_UdsPlainText_SetDetails(OH_UdsPlainText* pThis, const OH_UdsDetails* details)

Description

Sets the OH_UdsDetails parameter for an OH_UdsPlainText instance.

Since: 22

Parameters

NameDescription
OH_UdsPlainText* pThisPointer to the OH_UdsPlainText instance.
const OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsHyperlink_GetDetails()

int OH_UdsHyperlink_GetDetails(OH_UdsHyperlink* pThis, OH_UdsDetails* details)

Description

Obtains the pointer to the OH_UdsDetails instance from an OH_UdsHyperlink instance.

Since: 22

Parameters

NameDescription
OH_UdsHyperlink* pThisPointer to the OH_UdsHyperlink instance.
OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsHyperlink_SetDetails()

int OH_UdsHyperlink_SetDetails(OH_UdsHyperlink* pThis, const OH_UdsDetails* details)

Description

Sets the OH_UdsDetails parameter for an OH_UdsHyperlink instance.

Since: 22

Parameters

NameDescription
OH_UdsHyperlink* pThisPointer to the OH_UdsHyperlink instance.
const OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsHtml_GetDetails()

int OH_UdsHtml_GetDetails(OH_UdsHtml* pThis, OH_UdsDetails* details)

Description

Obtains the pointer to the OH_UdsDetails instance from an OH_UdsHtml instance.

Since: 22

Parameters

NameDescription
OH_UdsHtml* pThisPointer to the OH_UdsHtml instance.
OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsHtml_SetDetails()

int OH_UdsHtml_SetDetails(OH_UdsHtml* pThis, const OH_UdsDetails* details)

Description

Sets the OH_UdsDetails parameter for an OH_UdsHtml instance.

Since: 22

Parameters

NameDescription
OH_UdsHtml* pThisPointer to the OH_UdsHtml instance.
const OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsAppItem_GetDetails()

int OH_UdsAppItem_GetDetails(OH_UdsAppItem* pThis, OH_UdsDetails* details)

Description

Obtains the pointer to the OH_UdsDetails instance from an OH_UdsAppItem object.

Since: 22

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.
OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsAppItem_SetDetails()

int OH_UdsAppItem_SetDetails(OH_UdsAppItem* pThis, const OH_UdsDetails* details)

Description

Sets the OH_UdsDetails parameter for an OH_UdsAppItem instance.

Since: 22

Parameters

NameDescription
OH_UdsAppItem* pThisPointer to the OH_UdsAppItem instance.
const OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsFileUri_GetDetails()

int OH_UdsFileUri_GetDetails(OH_UdsFileUri* pThis, OH_UdsDetails* details)

Description

Obtains the pointer to the OH_UdsDetails instance from an OH_UdsFileUri instance.

Since: 22

Parameters

NameDescription
OH_UdsFileUri* pThisPointer to the OH_UdsFileUri instance.
OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsFileUri_SetDetails()

int OH_UdsFileUri_SetDetails(OH_UdsFileUri* pThis, const OH_UdsDetails* details)

Description

Sets the OH_UdsDetails parameter for an OH_UdsFileUri instance.

Since: 22

Parameters

NameDescription
OH_UdsFileUri* pThisPointer to the OH_UdsFileUri instance.
const OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsPixelMap_GetDetails()

int OH_UdsPixelMap_GetDetails(OH_UdsPixelMap* pThis, OH_UdsDetails* details)

Description

Obtains the pointer to the OH_UdsDetails instance from an OH_UdsPixelMap instance.

Since: 22

Parameters

NameDescription
OH_UdsPixelMap* pThisPointer to the OH_UdsPixelMap instance.
OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsPixelMap_SetDetails()

int OH_UdsPixelMap_SetDetails(OH_UdsPixelMap* pThis, const OH_UdsDetails* details)

Description

Sets the OH_UdsDetails parameter for an OH_UdsPixelMap instance.

Since: 22

Parameters

NameDescription
OH_UdsPixelMap* pThisPointer to the OH_UdsPixelMap instance.
const OH_UdsDetails* detailsPointer to the OH_UdsDetails instance, which cannot be null.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsDetails_Create()

OH_UdsDetails* OH_UdsDetails_Create()

Description

Creates an OH_UdsDetails instance and a pointer to it.

If this pointer is no longer required, use OH_UdsDetails_Destroy to destroy it. Otherwise, memory leaks may occur.

Since: 22

Returns

TypeDescription
OH_UdsDetails*Returns a pointer to the OH_UdsDetails instance if the operation is successful; returns nullptr otherwise.

OH_UdsDetails_Destroy()

void OH_UdsDetails_Destroy(OH_UdsDetails* pThis)

Description

Destroys an OH_UdsDetails instance.

Since: 22

Parameters

NameDescription
OH_UdsDetails* pThisPointer to the OH_UdsDetails instance.

OH_UdsDetails_HasKey()

bool OH_UdsDetails_HasKey(const OH_UdsDetails* pThis, const char* key)

Description

Checks whether the OH_UdsDetails instance contains the specified key.

Since: 22

Parameters

NameDescription
const OH_UdsDetails* pThisPointer to the OH_UdsDetails instance.
const char* keyKey in a KV pair of the dictionary type.

Returns

TypeDescription
boolReturns a check result. The value false indicates that the specified key does not exist, and true indicates the opposite.

OH_UdsDetails_Remove()

int OH_UdsDetails_Remove(OH_UdsDetails* pThis, const char* key)

Description

Deletes the specified KV pair from the OH_UdsDetails instance.

Since: 22

Parameters

NameDescription
OH_UdsDetails* pThisPointer to the OH_UdsDetails instance.
const char* keyKey in a KV pair of the dictionary type.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsDetails_Clear()

int OH_UdsDetails_Clear(OH_UdsDetails* pThis)

Description

Clears all data from the OH_UdsDetails instance.

Since: 22

Parameters

NameDescription
OH_UdsDetails* pThisPointer to the OH_UdsDetails instance.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsDetails_SetValue()

int OH_UdsDetails_SetValue(OH_UdsDetails* pThis, const char* key, const char* value)

Description

Adds a KV pair to an OH_UdsDetails instance.

Since: 22

Parameters

NameDescription
OH_UdsDetails* pThisPointer to the OH_UdsDetails instance.
const char* keyKey in a KV pair of the dictionary type.
const char* valueValue in a KV pair of the dictionary type.

Returns

TypeDescription
intError codes. For details, see Udmf_ErrCode.
Returns UDMF_E_OK if the operation is successful.
Returns UDMF_E_INVALID_PARAM if an invalid parameter is passed in.

OH_UdsDetails_GetValue()

const char* OH_UdsDetails_GetValue(const OH_UdsDetails* pThis, const char* key)

Description

Obtains the value of a specified key from an OH_UdsDetails instance.

Since: 22

Parameters

NameDescription
const OH_UdsDetails* pThisPointer to the OH_UdsDetails instance.
const char* keyKey in a KV pair of the dictionary type.

Returns

TypeDescription
const char*Returns a pointer to the value of the dictionary type if the input parameters are valid; returns nullptr otherwise.

OH_UdsDetails_GetAllKeys()

char** OH_UdsDetails_GetAllKeys(OH_UdsDetails* pThis, unsigned int* count)

Description

Obtains the result set of all keys from an OH_UdsDetails instance.

Since: 22

Parameters

NameDescription
OH_UdsDetails* pThisPointer to the OH_UdsDetails instance.
unsigned int* countPointer to the length of the result set.

Returns

TypeDescription
char**Returns a double pointer to the result set if the operation is successful; returns nullptr otherwise.
When OH_UdsDetails_Destroy is used to destroy the OH_UdsDetails instance, the return value is also released.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 js-apis-distributedKVStore-sys

openharmony 鸿蒙 capi-oh-preferences-h

openharmony 鸿蒙 capi-udmf-oh-udshyperlink

openharmony 鸿蒙 js-apis-data-dataSharePredicates

openharmony 鸿蒙 capi-udmf-oh-udsappitem

openharmony 鸿蒙 capi-rdb-oh-data-vbuckets

openharmony 鸿蒙 capi-rdb-oh-predicates

openharmony 鸿蒙 capi-rdb-oh-data-value

openharmony 鸿蒙 capi-preferences-oh-preferencespair

openharmony 鸿蒙 errorcode-datashare

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/p9jd5Sex