• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup UDMF
18  * @{
19  *
20  * @brief The Unified Data Management Framework(UDMF) aims to define various standards
21  * for data across applications, devices, and platforms, providing a unified OpenHarmony
22  * data language and standardized data access and reading paths.
23  *
24  * @since 12
25  */
26 
27 /**
28  * @file udmf.h
29  *
30  * @brief Provides unified data management framework related functions and enumerations.
31  *
32  * @kit ArkData
33  * @library libudmf.so
34  * @syscap SystemCapability.DistributedDataManager.UDMF.Core
35  *
36  * @since 12
37  */
38 
39 #ifndef UDMF_H
40 #define UDMF_H
41 
42 #include <inttypes.h>
43 #include <stdbool.h>
44 #include "uds.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /**
51  * @brief The key minimum memory space size of Unified Data.
52  *
53  * @since 12
54  */
55 #define UDMF_KEY_BUFFER_LEN (512)
56 
57 /**
58  * @brief Describe the intention type of the udmf.
59  *
60  * @since 12
61  */
62 typedef enum Udmf_Intention {
63     /**
64      * @brief The intention is drag.
65      */
66     UDMF_INTENTION_DRAG = 0,
67     /**
68      * @brief The intention is pasteboard.
69      */
70     UDMF_INTENTION_PASTEBOARD,
71     /**
72      * @brief The intention is data hub.
73      *
74      * @since 20
75      */
76     UDMF_INTENTION_DATA_HUB,
77     /**
78      * @brief The intention is system share.
79      *
80      * @since 20
81      */
82     UDMF_INTENTION_SYSTEM_SHARE,
83     /**
84      * @brief The intention is picker.
85      *
86      * @since 20
87      */
88     UDMF_INTENTION_PICKER,
89     /**
90      * @brief The intention is menu.
91      *
92      * @since 20
93      */
94     UDMF_INTENTION_MENU,
95 } Udmf_Intention;
96 
97 /**
98  * @brief Describe intra-device usage range type enumeration.
99  *
100  * @since 12
101  */
102 typedef enum Udmf_ShareOption {
103     /**
104      * @brief Invalid share option.
105      */
106     SHARE_OPTIONS_INVALID = 0,
107     /**
108      * @brief Allowed to be used in the same application on this device.
109      */
110     SHARE_OPTIONS_IN_APP,
111     /**
112      * @brief Allowed to be used in the cross application on this device.
113      */
114     SHARE_OPTIONS_CROSS_APP
115 } Udmf_ShareOption;
116 
117 /**
118  * @brief Describe the types of file conflict options when getting data from the udmf.
119  *
120  * @since 15
121  */
122 typedef enum Udmf_FileConflictOptions {
123     /**
124      * @brief Overwrite when dest uri has file with same name.
125      */
126     UDMF_OVERWRITE = 0,
127     /**
128      * @brief Skip when dest uri has file with same name.
129      */
130     UDMF_SKIP = 1,
131 } Udmf_FileConflictOptions;
132 
133 /**
134  * @brief Describe the types of progress indicator when getting data from the udmf.
135  *
136  * @since 15
137 */
138 typedef enum Udmf_ProgressIndicator {
139     /**
140      * @brief Getting data without system default progress indicator.
141     */
142     UDMF_NONE = 0,
143     /**
144      * @brief Getting data with system default progress indicator.
145     */
146     UDMF_DEFAULT = 1
147 } Udmf_ProgressIndicator;
148 
149 /**
150  * @brief Describe the visibility range of data
151  *
152  * @since 20
153  */
154 typedef enum Udmf_Visibility {
155     /**
156      * @brief The visibility level that specifies that any hap or native can be obtained.
157      */
158     UDMF_ALL = 0,
159 
160     /**
161      * @brief The visibility level that specifies that only data providers can be obtained.
162      */
163     UDMF_OWN_PROCESS
164 } Udmf_Visibility;
165 
166 /**
167  * @brief Describes the unified data type.
168  *
169  * @since 12
170  */
171 typedef struct OH_UdmfData OH_UdmfData;
172 
173 /**
174  * @brief Describes the record type in the unified data.
175  *
176  * @since 12
177  */
178 typedef struct OH_UdmfRecord OH_UdmfRecord;
179 
180 /**
181  * @brief Defines the data provider.
182  *
183  * @since 13
184  */
185 typedef struct OH_UdmfRecordProvider OH_UdmfRecordProvider;
186 
187 /**
188  * @brief Describes some property parameters of unified data.
189  *
190  * @since 12
191  */
192 typedef struct OH_UdmfProperty OH_UdmfProperty;
193 
194 /**
195  * @brief Represents the udmf progress information.
196  *
197  * @since 15
198 */
199 typedef struct OH_Udmf_ProgressInfo OH_Udmf_ProgressInfo;
200 
201 /**
202  * @brief Represents the parameters of udmf get data with progress info.
203  *
204  * @since 15
205 */
206 typedef struct OH_UdmfGetDataParams OH_UdmfGetDataParams;
207 
208 /**
209  * @brief Defines the callback function used to return the progress information and data.
210  *
211  * @param progressInfo The progress information notified to Application.
212  * @param data Represents the unified data.
213  * @since 15
214 */
215 typedef void (*OH_Udmf_DataProgressListener)(OH_Udmf_ProgressInfo* progressInfo, OH_UdmfData* data);
216 
217 /**
218  * @brief Describes the optional arguments of data operation
219  *
220  * @since 20
221  */
222 typedef struct OH_UdmfOptions OH_UdmfOptions;
223 
224 /**
225  * @brief Indicates data loading params.
226  *
227  * @since 20
228  */
229 typedef struct OH_UdmfDataLoadParams OH_UdmfDataLoadParams;
230 
231 /**
232  * @brief Indicates data loading information.
233  *
234  * @since 20
235  */
236 typedef struct OH_UdmfDataLoadInfo OH_UdmfDataLoadInfo;
237 
238 /**
239  * @brief Indicates the callback function for loading data.
240  *
241  * @param acceptableInfo Indicates the type and number of data that can be accepted by the receiver.
242  * @return Returns the data to be loaded.
243  * @since 20
244  */
245 typedef OH_UdmfData* (*OH_Udmf_DataLoadHandler)(OH_UdmfDataLoadInfo* acceptableInfo);
246 
247 /**
248  * @brief Creation a pointer to the instance of the {@link OH_UdmfData}.
249  *
250  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdmfData}
251  * structure is returned. If the operation is failed, nullptr is returned.
252  * @see OH_UdmfData.
253  * @since 12
254  */
255 OH_UdmfData* OH_UdmfData_Create();
256 
257 /**
258  * @brief Destroy a pointer that points to the {@link OH_UdmfData} instance.
259  *
260  * @param pThis Represents a pointer to an instance of {@link OH_UdmfData}.
261  * @see OH_UdmfData.
262  * @since 12
263  */
264 void OH_UdmfData_Destroy(OH_UdmfData* pThis);
265 
266 /**
267  * @brief Add one {OH_UdmfRecord} record to the {@link OH_UdmfData} data.
268  *
269  * @param pThis Represents a pointer to an instance of {@link OH_UdmfData}.
270  * @param record Represents a pointer to an instance of {@link OH_UdmfRecord}.
271  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
272  *         {@link UDMF_E_OK} success.
273  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
274  * @see OH_UdmfData Udmf_ErrCode.
275  * @since 12
276  */
277 int OH_UdmfData_AddRecord(OH_UdmfData* pThis, OH_UdmfRecord* record);
278 
279 /**
280  * @brief Check whether the type exists in the {@link OH_UdmfData} data.
281  *
282  * @param pThis Represents a pointer to an instance of {@link OH_UdmfData}.
283  * @param type Represents a string pointer of the type.
284  * @return Returns the status of finding type.
285  *         {@code false} is not existed.
286  *         {@code true} is existed.
287  * @see OH_UdmfData.
288  * @since 12
289  */
290 bool OH_UdmfData_HasType(OH_UdmfData* pThis, const char* type);
291 
292 /**
293  * @brief Get all types in the {@link OH_UdmfData} data.
294  *
295  * @param pThis Represents a pointer to an instance of {@link OH_UdmfData}.
296  * @param count Represents the types count that is a output param.
297  * @return Returns string array that in {@link OH_UdmfData} when input parameters valid,
298  * otherwise return nullptr.
299  * @see OH_UdmfData.
300  * @since 12
301  */
302 char** OH_UdmfData_GetTypes(OH_UdmfData* pThis, unsigned int* count);
303 
304 /**
305  * @brief Get all records in the {@link OH_UdmfData} data.
306  *
307  * @param pThis Represents a pointer to an instance of {@link OH_UdmfData}.
308  * @param count Represents the records count that is a output param.
309  * @return Returns {@link OH_UdmfRecord} pointer array when input parameters valid, otherwise return nullptr.
310  * @see OH_UdmfData OH_UdmfRecord.
311  * @since 12
312  */
313 OH_UdmfRecord** OH_UdmfData_GetRecords(OH_UdmfData* pThis, unsigned int* count);
314 
315 /**
316  * @brief Defines the callback function used free the context.
317  * @param context Pointer to the context which is to be free.
318  * @since 13
319  */
320 typedef void (*UdmfData_Finalize)(void* context);
321 
322 /**
323  * @brief Creates an {@link OH_UdmfRecordProvider} instance.
324  *
325  * @return Returns the pointer to the {@link OH_UdmfRecordProvider} instance created if the operation is successful.
326  * Returns nullptr if the memory is not enough.
327  * @see OH_UdmfRecordProvider.
328  * @since 13
329  */
330 OH_UdmfRecordProvider* OH_UdmfRecordProvider_Create();
331 
332 /**
333  * @brief Destroy an {@link OH_UdmfRecordProvider} instance.
334  *
335  * @param subscriber Pointer to the {@link OH_UdmfRecordProvider} instance to destroy.
336  * @return Returns the status code of the execution. For details, see {@link Udmf_ErrCode}.
337  *         Returns {@link UDMF_E_OK} if the operation is successful.
338  *         Returns {@link UDMF_E_INVALID_PARAM} if invalid args are detected.
339  * @see OH_UdmfRecordProvider Udmf_ErrCode.
340  * @since 13
341  */
342 int OH_UdmfRecordProvider_Destroy(OH_UdmfRecordProvider* provider);
343 
344 /**
345  * @brief Defines a callback function used to obtain data by type.
346  *
347  * @param context Pointer to the context set by {@link OH_UdmfRecordProvider_SetData}.
348  * @param type Pointer to the type of data to obtain. For details, see {@link udmf_meta.h}.
349  * @return Returns the data content.
350  * @since 13
351  */
352 typedef void* (*OH_UdmfRecordProvider_GetData)(void* context, const char* type);
353 
354 /**
355  * @brief Sets a callback function to obtain data.
356  *
357  * @param provider Pointer to the {@link OH_UdmfRecordProvider} instance.
358  * @param context Pointer to the context set, which is the first parameter in OH_UdmfRecordProvider_GetData.
359  * @param callback Callback to set. For details, see {@link OH_UdmfRecordProvider_GetData}.
360  * @param finalize Optional callback that can free context when destroy provider.
361  *         For details, see {@link UdmfData_Finalize}.
362  * @return Returns the status code of the execution. For details, see {@link Udmf_ErrCode}.
363  *         Returns {@link UDMF_E_OK} if the operation is successful.
364  *         Returns {@link UDMF_E_INVALID_PARAM} if invalid args are detected.
365  * @see OH_UdmfRecordProvider OH_UdmfRecordProvider_GetData UdmfData_Finalize Udmf_ErrCode.
366  * @since 13
367  */
368 int OH_UdmfRecordProvider_SetData(OH_UdmfRecordProvider* provider, void* context,
369     const OH_UdmfRecordProvider_GetData callback, const UdmfData_Finalize finalize);
370 
371 /**
372  * @brief Get primary {@link OH_UdsPlainText} data from the {@link OH_UdmfData}.
373  *
374  * @param data Represents a pointer to an instance of {@link OH_UdmfData}.
375  * @param plainText Represents a pointer to an instance of {@link OH_UdsPlainText}.
376  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
377  *         {@link UDMF_E_OK} success.
378  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
379  * @see OH_UdmfData OH_UdsPlainText Udmf_ErrCode.
380  * @since 13
381  */
382 int OH_UdmfData_GetPrimaryPlainText(OH_UdmfData* data, OH_UdsPlainText* plainText);
383 
384 /**
385  * @brief Get one {@link OH_UdsHtml} data from the {@link OH_UdmfData}.
386  *
387  * @param data Represents a pointer to an instance of {@link OH_UdmfData}.
388  * @param html Represents a pointer to an instance of {@link OH_UdsHtml}.
389  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
390  *         {@link UDMF_E_OK} success.
391  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
392  * @see OH_UdmfData OH_UdsHtml Udmf_ErrCode.
393  * @since 13
394  */
395 int OH_UdmfData_GetPrimaryHtml(OH_UdmfData* data, OH_UdsHtml* html);
396 
397 /**
398  * @brief Get the count of {@link OH_UdmfRecord} in the {@link OH_UdmfData}.
399  *
400  * @param data Represents a pointer to an instance of {@link OH_UdmfData}.
401  * @return Returns the count of {@link OH_UdmfRecord}
402  * @see OH_UdmfData.
403  * @since 13
404  */
405 int OH_UdmfData_GetRecordCount(OH_UdmfData* data);
406 
407 /**
408  * @brief Get the record of the specified index from the {@link OH_UdmfData}.
409  *
410  * @param data Represents a pointer to an instance of {@link OH_UdmfData}.
411  * @param index Represents the index of {@link OH_UdmfRecord} in the {@link OH_UdmfData}.
412  * @return Returns the count of {@link OH_UdmfRecord}
413  * @see OH_UdmfData.
414  * @since 13
415  */
416 OH_UdmfRecord* OH_UdmfData_GetRecord(OH_UdmfData* data, unsigned int index);
417 
418 /**
419  * @brief Checks whether the UDMF data is from a local device.
420  *
421  * @param data Represents a pointer to an instance of {@link OH_UdmfData}.
422  * @return Returns the count of {@link OH_UdmfRecord}
423  * @see OH_UdmfData.
424  * @since 13
425  */
426 bool OH_UdmfData_IsLocal(OH_UdmfData* data);
427 
428 /**
429  * @brief Creation a pointer to the instance of the {@link OH_UdmfRecord}, it's relate with UDS data.
430  *
431  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdmfRecord}
432  * structure is returned. If the operation is failed, nullptr is returned.
433  * @see OH_UdmfRecord.
434  * @since 12
435  */
436 OH_UdmfRecord* OH_UdmfRecord_Create();
437 
438 /**
439  * @brief Destroy a pointer that points to an instance of {@link OH_UdmfRecord}.
440  *
441  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
442  * @see OH_UdmfRecord.
443  * @since 12
444  */
445 void OH_UdmfRecord_Destroy(OH_UdmfRecord* pThis);
446 
447 /**
448  * @brief Add one custom data to the {@link OH_UdmfRecord} record.
449  *
450  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
451  * @param typeId Represents record type, reference udmf_meta.h.
452  * @param entry Represents custom data.
453  * @param count Represents the size of data param.
454  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
455  *         {@link UDMF_E_OK} success.
456  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
457  * @see OH_UdmfRecord Udmf_ErrCode.
458  * @since 12
459  */
460 int OH_UdmfRecord_AddGeneralEntry(OH_UdmfRecord* record, const char* typeId,
461                                   const unsigned char* entry, unsigned int count);
462 
463 /**
464  * @brief Add one {@link OH_UdsPlainText} data to the {@link OH_UdmfRecord} record.
465  *
466  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
467  * @param plainText Represents a pointer to an instance of {@link OH_UdsPlainText}.
468  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
469  *         {@link UDMF_E_OK} success.
470  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
471  * @see OH_UdmfRecord OH_UdsPlainText Udmf_ErrCode.
472  * @since 12
473  */
474 int OH_UdmfRecord_AddPlainText(OH_UdmfRecord* pThis, OH_UdsPlainText* plainText);
475 
476 /**
477  * @brief Add one {@link OH_UdsHyperlink} data to the {@link OH_UdmfRecord} record.
478  *
479  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
480  * @param hyperlink Represents a pointer to an instance of {@link OH_UdsHyperlink}.
481  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
482  *         {@link UDMF_E_OK} success.
483  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
484  * @see OH_UdmfRecord OH_UdsHyperlink Udmf_ErrCode.
485  * @since 12
486  */
487 int OH_UdmfRecord_AddHyperlink(OH_UdmfRecord* pThis, OH_UdsHyperlink* hyperlink);
488 
489 /**
490  * @brief Add one {@link OH_UdsHtml} data to the {@link OH_UdmfRecord} record.
491  *
492  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
493  * @param html Represents a pointer to an instance of {@link OH_UdsHtml}.
494  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
495  *         {@link UDMF_E_OK} success.
496  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
497  * @see OH_UdmfRecord OH_UdsHtml Udmf_ErrCode.
498  * @since 12
499  */
500 int OH_UdmfRecord_AddHtml(OH_UdmfRecord* pThis, OH_UdsHtml* html);
501 
502 /**
503  * @brief Add one {@link OH_UdsAppItem} data to the {@link OH_UdmfRecord} record.
504  *
505  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
506  * @param appItem Represents a pointer to an instance of {@link OH_UdsAppItem}.
507  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
508  *         {@link UDMF_E_OK} success.
509  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
510  * @see OH_UdmfRecord OH_UdsAppItem Udmf_ErrCode.
511  * @since 12
512  */
513 int OH_UdmfRecord_AddAppItem(OH_UdmfRecord* pThis, OH_UdsAppItem* appItem);
514 
515 /**
516  * @brief Add one {@link OH_UdsFileUri} data to the {@link OH_UdmfRecord} record.
517  *
518  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
519  * @param fileUri Represents a pointer to an instance of {@link OH_UdsFileUri}.
520  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
521  *         {@link UDMF_E_OK} success.
522  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
523  * @see OH_UdmfRecord OH_UdsFileUri Udmf_ErrCode.
524  * @since 13
525  */
526 int OH_UdmfRecord_AddFileUri(OH_UdmfRecord* pThis, OH_UdsFileUri* fileUri);
527 
528 /**
529  * @brief Add one {@link OH_UdsPixelMap} data to the {@link OH_UdmfRecord} record.
530  *
531  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
532  * @param pixelMap Represents a pointer to an instance of {@link OH_UdsPixelMap}.
533  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
534  *         {@link UDMF_E_OK} success.
535  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
536  * @see OH_UdmfRecord OH_UdsPixelMap Udmf_ErrCode.
537  * @since 13
538  */
539 int OH_UdmfRecord_AddPixelMap(OH_UdmfRecord* pThis, OH_UdsPixelMap* pixelMap);
540 
541 /**
542  * @brief Add one {@link OH_UdsArrayBuffer} data to the {@link OH_UdmfRecord} record.
543  *
544  * @param record Represents a pointer to an instance of {@link OH_UdmfRecord}.
545  * @param type Represents record type, reference udmf_meta.h.
546  * @param buffer Represents a pointer to an instance of {@link OH_UdsArrayBuffer}.
547  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
548  *         {@link UDMF_E_OK} success.
549  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
550  * @see OH_UdmfRecord OH_UdsArrayBuffer Udmf_ErrCode.
551  * @since 13
552  */
553 int OH_UdmfRecord_AddArrayBuffer(OH_UdmfRecord* record, const char* type, OH_UdsArrayBuffer* buffer);
554 
555 /**
556  * @brief Add one {@link OH_UdsContentForm} data to the {@link OH_UdmfRecord} record.
557  *
558  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
559  * @param contentForm Represents a pointer to an instance of {@link OH_UdsContentForm}.
560  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
561  *         {@link UDMF_E_OK} success.
562  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
563  * @see OH_UdmfRecord OH_UdsContentForm Udmf_ErrCode.
564  * @since 14
565  */
566 int OH_UdmfRecord_AddContentForm(OH_UdmfRecord* pThis, OH_UdsContentForm* contentForm);
567 
568 /**
569  * @brief Get all types in the {@link OH_UdmfRecord} record.
570  *
571  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
572  * @param count Represents the types count that is a output param.
573  * @return Returns string array that in {@link OH_UdmfRecord} when input parameters valid,
574  * otherwise return nullptr.
575  * @see OH_UdmfRecord.
576  * @since 12
577  */
578 char** OH_UdmfRecord_GetTypes(OH_UdmfRecord* pThis, unsigned int* count);
579 
580 /**
581  * @brief Get one entry data from the {@link OH_UdmfRecord} record.
582  *
583  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
584  * @param typeId Represents record type, reference udmf_meta.h.
585  * @param entry Represents a pointer to entry data that is a output param.
586  * @param count Represents the entry data length that is a output param.
587  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
588  *         {@link UDMF_E_OK} success.
589  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
590  * @see OH_UdmfRecord Udmf_ErrCode.
591  * @since 12
592  */
593 int OH_UdmfRecord_GetGeneralEntry(OH_UdmfRecord* pThis, const char* typeId,
594     unsigned char** entry, unsigned int* count);
595 
596 /**
597  * @brief Get one {@link OH_UdsPlainText} data from the {@link OH_UdmfRecord} record.
598  *
599  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
600  * @param plainText Represents a pointer to an instance of {@link OH_UdsPlainText}.
601  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
602  *         {@link UDMF_E_OK} success.
603  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
604  * @see OH_UdmfRecord OH_UdsPlainText Udmf_ErrCode.
605  * @since 12
606  */
607 int OH_UdmfRecord_GetPlainText(OH_UdmfRecord* pThis, OH_UdsPlainText* plainText);
608 
609 /**
610  * @brief Get one {@link OH_UdsHyperlink} data from the {@link OH_UdmfRecord} record.
611  *
612  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
613  * @param hyperlink Represents a pointer to an instance of {@link OH_UdsHyperlink}.
614  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
615  *         {@link UDMF_E_OK} success.
616  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
617  * @see OH_UdmfRecord OH_UdsHyperlink Udmf_ErrCode.
618  * @since 12
619  */
620 int OH_UdmfRecord_GetHyperlink(OH_UdmfRecord* pThis, OH_UdsHyperlink* hyperlink);
621 
622 /**
623  * @brief Get one {@link OH_UdsHtml} data from the {@link OH_UdmfRecord} record.
624  *
625  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
626  * @param html Represents a pointer to an instance of {@link OH_UdsHtml}.
627  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
628  *         {@link UDMF_E_OK} success.
629  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
630  * @see OH_UdmfRecord OH_UdsHtml Udmf_ErrCode.
631  * @since 12
632  */
633 int OH_UdmfRecord_GetHtml(OH_UdmfRecord* pThis, OH_UdsHtml* html);
634 
635 /**
636  * @brief Get one {@link OH_UdsAppItem} data from the {@link OH_UdmfRecord} record.
637  *
638  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
639  * @param appItem Represents a pointer to an instance of {@link OH_UdsAppItem}.
640  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
641  *         {@link UDMF_E_OK} success.
642  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
643  * @see OH_UdmfRecord OH_UdsAppItem Udmf_ErrCode.
644  * @since 12
645  */
646 int OH_UdmfRecord_GetAppItem(OH_UdmfRecord* pThis, OH_UdsAppItem* appItem);
647 
648 /**
649  * @brief Get one {@link OH_UdsFileUri} data from the {@link OH_UdmfRecord} record.
650  *
651  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
652  * @param fileUri Represents a pointer to an instance of {@link OH_UdsFileUri}.
653  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
654  *         {@link UDMF_E_OK} success.
655  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
656  * @see OH_UdmfRecord OH_UdsFileUri Udmf_ErrCode.
657  * @since 13
658  */
659 int OH_UdmfRecord_GetFileUri(OH_UdmfRecord* pThis, OH_UdsFileUri* fileUri);
660 
661 /**
662  * @brief Get one {@link OH_UdsPixelMap} data from the {@link OH_UdmfRecord} record.
663  *
664  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
665  * @param pixelMap Represents a pointer to an instance of {@link OH_UdsPixelMap}.
666  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
667  *         {@link UDMF_E_OK} success.
668  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
669  * @see OH_UdmfRecord OH_UdsPixelMap Udmf_ErrCode.
670  * @since 13
671  */
672 int OH_UdmfRecord_GetPixelMap(OH_UdmfRecord* pThis, OH_UdsPixelMap* pixelMap);
673 
674 /**
675  * @brief Get one {@link OH_UdsArrayBuffer} data from the {@link OH_UdmfRecord} record.
676  *
677  * @param record Represents a pointer to an instance of {@link OH_UdmfRecord}.
678  * @param type Represents record type, reference udmf_meta.h.
679  * @param buffer Represents a pointer to an instance of {@link OH_UdsArrayBuffer}.
680  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
681  *         {@link UDMF_E_OK} success.
682  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
683  * @see OH_UdmfRecord OH_UdsArrayBuffer Udmf_ErrCode.
684  * @since 13
685  */
686 int OH_UdmfRecord_GetArrayBuffer(OH_UdmfRecord* record, const char* type, OH_UdsArrayBuffer* buffer);
687 
688 /**
689  * @brief Get one {@link OH_UdsContentForm} data from the {@link OH_UdmfRecord} record.
690  *
691  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
692  * @param contentForm Represents a pointer to an instance of {@link OH_UdsContentForm}.
693  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
694  *         {@link UDMF_E_OK} success.
695  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
696  * @see OH_UdmfRecord OH_UdsContentForm Udmf_ErrCode.
697  * @since 14
698  */
699 int OH_UdmfRecord_GetContentForm(OH_UdmfRecord* pThis, OH_UdsContentForm* contentForm);
700 
701 /**
702  * @brief Set the data provider of the types.
703  *
704  * @param pThis Represents a pointer to an instance of {@link OH_UdmfRecord}.
705  * @param types Represents a pointer to a group of data types;
706  * @param count Represents the number of data types;
707  * @param provider Represents a pointer an instance of {@link OH_UdmfRecordProvider}.
708  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
709  *         {@link UDMF_E_OK} success.
710  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
711  * @see OH_UdmfRecord OH_UdmfRecordProvider Udmf_ErrCode.
712  * @since 13
713  */
714 int OH_UdmfRecord_SetProvider(OH_UdmfRecord* pThis, const char* const* types, unsigned int count,
715     OH_UdmfRecordProvider* provider);
716 
717 /**
718  * @brief Creation a pointer to the instance of the {@link OH_UdmfProperty}
719  * from a {@link OH_UdmfData} data.
720  *
721  * @param unifiedData Represents a pointer to an instance of {@link OH_UdmfData}.
722  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdmfProperty}
723  * structure is returned. If the operation is failed, nullptr is returned.
724  * @see OH_UdmfData OH_UdmfProperty.
725  * @since 12
726  */
727 OH_UdmfProperty* OH_UdmfProperty_Create(OH_UdmfData* unifiedData);
728 
729 /**
730  * @brief Destroy a pointer that points to the {@link OH_UdmfProperty} instance.
731  *
732  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
733  * @see OH_UdmfProperty.
734  * @since 12
735  */
736 void OH_UdmfProperty_Destroy(OH_UdmfProperty* pThis);
737 
738 /**
739  * @brief Get tag value from the {@link OH_UdmfProperty}.
740  *
741  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
742  * @return Returns a pointer of the tag value string when input parameters valid, otherwise return nullptr.
743  * @see OH_UdmfProperty.
744  * @since 12
745  */
746 const char* OH_UdmfProperty_GetTag(OH_UdmfProperty* pThis);
747 
748 /**
749  * @brief Get timestamp value from the {@link OH_UdmfProperty}.
750  *
751  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
752  * @return Returns timestamp value.
753  * @see OH_UdmfProperty
754  * @since 12
755  */
756 int64_t OH_UdmfProperty_GetTimestamp(OH_UdmfProperty* pThis);
757 
758 /**
759  * @brief Get share option value from the {@link OH_UdmfProperty}.
760  *
761  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
762  * @return Returns {@link Udmf_ShareOption} value.
763  * @see OH_UdmfProperty Udmf_ShareOption
764  * @since 12
765  */
766 Udmf_ShareOption OH_UdmfProperty_GetShareOption(OH_UdmfProperty* pThis);
767 
768 /**
769  * @brief Get integer value by key from the {@link OH_UdmfProperty}.
770  *
771  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
772  * @param key Represents key-value pair's key
773  * @param defaultValue Represents when get value failure.
774  * @return Returns value associated with the key in successfully, otherwise return defaultValue.
775  * @see OH_UdmfProperty.
776  * @since 12
777  */
778 int OH_UdmfProperty_GetExtrasIntParam(OH_UdmfProperty* pThis,
779     const char* key, int defaultValue);
780 
781 /**
782  * @brief Get tag value from the {@link OH_UdmfProperty}.
783  *
784  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
785  * @param key Represents key-value pair's key.
786  * @return Returns a pointer of the key value string when input parameters valid, otherwise return nullptr.
787  * @see OH_UdmfProperty
788  * @since 12
789  */
790 const char* OH_UdmfProperty_GetExtrasStringParam(OH_UdmfProperty* pThis, const char* key);
791 
792 /**
793  * @brief Set tag value to {@link OH_UdmfProperty} .
794  *
795  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
796  * @param tag Represents new tag param.
797  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
798  *         {@link UDMF_E_OK} success.
799  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
800  * @see OH_UdmfProperty Udmf_ErrCode.
801  * @since 12
802  */
803 int OH_UdmfProperty_SetTag(OH_UdmfProperty* pThis, const char* tag);
804 
805 /**
806  * @brief Set Udmf_ShareOption value to {@link OH_UdmfProperty}.
807  *
808  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
809  * @param option Represents new {@link Udmf_ShareOption} param.
810  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
811  *         {@link UDMF_E_OK} success.
812  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
813  * @see OH_UdmfProperty Udmf_ShareOption Udmf_ErrCode.
814  * @since 12
815  */
816 int OH_UdmfProperty_SetShareOption(OH_UdmfProperty* pThis, Udmf_ShareOption option);
817 
818 /**
819  * @brief Set extras param to {@link OH_UdmfProperty}.
820  *
821  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
822  * @param key Represents extras param's key value.
823  * @param param Represents value of k-v pairs.
824  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
825  *         {@link UDMF_E_OK} success.
826  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
827  * @see OH_UdmfProperty Udmf_ErrCode.
828  * @since 12
829  */
830 int OH_UdmfProperty_SetExtrasIntParam(OH_UdmfProperty* pThis, const char* key, int param);
831 
832 /**
833  * @brief Set extras param to {@link OH_UdmfProperty}.
834  *
835  * @param pThis Represents a pointer to an instance of {@link OH_UdmfProperty}.
836  * @param key Represents extras param's key value.
837  * @param param Represents value of k-v pairs.
838  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
839  *         {@link UDMF_E_OK} success.
840  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
841  * @see OH_UdmfProperty Udmf_ErrCode.
842  * @since 12
843  */
844 int OH_UdmfProperty_SetExtrasStringParam(OH_UdmfProperty* pThis,
845     const char* key, const char* param);
846 
847 /**
848  * @brief Creation a pointer to the instance of the {@link OH_UdmfOptions}.
849  *
850  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdmfOptions}
851  * structure is returned. If the operation is failed, nullptr is returned.
852  * @see OH_UdmfOptions.
853  * @since 20
854  */
855 OH_UdmfOptions* OH_UdmfOptions_Create();
856 
857 /**
858  * @brief Destroy a pointer that points to an instance of {@link OH_UdmfOptions}.
859  *
860  * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}.
861  * @see OH_UdmfOptions.
862  * @since 20
863  */
864 void OH_UdmfOptions_Destroy(OH_UdmfOptions* pThis);
865 
866 /**
867  * @brief Get key from the {@link OH_UdmfOptions}.
868  *
869  * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}.
870  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
871  * @see OH_UdmfOptions
872  * @since 20
873  */
874 const char* OH_UdmfOptions_GetKey(OH_UdmfOptions* pThis);
875 
876 /**
877  * @brief Set the key to the {@link OH_UdmfOptions}.
878  *
879  * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}.
880  * @param key Represents a new string value of the key.
881  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
882  *         {@link UDMF_E_OK} success.
883  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
884  * @see OH_UdmfOptions Udmf_ErrCode
885  * @since 20
886  */
887 int OH_UdmfOptions_SetKey(OH_UdmfOptions* pThis, const char* key);
888 
889 /**
890  * @brief Get intention from the {@link OH_UdmfOptions}.
891  *
892  * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}.
893  * @return Returns {@link Udmf_Intention} value.
894  * @see OH_UdmfOptions Udmf_Intention
895  * @since 20
896  */
897 Udmf_Intention OH_UdmfOptions_GetIntention(OH_UdmfOptions* pThis);
898 
899 /**
900  * @brief Set intention value to {@link OH_UdmfOptions}.
901  *
902  * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}.
903  * @param intention Represents new {@link Udmf_Intention} param.
904  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
905  *         {@link UDMF_E_OK} success.
906  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
907  * @see OH_UdmfOptions Udmf_Intention Udmf_ErrCode.
908  * @since 20
909  */
910 int OH_UdmfOptions_SetIntention(OH_UdmfOptions* pThis, Udmf_Intention intention);
911 
912 /**
913  * @brief Reset {@link OH_UdmfOptions} to default.
914  *
915  * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}.
916  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
917  *         {@link UDMF_E_OK} success.
918  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
919  * @see OH_UdmfOptions Udmf_ErrCode.
920  * @since 20
921  */
922 int OH_UdmfOptions_Reset(OH_UdmfOptions* pThis);
923 
924 /**
925  * @brief Get visibility from the {@link OH_UdmfOptions}.
926  *
927  * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}.
928  * @return Returns {@link Udmf_Visibility} value.
929  * @see OH_UdmfOptions Udmf_Visibility
930  * @since 20
931  */
932 Udmf_Visibility OH_UdmfOptions_GetVisibility(OH_UdmfOptions* pThis);
933 
934 /**
935  * @brief Set visibility value to {@link OH_UdmfOptions}.
936  *
937  * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}.
938  * @param visibility Represents new {@link Udmf_Visibility} param.
939  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
940  *         {@link UDMF_E_OK} success.
941  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
942  * @see OH_UdmfOptions Udmf_Visibility Udmf_ErrCode.
943  * @since 20
944  */
945 int OH_UdmfOptions_SetVisibility(OH_UdmfOptions* pThis, Udmf_Visibility visibility);
946 
947 /**
948  * @brief Get {@link OH_UdmfData} data from udmf database.
949  *
950  * @param key Represents database store's key value.
951  * @param intention Represents data type {@link Udmf_Intention}
952  * @param unifiedData Represents output params of {@link OH_UdmfData};
953  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
954  *         {@link UDMF_E_OK} success.
955  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
956  * @see OH_UdmfProperty Udmf_Intention Udmf_ErrCode.
957  * @since 12
958  */
959 int OH_Udmf_GetUnifiedData(const char* key, Udmf_Intention intention, OH_UdmfData* unifiedData);
960 
961 /**
962  * @brief Get {@link OH_UdmfData} data array from udmf database by intention.
963  *
964  * @param options Represents a pointer to an instance of {@link OH_UdmfOptions}.
965  * @param dataArray Represents output params of {@link OH_UdmfData}.
966  * This pointer needs to be released using the {@link OH_Udmf_DestroyDataArray} function.
967  * @param dataSize Represents the data count of output params.
968  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
969  *         {@link UDMF_E_OK} success.
970  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
971  *         {@link UDMF_ERR} Internal data error.
972  * @see OH_UdmfData Udmf_Intention Udmf_ErrCode.
973  * @since 20
974  */
975 int OH_Udmf_GetUnifiedDataByOptions(OH_UdmfOptions* options, OH_UdmfData** dataArray, unsigned int* dataSize);
976 
977 /**
978  * @brief Set {@link OH_UdmfData} data to database.
979  *
980  * @param intention Represents data type {@link Udmf_Intention}.
981  * @param unifiedData Represents a pointer to an instance of {@link OH_UdmfData}.
982  * @param key Represents return value after set data to database successfully,
983  * it's memory size not less than {@link UDMF_KEY_BUFFER_LEN}.
984  * @param keyLen Represents size of key param.
985  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
986  *         {@link UDMF_E_OK} success.
987  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
988  * @see OH_UdmfProperty Udmf_Intention Udmf_ErrCode.
989  * @since 12
990  */
991 int OH_Udmf_SetUnifiedData(Udmf_Intention intention, OH_UdmfData* unifiedData,
992     char* key, unsigned int keyLen);
993 
994 /**
995  * @brief Set {@link OH_UdmfData} data to database with options.
996  *
997  * @param options Represents a pointer to an instance of {@link OH_UdmfOptions}.
998  * @param unifiedData Represents a pointer to an instance of {@link OH_UdmfData}.
999  * @param key Represents return value after set data to database successfully,
1000  * it's memory size not less than {@link UDMF_KEY_BUFFER_LEN}.
1001  * @param keyLen Represents size of key param.
1002  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
1003  *         {@link UDMF_E_OK} success.
1004  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
1005  *         {@link UDMF_ERR} Internal data error.
1006  * @see OH_UdmfOptions OH_UdmfData Udmf_ErrCode.
1007  * @since 20
1008  */
1009 int OH_Udmf_SetUnifiedDataByOptions(OH_UdmfOptions* options, OH_UdmfData *unifiedData, char *key, unsigned int keyLen);
1010 
1011 /**
1012  * @brief Update {@link OH_UdmfData} data to database with options.
1013  *
1014  * @param options Represents a pointer to an instance of {@link OH_UdmfOptions}.
1015  * @param unifiedData Represents a pointer to an instance of {@link OH_UdmfData}.
1016  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
1017  *         {@link UDMF_E_OK} success.
1018  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
1019  *         {@link UDMF_ERR} Internal data error.
1020  * @see OH_UdmfOptions OH_UdmfData Udmf_ErrCode.
1021  * @since 20
1022  */
1023 int OH_Udmf_UpdateUnifiedData(OH_UdmfOptions* options, OH_UdmfData* unifiedData);
1024 
1025 /**
1026  * @brief Delete {@link OH_UdmfData} data of database with options.
1027  *
1028  * @param options Represents a pointer to an instance of {@link OH_UdmfOptions}.
1029  * @param dataArray Represents output params of {@link OH_UdmfData}.
1030  * This pointer needs to be released using the {@link OH_Udmf_DestroyDataArray} function.
1031  * @param dataSize Represents the data count of output params.
1032  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
1033  *         {@link UDMF_E_OK} success.
1034  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
1035  *         {@link UDMF_ERR} Internal data error.
1036  * @see OH_UdmfData Udmf_Intention Udmf_ErrCode.
1037  * @since 20
1038  */
1039 int OH_Udmf_DeleteUnifiedData(OH_UdmfOptions* options, OH_UdmfData** dataArray, unsigned int* dataSize);
1040 
1041 /**
1042  * @brief Destroy data array memory.
1043  *
1044  * @param dataArray Represents a point to {@link OH_UdmfData}.
1045  * @param dataSize Represents data size in list.
1046  * @see OH_UdmfData
1047  * @since 20
1048  */
1049 void OH_Udmf_DestroyDataArray(OH_UdmfData** dataArray, unsigned int dataSize);
1050 
1051 /**
1052  * @brief Gets the progress from the {@OH_Udmf_ProgressInfo}.
1053  *
1054  * @param progressInfo Represents a pointer to an instance of {@link OH_Udmf_ProgressInfo}.
1055  * @return Returns the progress.
1056  * @see OH_Udmf_ProgressInfo
1057  * @since 15
1058  */
1059 int OH_UdmfProgressInfo_GetProgress(OH_Udmf_ProgressInfo* progressInfo);
1060 
1061 /**
1062  * @brief Gets the status from the {@OH_Udmf_ProgressInfo}.
1063  *
1064  * @param progressInfo Represents a pointer to an instance of {@link OH_Udmf_ProgressInfo}.
1065  * @return Returns the status code. See {@link Udmf_ListenerStatus}.
1066  * @see OH_Udmf_ProgressInfo Udmf_ListenerStatus
1067  * @since 15
1068  */
1069 int OH_UdmfProgressInfo_GetStatus(OH_Udmf_ProgressInfo* progressInfo);
1070 
1071 /**
1072  * @brief Creation a pointer to the instance of the {@link OH_UdmfGetDataParams}.
1073  *
1074  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdmfGetDataParams}
1075  * structure is returned. If the operation is failed, nullptr is returned.
1076  * @see OH_UdmfGetDataParams
1077  * @since 15
1078  */
1079 OH_UdmfGetDataParams* OH_UdmfGetDataParams_Create();
1080 
1081 /**
1082  * @brief Destroy a pointer that points to an instance of {@link OH_UdmfGetDataParams}.
1083  *
1084  * @param pThis Represents a pointer to an instance of {@link OH_UdmfGetDataParams}.
1085  * @see OH_UdmfGetDataParams
1086  * @since 15
1087  */
1088 void OH_UdmfGetDataParams_Destroy(OH_UdmfGetDataParams* pThis);
1089 
1090 /**
1091  * @brief Sets the destination uri to the {@OH_UdmfGetDataParams}.
1092  *
1093  * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}.
1094  * @param destUri Pointer to a destination uri.
1095  * @see OH_UdmfGetDataParams
1096  * @since 15
1097  */
1098 void OH_UdmfGetDataParams_SetDestUri(OH_UdmfGetDataParams* params, const char* destUri);
1099 
1100 /**
1101  * @brief Sets the file conflict options to the {@OH_UdmfGetDataParams}.
1102  *
1103  * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}.
1104  * @param options Represents to the file conflict options.
1105  * @see OH_UdmfGetDataParams Udmf_FileConflictOptions
1106  * @since 15
1107  */
1108 void OH_UdmfGetDataParams_SetFileConflictOptions(OH_UdmfGetDataParams* params, const Udmf_FileConflictOptions options);
1109 
1110 /**
1111  * @brief Sets the progress indicator to the {@OH_UdmfGetDataParams}.
1112  *
1113  * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}.
1114  * @param options Represents to the progress indicator.
1115  * @see OH_UdmfGetDataParams Udmf_ProgressIndicator
1116  * @since 15
1117  */
1118 void OH_UdmfGetDataParams_SetProgressIndicator(OH_UdmfGetDataParams* params,
1119     const Udmf_ProgressIndicator progressIndicator);
1120 
1121 /**
1122  * @brief Sets the progress indicator to the {@OH_UdmfGetDataParams}.
1123  *
1124  * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}.
1125  * @param options Represents to the data progress listener.
1126  * @see OH_UdmfGetDataParams OH_Udmf_DataProgressListener
1127  * @since 15
1128  */
1129 void OH_UdmfGetDataParams_SetDataProgressListener(OH_UdmfGetDataParams* params,
1130     const OH_Udmf_DataProgressListener dataProgressListener);
1131 
1132 /**
1133  * @brief Sets the acceptable info to the {@OH_UdmfGetDataParams}.
1134  *
1135  * @param params Represents a pointer to an instance of {@link OH_UdmfGetDataParams}.
1136  * @param acceptableInfo Represents a pointer to an instance of {@link OH_UdmfDataLoadInfo}.
1137  * @see OH_UdmfGetDataParams OH_UdmfDataLoadInfo
1138  * @since 20
1139  */
1140 void OH_UdmfGetDataParams_SetAcceptableInfo(OH_UdmfGetDataParams* params, OH_UdmfDataLoadInfo* acceptableInfo);
1141 
1142 /**
1143  * @brief Creation a pointer to the instance of the {@link OH_UdmfDataLoadParams}.
1144  *
1145  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdmfDataLoadParams}
1146  * structure is returned. If the operation is failed, nullptr is returned.
1147  * @see OH_UdmfDataLoadParams
1148  * @since 20
1149  */
1150 OH_UdmfDataLoadParams* OH_UdmfDataLoadParams_Create();
1151 
1152 /**
1153  * @brief Destroy a pointer that points to an instance of {@link OH_UdmfDataLoadParams}.
1154  *
1155  * @param pThis Represents a pointer to an instance of {@link OH_UdmfDataLoadParams}.
1156  * @see OH_UdmfDataLoadParams
1157  * @since 20
1158  */
1159 void OH_UdmfDataLoadParams_Destroy(OH_UdmfDataLoadParams* pThis);
1160 
1161 /**
1162  * @brief Sets the data load handler to the {@OH_UdmfDataLoadParams}.
1163  *
1164  * @param params Represents a pointer to an instance of {@link OH_UdmfDataLoadParams}.
1165  * @param dataLoadHandler Represents to the data load handler.
1166  * @see OH_UdmfDataLoadParams OH_Udmf_DataLoadHandler
1167  * @since 20
1168  */
1169 void OH_UdmfDataLoadParams_SetLoadHandler(OH_UdmfDataLoadParams* params, const OH_Udmf_DataLoadHandler dataLoadHandler);
1170 
1171 /**
1172  * @brief Sets the data load info to the {@OH_UdmfDataLoadParams}.
1173  *
1174  * @param params Represents a pointer to an instance of {@link OH_UdmfDataLoadParams}.
1175  * @param dataLoadInfo Represents a pointer to an instance of {@link OH_UdmfDataLoadInfo}.
1176  * @see OH_UdmfDataLoadParams OH_UdmfDataLoadInfo
1177  * @since 20
1178  */
1179 void OH_UdmfDataLoadParams_SetDataLoadInfo(OH_UdmfDataLoadParams* params, OH_UdmfDataLoadInfo* dataLoadInfo);
1180 
1181 /**
1182  * @brief Creation a pointer to the instance of the {@link OH_UdmfDataLoadInfo}.
1183  *
1184  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdmfDataLoadInfo}
1185  * structure is returned. If the operation is failed, nullptr is returned.
1186  * @see OH_UdmfDataLoadInfo
1187  * @since 20
1188  */
1189 OH_UdmfDataLoadInfo* OH_UdmfDataLoadInfo_Create();
1190 
1191 /**
1192  * @brief Destroy a pointer that points to an instance of {@link OH_UdmfDataLoadInfo}.
1193  *
1194  * @param pThis Represents a pointer to an instance of {@link OH_UdmfDataLoadInfo}.
1195  * @see OH_UdmfDataLoadInfo
1196  * @since 20
1197  */
1198 void OH_UdmfDataLoadInfo_Destroy(OH_UdmfDataLoadInfo* dataLoadInfo);
1199 
1200 /**
1201  * @brief Gets the types from the {@OH_UdmfDataLoadInfo}.
1202  *
1203  * @param dataLoadInfo Represents a pointer to an instance of {@link OH_UdmfDataLoadInfo}.
1204  * @param count the types count of data.
1205  * @return Returns the types of data.
1206  * @see OH_UdmfDataLoadInfo
1207  * @since 20
1208  */
1209 char** OH_UdmfDataLoadInfo_GetTypes(OH_UdmfDataLoadInfo* dataLoadInfo, unsigned int* count);
1210 
1211 /**
1212  * @brief Sets the data load info to the {@OH_UdmfDataLoadInfo}.
1213  *
1214  * @param dataLoadInfo Represents a pointer to an instance of {@link OH_UdmfDataLoadInfo}.
1215  * @param types Represents the type of data.
1216  * @see OH_UdmfDataLoadInfo
1217  * @since 20
1218  */
1219 void OH_UdmfDataLoadInfo_SetType(OH_UdmfDataLoadInfo* dataLoadInfo, const char* type);
1220 
1221 /**
1222  * @brief Gets the record count from the {@OH_UdmfDataLoadInfo}.
1223  *
1224  * @param dataLoadInfo Represents a pointer to an instance of {@link OH_UdmfDataLoadInfo}.
1225  * @return Returns the record count.
1226  * @see OH_UdmfDataLoadInfo
1227  * @since 20
1228  */
1229 int OH_UdmfDataLoadInfo_GetRecordCount(OH_UdmfDataLoadInfo* dataLoadInfo);
1230 
1231 /**
1232  * @brief Sets the record count to the {@OH_UdmfDataLoadInfo}.
1233  *
1234  * @param dataLoadInfo Represents a pointer to an instance of {@link OH_UdmfDataLoadInfo}.
1235  * @param recordCount Represents the types of data.
1236  * @see OH_UdmfDataLoadInfo
1237  * @since 20
1238  */
1239 void OH_UdmfDataLoadInfo_SetRecordCount(OH_UdmfDataLoadInfo* dataLoadInfo, unsigned int recordCount);
1240 
1241 #ifdef __cplusplus
1242 };
1243 #endif
1244 
1245 /** @} */
1246 #endif