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  * @syscap SystemCapability.DistributedDataManager.UDMF.Core
25  *
26  * @since 12
27  */
28 
29 /**
30  * @file uds.h
31  *
32  * @brief Provides uniform data struct(UDS).
33  *
34  * @kit ArkData
35  * @library libudmf.so
36  * @syscap SystemCapability.DistributedDataManager.UDMF.Core
37  * @since 12
38  */
39 
40 #ifndef UDS_H
41 #define UDS_H
42 
43 #include "multimedia/image_framework/image/pixelmap_native.h"
44 
45 #ifdef __cplusplus
46 
47 extern "C" {
48 #endif
49 
50 /**
51  * @brief Describes the unified data struct of plaintext.
52  *
53  * @since 12
54  */
55 typedef struct OH_UdsPlainText OH_UdsPlainText;
56 
57 /**
58  * @brief Describes the unified data struct of hyperlink.
59  *
60  * @since 12
61  */
62 typedef struct OH_UdsHyperlink OH_UdsHyperlink;
63 
64 /**
65  * @brief Describes the unified data struct of html.
66  *
67  * @since 12
68  */
69 typedef struct OH_UdsHtml OH_UdsHtml;
70 
71 /**
72  * @brief Describes the unified data struct of open harmony application item.
73  *
74  * @since 12
75  */
76 typedef struct OH_UdsAppItem OH_UdsAppItem;
77 
78 /**
79  * @brief Describes the unified data struct of file uri.
80  *
81  * @since 13
82  */
83 typedef struct OH_UdsFileUri OH_UdsFileUri;
84 
85 /**
86  * @brief Describes the unified data struct of open harmony pixel map.
87  *
88  * @since 13
89  */
90 typedef struct OH_UdsPixelMap OH_UdsPixelMap;
91 
92 /**
93  * @brief Describes the unified data struct of array buffer.
94  *
95  * @since 13
96  */
97 typedef struct OH_UdsArrayBuffer OH_UdsArrayBuffer;
98 
99 /**
100  * @brief Creation a pointer to the instance of the {@link OH_UdsPlainText}.
101  *
102  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdsPlainText}
103  * structure is returned. If the operation is failed, nullptr is returned.
104  * @see OH_UdsPlainText
105  * @since 12
106  */
107 OH_UdsPlainText* OH_UdsPlainText_Create();
108 
109 /**
110  * @brief Destroy a pointer that points to the {@link OH_UdsPlainText} instance.
111  *
112  * @param pThis Represents a pointer to an instance of {@link OH_UdsPlainText}.
113  * @see OH_UdsPlainText
114  * @since 12
115  */
116 void OH_UdsPlainText_Destroy(OH_UdsPlainText* pThis);
117 
118 /**
119  * @brief Get type id from the {@link OH_UdsPlainText}.
120  *
121  * @param pThis Represents a pointer to an instance of {@link OH_UdsPlainText}.
122  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
123  * @see OH_UdsPlainText
124  * @since 12
125  */
126 const char* OH_UdsPlainText_GetType(OH_UdsPlainText* pThis);
127 
128 /**
129  * @brief Get content from the {@link OH_UdsPlainText}.
130  *
131  * @param pThis Represents a pointer to an instance of {@link OH_UdsPlainText}.
132  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
133  * @see OH_UdsPlainText
134  * @since 12
135  */
136 const char* OH_UdsPlainText_GetContent(OH_UdsPlainText* pThis);
137 
138 /**
139  * @brief Get abstract from the {@link OH_UdsPlainText}.
140  *
141  * @param pThis Represents a pointer to an instance of {@link OH_UdsPlainText}.
142  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
143  * @see OH_UdsPlainText
144  * @since 12
145  */
146 const char* OH_UdsPlainText_GetAbstract(OH_UdsPlainText* pThis);
147 
148 /**
149  * @brief Set content to the {@link OH_UdsPlainText}.
150  *
151  * @param pThis Represents a pointer to an instance of {@link OH_UdsPlainText}.
152  * @param content Represents a new content string.
153  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
154  *         {@link UDMF_E_OK} success.
155  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
156  * @see OH_UdsPlainText Udmf_ErrCode
157  * @since 12
158  */
159 int OH_UdsPlainText_SetContent(OH_UdsPlainText* pThis, const char* content);
160 
161 /**
162  * @brief Set abstract to the {@link OH_UdsPlainText}.
163  *
164  * @param pThis Represents a pointer to an instance of {@link OH_UdsPlainText}.
165  * @param abstract Represents a new string value.
166  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
167  *         {@link UDMF_E_OK} success.
168  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
169  * @see OH_UdsPlainText Udmf_ErrCode
170  * @since 12
171  */
172 int OH_UdsPlainText_SetAbstract(OH_UdsPlainText* pThis, const char* abstract);
173 
174 /**
175  * @brief Creation a pointer to the instance of the {@link OH_UdsHyperlink}.
176  *
177  * @return If the operation is successful, a pointer to the instance of {@link OH_UdsHyperlink}
178  * structure is returned. If the operation is failed, nullptr is returned.
179  * @see OH_UdsHyperlink
180  * @since 12
181  */
182 OH_UdsHyperlink* OH_UdsHyperlink_Create();
183 
184 /**
185  * @brief Destroy a pointer that points to the {@link OH_UdsHyperlink} instance.
186  *
187  * @param pThis Represents a pointer to an  instance of {@link OH_UdsHyperlink}.
188  * @see OH_UdsHyperlink
189  * @since 12
190  */
191 void OH_UdsHyperlink_Destroy(OH_UdsHyperlink* pThis);
192 
193 /**
194  * @brief Get type from the {@link OH_UdsHyperlink}.
195  *
196  * @param pThis Represents a pointer to an instance of {@link OH_UdsHyperlink}.
197  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
198  * @see OH_UdsHyperlink
199  * @since 12
200  */
201 const char* OH_UdsHyperlink_GetType(OH_UdsHyperlink* pThis);
202 
203 /**
204  * @brief Get url from the {@link OH_UdsHyperlink}.
205  *
206  * @param pThis Represents a pointer to an instance of {@link OH_UdsHyperlink}.
207  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
208  * @see OH_UdsHyperlink
209  * @since 12
210  */
211 const char* OH_UdsHyperlink_GetUrl(OH_UdsHyperlink* pThis);
212 
213 /**
214  * @brief Get description from the {@link OH_UdsHyperlink}.
215  *
216  * @param pThis Represents a pointer to an instance of {@link OH_UdsHyperlink}.
217  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
218  * @see OH_UdsHyperlink
219  * @since 12
220  */
221 const char* OH_UdsHyperlink_GetDescription(OH_UdsHyperlink* pThis);
222 
223 /**
224  * @brief Set url to the {@link OH_UdsHyperlink}.
225  *
226  * @param pThis Represents a pointer to an instance of {@link OH_UdsHyperlink}.
227  * @param url Represents a new string value.
228  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
229  *         {@link UDMF_E_OK} success.
230  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
231  * @see OH_UdsHyperlink Udmf_ErrCode
232  * @since 12
233  */
234 int OH_UdsHyperlink_SetUrl(OH_UdsHyperlink* pThis, const char* url);
235 
236 /**
237  * @brief Set description to the {@link OH_UdsHyperlink}.
238  *
239  * @param pThis Represents a pointer to an instance of {@link OH_UdsHyperlink}.
240  * @param description Represents a new string value.
241  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
242  *         {@link UDMF_E_OK} success.
243  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
244  * @see OH_UdsHyperlink Udmf_ErrCode
245  * @since 12
246  */
247 int OH_UdsHyperlink_SetDescription(OH_UdsHyperlink* pThis, const char* description);
248 
249 /**
250  * @brief Creation a pointer to the instance of the {@link OH_UdsHtml}.
251  *
252  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdsHtml}
253  * structure is returned. If the operation is failed, nullptr is returned.
254  * @see OH_UdsHtml
255  * @since 12
256  */
257 OH_UdsHtml* OH_UdsHtml_Create();
258 
259 /**
260  * @brief Destroy a pointer that points to the {@link OH_UdsHtml} instance.
261  *
262  * @param pThis Represents a pointer to an instance of {@link OH_UdsHtml}.
263  * @see OH_UdsHtml
264  * @since 12
265  */
266 void OH_UdsHtml_Destroy(OH_UdsHtml* pThis);
267 
268 /**
269  * @brief Get html from the {@link OH_UdsHtml}.
270  *
271  * @param pThis Represents a pointer to an instance of {@link OH_UdsHtml}.
272  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
273  * @see OH_UdsHtml
274  * @since 12
275  */
276 const char* OH_UdsHtml_GetType(OH_UdsHtml* pThis);
277 
278 /**
279  * @brief Get content from the {@link OH_UdsHtml}.
280  *
281  * @param pThis Represents a pointer to an instance of {@link OH_UdsHtml}.
282  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
283  * @see OH_UdsHtml
284  * @since 12
285  */
286 const char* OH_UdsHtml_GetContent(OH_UdsHtml* pThis);
287 
288 /**
289  * @brief Get plain content from the {@link OH_UdsHtml}.
290  *
291  * @param pThis Represents a pointer to an instance of {@link OH_UdsHtml}.
292  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
293  * @see OH_UdsHtml
294  * @since 12
295  */
296 const char* OH_UdsHtml_GetPlainContent(OH_UdsHtml* pThis);
297 
298 /**
299  * @brief Set content to the {@link OH_UdsHtml}.
300  *
301  * @param pThis Represents a pointer to an instance of {@link OH_UdsHtml}.
302  * @param content Represents a new string value.
303  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
304  *         {@link UDMF_E_OK} success.
305  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
306  * @see OH_UdsHtml Udmf_ErrCode
307  * @since 12
308  */
309 int OH_UdsHtml_SetContent(OH_UdsHtml* pThis, const char* content);
310 
311 /**
312  * @brief Set plain content to the {@link OH_UdsHtml}.
313  *
314  * @param pThis Represents a pointer to an instance of {@link OH_UdsHtml}.
315  * @param plainContent Represents a new string value.
316  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
317  *         {@link UDMF_E_OK} success.
318  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
319  * @see OH_UdsHtml Udmf_ErrCode
320  * @since 12
321  */
322 int OH_UdsHtml_SetPlainContent(OH_UdsHtml* pThis, const char* plainContent);
323 
324 /**
325  * @brief Creation a pointer to the instance of the {@link OH_UdsAppItem}.
326  *
327  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdsAppItem}
328  * structure is returned. sIf the operation is failed, nullptr is returned.
329  * @see OH_UdsAppItem
330  * @since 12
331  */
332 OH_UdsAppItem* OH_UdsAppItem_Create();
333 
334 /**
335  * @brief Destroy a pointer that points to the {@link OH_UdsAppItem} instance.
336  *
337  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
338  * @see OH_UdsAppItem
339  * @since 12
340  */
341 void OH_UdsAppItem_Destroy(OH_UdsAppItem* pThis);
342 
343 /**
344  * @brief Get type from the {@link OH_UdsAppItem}.
345  *
346  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
347  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
348  * @see OH_UdsAppItem
349  * @since 12
350  */
351 const char* OH_UdsAppItem_GetType(OH_UdsAppItem* pThis);
352 
353 /**
354  * @brief Get app id from the {@link OH_UdsAppItem}.
355  *
356  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
357  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
358  * @see OH_UdsAppItem
359  * @since 12
360  */
361 const char* OH_UdsAppItem_GetId(OH_UdsAppItem* pThis);
362 
363 /**
364  * @brief Get app name from the {@link OH_UdsAppItem}.
365  *
366  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
367  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
368  * @see OH_UdsAppItem
369  * @since 12
370  */
371 const char* OH_UdsAppItem_GetName(OH_UdsAppItem* pThis);
372 
373 /**
374  * @brief Get app icon id from the {@link OH_UdsAppItem}.
375  *
376  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
377  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
378  * @see OH_UdsAppItem
379  * @since 12
380  */
381 const char* OH_UdsAppItem_GetIconId(OH_UdsAppItem* pThis);
382 
383 /**
384  * @brief Get app label id from the {@link OH_UdsAppItem}.
385  *
386  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
387  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
388  * @see OH_UdsAppItem
389  * @since 12
390  */
391 const char* OH_UdsAppItem_GetLabelId(OH_UdsAppItem* pThis);
392 
393 /**
394  * @brief Get bundle name from the {@link OH_UdsAppItem}.
395  *
396  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
397  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
398  * @see OH_UdsAppItem
399  * @since 12
400  */
401 const char* OH_UdsAppItem_GetBundleName(OH_UdsAppItem* pThis);
402 
403 /**
404  * @brief Get ability name from the {@link OH_UdsAppItem}.
405  *
406  * @param pThis Represents a pointer to an instance {@link OH_UdsAppItem}.
407  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
408  * @see OH_UdsAppItem
409  * @since 12
410  */
411 const char* OH_UdsAppItem_GetAbilityName(OH_UdsAppItem* pThis);
412 
413 /**
414  * @brief Set application id to the {@link OH_UdsAppItem}.
415  *
416  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
417  * @param appId Represents a new string value.
418  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
419  *         {@link UDMF_E_OK} success.
420  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
421  * @see OH_UdsAppItem Udmf_ErrCode
422  * @since 12
423  */
424 int OH_UdsAppItem_SetId(OH_UdsAppItem* pThis, const char* appId);
425 
426 /**
427  * @brief Set application name to the {@link OH_UdsAppItem}.
428  *
429  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
430  * @param appName Represents a new string value.
431  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
432  *         {@link UDMF_E_OK} success.
433  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
434  * @see OH_UdsAppItem Udmf_ErrCode
435  * @since 12
436  */
437 int OH_UdsAppItem_SetName(OH_UdsAppItem* pThis, const char* appName);
438 
439 /**
440  * @brief Set application icon id to the {@link OH_UdsAppItem}.
441  *
442  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
443  * @param appIconId Represents a new string value.
444  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
445  *         {@link UDMF_E_OK} success.
446  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
447  * @see OH_UdsAppItem Udmf_ErrCode
448  * @since 12
449  */
450 int OH_UdsAppItem_SetIconId(OH_UdsAppItem* pThis, const char* appIconId);
451 
452 /**
453  * @brief Set application label id to the {@link OH_UdsAppItem}.
454  *
455  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
456  * @param appLabelId Represents a new string value.
457  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
458  *         {@link UDMF_E_OK} success.
459  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
460  * @see OH_UdsAppItem Udmf_ErrCode
461  * @since 12
462  */
463 int OH_UdsAppItem_SetLabelId(OH_UdsAppItem* pThis, const char* appLabelId);
464 
465 /**
466  * @brief Set bundle name to the {@link OH_UdsAppItem}.
467  *
468  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
469  * @param bundleName Represents a new string value.
470  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
471  *         {@link UDMF_E_OK} success.
472  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
473  * @see OH_UdsAppItem Udmf_ErrCode
474  * @since 12
475  */
476 int OH_UdsAppItem_SetBundleName(OH_UdsAppItem* pThis, const char* bundleName);
477 
478 /**
479  * @brief Set ability name to the {@link OH_UdsAppItem}.
480  *
481  * @param pThis Represents a pointer to an instance of {@link OH_UdsAppItem}.
482  * @param abilityName Represents a new string value.
483  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
484  *         {@link UDMF_E_OK} success.
485  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
486  * @see OH_UdsAppItem Udmf_ErrCode
487  * @since 12
488  */
489 int OH_UdsAppItem_SetAbilityName(OH_UdsAppItem* pThis, const char* abilityName);
490 
491 /**
492  * @brief Creation a pointer to the instance of the {@link OH_UdsFileUri}.
493  *
494  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdsFileUri}
495  * structure is returned. If the memory is not enough, nullptr is returned.
496  * @see OH_UdsFileUri
497  * @since 13
498  */
499 OH_UdsFileUri* OH_UdsFileUri_Create();
500 
501 /**
502  * @brief Destroy a pointer that points to the {@link OH_UdsFileUri} instance.
503  *
504  * @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
505  * @see OH_UdsFileUri
506  * @since 13
507  */
508 void OH_UdsFileUri_Destroy(OH_UdsFileUri* pThis);
509 
510 /**
511  * @brief Get type id from the {@link OH_UdsFileUri}.
512  *
513  * @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
514  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
515  * @see OH_UdsFileUri
516  * @since 13
517  */
518 const char* OH_UdsFileUri_GetType(OH_UdsFileUri* pThis);
519 
520 /**
521  * @brief Get file uri from the {@link OH_UdsFileUri}.
522  *
523  * @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
524  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
525  * @see OH_UdsFileUri
526  * @since 13
527  */
528 const char* OH_UdsFileUri_GetFileUri(OH_UdsFileUri* pThis);
529 
530 /**
531  * @brief Get file type from the {@link OH_UdsFileUri}.
532  *
533  * @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
534  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
535  * @see OH_UdsFileUri
536  * @since 13
537  */
538 const char* OH_UdsFileUri_GetFileType(OH_UdsFileUri* pThis);
539 
540 /**
541  * @brief Set file uri to the {@link OH_UdsFileUri}.
542  *
543  * @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
544  * @param fileUri Represents a new file uri string.
545  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
546  *         {@link UDMF_E_OK} success.
547  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
548  * @see OH_UdsFileUri Udmf_ErrCode
549  * @since 13
550  */
551 int OH_UdsFileUri_SetFileUri(OH_UdsFileUri* pThis, const char* fileUri);
552 
553 /**
554  * @brief Set file type to the {@link OH_UdsFileUri}.
555  *
556  * @param pThis Represents a pointer to an instance of {@link OH_UdsFileUri}.
557  * @param fileType Represents a new file type string.
558  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
559  *         {@link UDMF_E_OK} success.
560  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
561  * @see OH_UdsFileUri Udmf_ErrCode
562  * @since 13
563  */
564 int OH_UdsFileUri_SetFileType(OH_UdsFileUri* pThis, const char* fileType);
565 
566 /**
567  * @brief Creation a pointer to the instance of the {@link OH_UdsPixelMap}.
568  *
569  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdsPixelMap}
570  * structure is returned. If the memory is not enough, nullptr is returned.
571  * @see OH_UdsPixelMap
572  * @since 13
573  */
574 OH_UdsPixelMap* OH_UdsPixelMap_Create();
575 
576 /**
577  * @brief Destroy a pointer that points to the {@link OH_UdsPixelMap} instance.
578  *
579  * @param pThis Represents a pointer to an instance of {@link OH_UdsPixelMap}.
580  * @see OH_UdsPixelMap
581  * @since 13
582  */
583 void OH_UdsPixelMap_Destroy(OH_UdsPixelMap* pThis);
584 
585 /**
586  * @brief Get type id from the {@link OH_UdsPixelMap}.
587  *
588  * @param pThis Represents a pointer to an instance of {@link OH_UdsPixelMap}.
589  * @return Returns a pointer of the value string when input args normally, otherwise return nullptr.
590  * @see OH_UdsPixelMap
591  * @since 13
592  */
593 const char* OH_UdsPixelMap_GetType(OH_UdsPixelMap* pThis);
594 
595 /**
596  * @brief Get pixel map from the {@link OH_UdsPixelMap}.
597  *
598  * @param pThis Represents a pointer to an instance of {@link OH_UdsPixelMap}.
599  * @param pixelmapNative Represents output params of {@link OH_PixelmapNative}.
600  * @see OH_UdsPixelMap
601  * @since 13
602  */
603 void OH_UdsPixelMap_GetPixelMap(OH_UdsPixelMap* pThis, OH_PixelmapNative* pixelmapNative);
604 
605 /**
606  * @brief Set pixel map to the {@link OH_UdsPixelMap}.
607  *
608  * @param pThis Represents a pointer to an instance of {@link OH_UdsPixelMap}.
609  * @param pixelmapNative Represents a new {@link OH_PixelmapNative}.
610  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
611  *         {@link UDMF_E_OK} success.
612  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
613  * @see OH_UdsPixelMap Udmf_ErrCode
614  * @since 13
615  */
616 int OH_UdsPixelMap_SetPixelMap(OH_UdsPixelMap* pThis, OH_PixelmapNative* pixelmapNative);
617 
618 /**
619  * @brief Creation a pointer to the instance of the {@link OH_UdsArrayBuffer}.
620  *
621  * @return If the operation is successful, a pointer to the instance of the {@link OH_UdsArrayBuffer}
622  * structure is returned. If the memory is not enough, nullptr is returned.
623  * @see OH_UdsArrayBuffer
624  * @since 13
625  */
626 OH_UdsArrayBuffer* OH_UdsArrayBuffer_Create();
627 
628 /**
629  * @brief Destroy a pointer that points to the {@link OH_UdsArrayBuffer} instance.
630  *
631  * @param buffer Represents a pointer to an instance of {@link OH_UdsArrayBuffer}.
632  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
633  *         {@link UDMF_E_OK} success.
634  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
635  * @see OH_UdsArrayBuffer Udmf_ErrCode
636  * @since 13
637  */
638 int OH_UdsArrayBuffer_Destroy(OH_UdsArrayBuffer* buffer);
639 
640 /**
641  * @brief Set array buffer data to the {@link OH_UdsArrayBuffer}.
642  *
643  * @param buffer Represents a pointer to an instance of {@link OH_UdsArrayBuffer}.
644  * @param data Represents the array buffer data.
645  * @param len Represents the length of data param.
646  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
647  *         {@link UDMF_E_OK} success.
648  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
649  * @see OH_UdsArrayBuffer Udmf_ErrCode
650  * @since 13
651  */
652 int OH_UdsArrayBuffer_SetData(OH_UdsArrayBuffer* buffer, unsigned char* data, unsigned int len);
653 
654 /**
655  * @brief Get array buffer data from the {@link OH_UdsArrayBuffer}.
656  *
657  * @param buffer Represents a pointer to an instance of {@link OH_UdsArrayBuffer}.
658  * @param data Represents a pointer to array buffer data that is a output param.
659  * @param len Represents the array buffer data length that is a output param.
660  * @return Returns the status code of the execution. See {@link Udmf_ErrCode}.
661  *         {@link UDMF_E_OK} success.
662  *         {@link UDMF_E_INVALID_PARAM} The error code for common invalid args.
663  * @see OH_UdsArrayBuffer Udmf_ErrCode
664  * @since 13
665  */
666 int OH_UdsArrayBuffer_GetData(OH_UdsArrayBuffer* buffer, unsigned char** data, unsigned int* len);
667 
668 #ifdef __cplusplus
669 };
670 #endif
671 
672 /** @} */
673 #endif