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