1e41f4b71Sopenharmony_ci# utd.h
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Overview
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciDefines APIs and structs related to the Uniform Type Descriptors (UTDs).
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci**File to include**: <database/udmf/utd.h>
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci**Library**: libudmf.so
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci**System capability**: SystemCapability.DistributedDataManager.UDMF.Core
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci**Since**: 12
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci**Related module**: [UDMF](_u_d_m_f.md)
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci## Summary
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci### Types
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci| Name | Description | 
25e41f4b71Sopenharmony_ci| -------- | -------- |
26e41f4b71Sopenharmony_ci| typedef struct [OH_Utd](_u_d_m_f.md#oh_utd) [OH_Utd](_u_d_m_f.md#oh_utd) | Defines a struct for a UTD. | 
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci### Functions
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci| Name | Description | 
32e41f4b71Sopenharmony_ci| -------- | -------- |
33e41f4b71Sopenharmony_ci| [OH_Utd](_u_d_m_f.md#oh_utd) \* [OH_Utd_Create](_u_d_m_f.md#oh_utd_create) (const char \*typeId) | Creates an [OH_Utd](_u_d_m_f.md#oh_utd) instance and a pointer to it. | 
34e41f4b71Sopenharmony_ci| void [OH_Utd_Destroy](_u_d_m_f.md#oh_utd_destroy) ([OH_Utd](_u_d_m_f.md#oh_utd) \*pThis) | Destroys an [OH_Utd](_u_d_m_f.md#oh_utd) instance. | 
35e41f4b71Sopenharmony_ci| const char \* [OH_Utd_GetTypeId](_u_d_m_f.md#oh_utd_gettypeid) ([OH_Utd](_u_d_m_f.md#oh_utd) \*pThis) | Obtains the type ID from an [OH_Utd](_u_d_m_f.md#oh_utd) instance. | 
36e41f4b71Sopenharmony_ci| const char \* [OH_Utd_GetDescription](_u_d_m_f.md#oh_utd_getdescription) ([OH_Utd](_u_d_m_f.md#oh_utd) \*pThis) | Obtains the description from an [OH_Utd](_u_d_m_f.md#oh_utd) instance. | 
37e41f4b71Sopenharmony_ci| const char \* [OH_Utd_GetReferenceUrl](_u_d_m_f.md#oh_utd_getreferenceurl) ([OH_Utd](_u_d_m_f.md#oh_utd) \*pThis) | Obtains the URL from an [OH_Utd](_u_d_m_f.md#oh_utd) instance. | 
38e41f4b71Sopenharmony_ci| const char \* [OH_Utd_GetIconFile](_u_d_m_f.md#oh_utd_geticonfile) ([OH_Utd](_u_d_m_f.md#oh_utd) \*pThis) | Obtains the path of the default icon file from an [OH_Utd](_u_d_m_f.md#oh_utd) instance. | 
39e41f4b71Sopenharmony_ci| const char \*\* [OH_Utd_GetBelongingToTypes](_u_d_m_f.md#oh_utd_getbelongingtotypes) ([OH_Utd](_u_d_m_f.md#oh_utd) \*pThis, unsigned int \*count) | Obtains the relationships between the data in an [OH_Utd](_u_d_m_f.md#oh_utd) instance. | 
40e41f4b71Sopenharmony_ci| const char \*\* [OH_Utd_GetFilenameExtensions](_u_d_m_f.md#oh_utd_getfilenameextensions) ([OH_Utd](_u_d_m_f.md#oh_utd) \*pThis, unsigned int \*count) | Obtains the file name extensions associated with an [OH_Utd](_u_d_m_f.md#oh_utd) instance. | 
41e41f4b71Sopenharmony_ci| const char \*\* [OH_Utd_GetMimeTypes](_u_d_m_f.md#oh_utd_getmimetypes) ([OH_Utd](_u_d_m_f.md#oh_utd) \*pThis, unsigned int \*count) | Obtains the MIME types associated with an [OH_Utd](_u_d_m_f.md#oh_utd) instance. | 
42e41f4b71Sopenharmony_ci| const char \*\* [OH_Utd_GetTypesByFilenameExtension](_u_d_m_f.md#oh_utd_gettypesbyfilenameextension) (const char \*extension, unsigned int \*count) | Obtains the uniform data types based on the file name extensions. | 
43e41f4b71Sopenharmony_ci| const char \*\* [OH_Utd_GetTypesByMimeType](_u_d_m_f.md#oh_utd_gettypesbymimetype) (const char \*mimeType, unsigned int \*count) | Obtains the uniform data types based on the MIME types. | 
44e41f4b71Sopenharmony_ci| bool [OH_Utd_BelongsTo](_u_d_m_f.md#oh_utd_belongsto) (const char \*srcTypeId, const char \*destTypeId) | Checks whether a UTD belongs to the target UTD. | 
45e41f4b71Sopenharmony_ci| bool [OH_Utd_IsLower](_u_d_m_f.md#oh_utd_islower) (const char \*srcTypeId, const char \*destTypeId) | Checks whether a UTD is a lower-level type of the target UTD. For example, **TYPE_SCRIPT** is a lower-level type of **SOURCE_CODE**, and **TYPE_SCRIPT** and **SOURCE_CODE** are lower-level types of **PLAIN_TEXT**. | 
46e41f4b71Sopenharmony_ci| bool [OH_Utd_IsHigher](_u_d_m_f.md#oh_utd_ishigher) (const char \*srcTypeId, const char \*destTypeId) | Checks whether a UTD is a higher-level type of the target UTD. For example, **SOURCE_CODE** is a higher-level type of **TYPE_SCRIPT**, and **PLAIN_TEXT** is a higher-level type of **SOURCE_CODE** and **TYPE_SCRIPT**. | 
47e41f4b71Sopenharmony_ci| bool [OH_Utd_Equals](_u_d_m_f.md#oh_utd_equals) ([OH_Utd](_u_d_m_f.md#oh_utd) \*utd1, [OH_Utd](_u_d_m_f.md#oh_utd) \*utd2) | Checks whether two UTDs are the same. | 
48e41f4b71Sopenharmony_ci| void [OH_Utd_DestroyStringList](_u_d_m_f.md#oh_utd_destroystringlist) (const char \*\*list, unsigned int count) | Destroys a UTD list. | 
49