udmf_sys/udmf/udmf_ffi.rs
1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6use ohos_sys_opaque_types::*;
7
8pub const UDMF_KEY_BUFFER_LEN: u32 = 512;
9#[cfg(feature = "api-12")]
10#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
11impl Udmf_Intention {
12 /// The intention is drag.
13 pub const DRAG: Udmf_Intention = Udmf_Intention(0);
14 /// The intention is pasteboard.
15 pub const PASTEBOARD: Udmf_Intention = Udmf_Intention(1);
16 /// The intention is data hub.
17 ///
18 ///
19 /// Available since API-level: 20
20 #[cfg(feature = "api-20")]
21 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
22 pub const DATA_HUB: Udmf_Intention = Udmf_Intention(2);
23 /// The intention is system share.
24 ///
25 ///
26 /// Available since API-level: 20
27 #[cfg(feature = "api-20")]
28 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
29 pub const SYSTEM_SHARE: Udmf_Intention = Udmf_Intention(3);
30 /// The intention is picker.
31 ///
32 ///
33 /// Available since API-level: 20
34 #[cfg(feature = "api-20")]
35 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
36 pub const PICKER: Udmf_Intention = Udmf_Intention(4);
37 /// The intention is menu.
38 ///
39 ///
40 /// Available since API-level: 20
41 #[cfg(feature = "api-20")]
42 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
43 pub const MENU: Udmf_Intention = Udmf_Intention(5);
44}
45#[repr(transparent)]
46/// Describe the intention type of the udmf.
47///
48///
49/// Available since API-level: 12
50#[cfg(feature = "api-12")]
51#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
52#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
53pub struct Udmf_Intention(pub ::core::ffi::c_uint);
54#[cfg(feature = "api-12")]
55#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
56impl Udmf_ShareOption {
57 /// Invalid share option.
58 pub const INVALID: Udmf_ShareOption = Udmf_ShareOption(0);
59 /// Allowed to be used in the same application on this device.
60 pub const IN_APP: Udmf_ShareOption = Udmf_ShareOption(1);
61 /// Allowed to be used in the cross application on this device.
62 pub const CROSS_APP: Udmf_ShareOption = Udmf_ShareOption(2);
63}
64#[repr(transparent)]
65/// Describe intra-device usage range type enumeration.
66///
67///
68/// Available since API-level: 12
69#[cfg(feature = "api-12")]
70#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
71#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
72pub struct Udmf_ShareOption(pub ::core::ffi::c_uint);
73#[cfg(feature = "api-15")]
74#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
75impl Udmf_FileConflictOptions {
76 /// Overwrite when dest uri has file with same name.
77 pub const UDMF_OVERWRITE: Udmf_FileConflictOptions = Udmf_FileConflictOptions(0);
78 /// Skip when dest uri has file with same name.
79 pub const UDMF_SKIP: Udmf_FileConflictOptions = Udmf_FileConflictOptions(1);
80}
81#[repr(transparent)]
82/// Describe the types of file conflict options when getting data from the udmf.
83///
84///
85/// Available since API-level: 15
86#[cfg(feature = "api-15")]
87#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
88#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
89pub struct Udmf_FileConflictOptions(pub ::core::ffi::c_uint);
90#[cfg(feature = "api-15")]
91#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
92impl Udmf_ProgressIndicator {
93 /// Getting data without system default progress indicator.
94 pub const UDMF_NONE: Udmf_ProgressIndicator = Udmf_ProgressIndicator(0);
95 /// Getting data with system default progress indicator.
96 pub const UDMF_DEFAULT: Udmf_ProgressIndicator = Udmf_ProgressIndicator(1);
97}
98#[repr(transparent)]
99/// Describe the types of progress indicator when getting data from the udmf.
100///
101///
102/// Available since API-level: 15
103#[cfg(feature = "api-15")]
104#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
105#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
106pub struct Udmf_ProgressIndicator(pub ::core::ffi::c_uint);
107#[cfg(feature = "api-20")]
108#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
109impl Udmf_Visibility {
110 /// The visibility level that specifies that any hap or native can be obtained.
111 pub const UDMF_ALL: Udmf_Visibility = Udmf_Visibility(0);
112 /// The visibility level that specifies that only data providers can be obtained.
113 pub const UDMF_OWN_PROCESS: Udmf_Visibility = Udmf_Visibility(1);
114}
115#[repr(transparent)]
116/// Describe the visibility range of data
117///
118///
119/// Available since API-level: 20
120#[cfg(feature = "api-20")]
121#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
122#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
123pub struct Udmf_Visibility(pub ::core::ffi::c_uint);
124/// Represents the udmf progress information.
125///
126///
127/// Available since API-level: 15
128#[cfg(feature = "api-15")]
129#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
130#[repr(C)]
131pub struct OH_Udmf_ProgressInfo {
132 _unused: [u8; 0],
133}
134/// Defines the callback function used to return the progress information and data.
135///
136/// # Arguments
137///
138/// * `progressInfo` - The progress information notified to Application.
139///
140/// * `data` - Represents the unified data.
141///
142/// Available since API-level: 15
143#[cfg(feature = "api-15")]
144#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
145pub type OH_Udmf_DataProgressListener = ::core::option::Option<
146 unsafe extern "C" fn(progressInfo: *mut OH_Udmf_ProgressInfo, data: *mut OH_UdmfData),
147>;
148/// Describes the optional arguments of data operation
149///
150///
151/// Available since API-level: 20
152#[cfg(feature = "api-20")]
153#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
154#[repr(C)]
155pub struct OH_UdmfOptions {
156 _unused: [u8; 0],
157}
158/// Indicates data loading information.
159///
160///
161/// Available since API-level: 20
162#[cfg(feature = "api-20")]
163#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
164#[repr(C)]
165pub struct OH_UdmfDataLoadInfo {
166 _unused: [u8; 0],
167}
168/// Indicates the callback function for loading data.
169///
170/// # Arguments
171///
172/// * `acceptableInfo` - Indicates the type and number of data that can be accepted by the receiver.
173///
174/// # Returns
175///
176/// * Returns the data to be loaded.
177///
178/// Available since API-level: 20
179#[cfg(feature = "api-20")]
180#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
181pub type OH_Udmf_DataLoadHandler = ::core::option::Option<
182 unsafe extern "C" fn(acceptableInfo: *mut OH_UdmfDataLoadInfo) -> *mut OH_UdmfData,
183>;
184/// Defines the callback function used free the context.
185/// # Arguments
186///
187/// * `context` - Pointer to the context which is to be free.
188///
189/// Available since API-level: 13
190#[cfg(feature = "api-13")]
191#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
192pub type UdmfData_Finalize =
193 ::core::option::Option<unsafe extern "C" fn(context: *mut ::core::ffi::c_void)>;
194/// Defines a callback function used to obtain data by type.
195///
196/// # Arguments
197///
198/// * `context` - Pointer to the context set by [`OH_UdmfRecordProvider_SetData`].
199///
200/// * `type` - Pointer to the type of data to obtain. For details, see [`udmf_meta.h`].
201///
202/// # Returns
203///
204/// * Returns the data content.
205///
206/// Available since API-level: 13
207#[cfg(feature = "api-13")]
208#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
209pub type OH_UdmfRecordProvider_GetData = ::core::option::Option<
210 unsafe extern "C" fn(
211 context: *mut ::core::ffi::c_void,
212 type_: *const ::core::ffi::c_char,
213 ) -> *mut ::core::ffi::c_void,
214>;
215extern "C" {
216 /// Creation a pointer to the instance of the [`OH_UdmfData`].
217 ///
218 ///
219 /// # Returns
220 ///
221 /// * If the operation is successful, a pointer to the instance of the [`OH_UdmfData`]
222 /// structure is returned. If the operation is failed, nullptr is returned.
223 /// [`OH_UdmfData.`]
224 /// Available since API-level: 12
225 #[cfg(feature = "api-12")]
226 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
227 pub fn OH_UdmfData_Create() -> *mut OH_UdmfData;
228 /// Destroy a pointer that points to the [`OH_UdmfData`] instance.
229 ///
230 /// # Arguments
231 ///
232 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfData`].
233 /// [`OH_UdmfData.`]
234 /// Available since API-level: 12
235 #[cfg(feature = "api-12")]
236 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
237 pub fn OH_UdmfData_Destroy(pThis: *mut OH_UdmfData);
238 /// Add one {OH_UdmfRecord} record to the [`OH_UdmfData`] data.
239 ///
240 /// # Arguments
241 ///
242 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfData`].
243 ///
244 /// * `record` - Represents a pointer to an instance of [`OH_UdmfRecord`].
245 ///
246 /// # Returns
247 ///
248 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
249 /// [`UDMF_E_OK`] success.
250 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
251 /// [`OH_UdmfData`] Udmf_ErrCode.
252 ///
253 /// Available since API-level: 12
254 #[cfg(feature = "api-12")]
255 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
256 pub fn OH_UdmfData_AddRecord(
257 pThis: *mut OH_UdmfData,
258 record: *mut OH_UdmfRecord,
259 ) -> ::core::ffi::c_int;
260 /// Check whether the type exists in the [`OH_UdmfData`] data.
261 ///
262 /// # Arguments
263 ///
264 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfData`].
265 ///
266 /// * `type` - Represents a string pointer of the type.
267 ///
268 /// # Returns
269 ///
270 /// * Returns the status of finding type.
271 /// `false` is not existed.
272 /// `true` is existed.
273 /// [`OH_UdmfData.`]
274 /// Available since API-level: 12
275 #[cfg(feature = "api-12")]
276 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
277 pub fn OH_UdmfData_HasType(pThis: *mut OH_UdmfData, type_: *const ::core::ffi::c_char) -> bool;
278 /// Get all types in the [`OH_UdmfData`] data.
279 ///
280 /// # Arguments
281 ///
282 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfData`].
283 ///
284 /// * `count` - Represents the types count that is a output param.
285 ///
286 /// # Returns
287 ///
288 /// * Returns string array that in [`OH_UdmfData`] when input parameters valid,
289 /// otherwise return nullptr.
290 /// [`OH_UdmfData.`]
291 /// Available since API-level: 12
292 #[cfg(feature = "api-12")]
293 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
294 pub fn OH_UdmfData_GetTypes(
295 pThis: *mut OH_UdmfData,
296 count: *mut ::core::ffi::c_uint,
297 ) -> *mut *mut ::core::ffi::c_char;
298 /// Get all records in the [`OH_UdmfData`] data.
299 ///
300 /// # Arguments
301 ///
302 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfData`].
303 ///
304 /// * `count` - Represents the records count that is a output param.
305 ///
306 /// # Returns
307 ///
308 /// * Returns [`OH_UdmfRecord`] pointer array when input parameters valid, otherwise return nullptr.
309 /// [`OH_UdmfData`] OH_UdmfRecord.
310 ///
311 /// Available since API-level: 12
312 #[cfg(feature = "api-12")]
313 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
314 pub fn OH_UdmfData_GetRecords(
315 pThis: *mut OH_UdmfData,
316 count: *mut ::core::ffi::c_uint,
317 ) -> *mut *mut OH_UdmfRecord;
318 /// Creates an [`OH_UdmfRecordProvider`] instance.
319 ///
320 ///
321 /// # Returns
322 ///
323 /// * Returns the pointer to the [`OH_UdmfRecordProvider`] instance created if the operation is successful.
324 /// Returns nullptr if the memory is not enough.
325 /// [`OH_UdmfRecordProvider.`]
326 /// Available since API-level: 13
327 #[cfg(feature = "api-13")]
328 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
329 pub fn OH_UdmfRecordProvider_Create() -> *mut OH_UdmfRecordProvider;
330 /// Destroy an [`OH_UdmfRecordProvider`] instance.
331 ///
332 /// # Arguments
333 ///
334 /// * `provider` - Pointer to the [`OH_UdmfRecordProvider`] instance to destroy.
335 ///
336 /// # Returns
337 ///
338 /// * Returns the status code of the execution. For details, see [`Udmf_ErrCode`].
339 /// Returns [`UDMF_E_OK`] if the operation is successful.
340 /// Returns [`UDMF_E_INVALID_PARAM`] if invalid args are detected.
341 /// [`OH_UdmfRecordProvider`] Udmf_ErrCode.
342 ///
343 /// Available since API-level: 13
344 #[cfg(feature = "api-13")]
345 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
346 pub fn OH_UdmfRecordProvider_Destroy(
347 provider: *mut OH_UdmfRecordProvider,
348 ) -> ::core::ffi::c_int;
349 /// Sets a callback function to obtain data.
350 ///
351 /// # Arguments
352 ///
353 /// * `provider` - Pointer to the [`OH_UdmfRecordProvider`] instance.
354 ///
355 /// * `context` - Pointer to the context set, which is the first parameter in OH_UdmfRecordProvider_GetData.
356 ///
357 /// * `callback` - Callback to set. For details, see [`OH_UdmfRecordProvider_GetData`].
358 ///
359 /// * `finalize` - Optional callback that can free context when destroy provider.
360 /// For details, see [`UdmfData_Finalize`].
361 ///
362 /// # Returns
363 ///
364 /// * Returns the status code of the execution. For details, see [`Udmf_ErrCode`].
365 /// Returns [`UDMF_E_OK`] if the operation is successful.
366 /// Returns [`UDMF_E_INVALID_PARAM`] if invalid args are detected.
367 /// [`OH_UdmfRecordProvider`] OH_UdmfRecordProvider_GetData UdmfData_Finalize Udmf_ErrCode.
368 ///
369 /// Available since API-level: 13
370 #[cfg(feature = "api-13")]
371 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
372 pub fn OH_UdmfRecordProvider_SetData(
373 provider: *mut OH_UdmfRecordProvider,
374 context: *mut ::core::ffi::c_void,
375 callback: OH_UdmfRecordProvider_GetData,
376 finalize: UdmfData_Finalize,
377 ) -> ::core::ffi::c_int;
378 /// Creation a pointer to the instance of the [`OH_UdmfRecord`], it's relate with UDS data.
379 ///
380 ///
381 /// # Returns
382 ///
383 /// * If the operation is successful, a pointer to the instance of the [`OH_UdmfRecord`]
384 /// structure is returned. If the operation is failed, nullptr is returned.
385 /// [`OH_UdmfRecord.`]
386 /// Available since API-level: 12
387 #[cfg(feature = "api-12")]
388 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
389 pub fn OH_UdmfRecord_Create() -> *mut OH_UdmfRecord;
390 /// Destroy a pointer that points to an instance of [`OH_UdmfRecord`].
391 ///
392 /// # Arguments
393 ///
394 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
395 /// [`OH_UdmfRecord.`]
396 /// Available since API-level: 12
397 #[cfg(feature = "api-12")]
398 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
399 pub fn OH_UdmfRecord_Destroy(pThis: *mut OH_UdmfRecord);
400 /// Add one custom data to the [`OH_UdmfRecord`] record.
401 ///
402 /// # Arguments
403 ///
404 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
405 ///
406 /// * `typeId` - Represents record type, reference udmf_meta.h.
407 ///
408 /// * `entry` - Represents custom data.
409 ///
410 /// * `count` - Represents the size of data param.
411 ///
412 /// # Returns
413 ///
414 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
415 /// [`UDMF_E_OK`] success.
416 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
417 /// [`OH_UdmfRecord`] Udmf_ErrCode.
418 ///
419 /// Available since API-level: 12
420 #[cfg(feature = "api-12")]
421 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
422 pub fn OH_UdmfRecord_AddGeneralEntry(
423 pThis: *mut OH_UdmfRecord,
424 typeId: *const ::core::ffi::c_char,
425 entry: *mut ::core::ffi::c_uchar,
426 count: ::core::ffi::c_uint,
427 ) -> ::core::ffi::c_int;
428 /// Add one {OH_UdsPlainText} data to the [`OH_UdmfRecord`] record.
429 ///
430 /// # Arguments
431 ///
432 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
433 ///
434 /// * `plainText` - Represents a pointer to an instance of [`OH_UdsPlainText`].
435 ///
436 /// # Returns
437 ///
438 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
439 /// [`UDMF_E_OK`] success.
440 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
441 /// [`OH_UdmfRecord`] OH_UdsPlainText Udmf_ErrCode.
442 ///
443 /// Available since API-level: 12
444 #[cfg(feature = "api-12")]
445 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
446 pub fn OH_UdmfRecord_AddPlainText(
447 pThis: *mut OH_UdmfRecord,
448 plainText: *mut OH_UdsPlainText,
449 ) -> ::core::ffi::c_int;
450 /// Add one {OH_UdsHyperlink} data to the [`OH_UdmfRecord`] record.
451 ///
452 /// # Arguments
453 ///
454 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
455 ///
456 /// * `hyperlink` - Represents a pointer to an instance of [`OH_UdsHyperlink`].
457 ///
458 /// # Returns
459 ///
460 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
461 /// [`UDMF_E_OK`] success.
462 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
463 /// [`OH_UdmfRecord`] OH_UdsHyperlink Udmf_ErrCode.
464 ///
465 /// Available since API-level: 12
466 #[cfg(feature = "api-12")]
467 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
468 pub fn OH_UdmfRecord_AddHyperlink(
469 pThis: *mut OH_UdmfRecord,
470 hyperlink: *mut OH_UdsHyperlink,
471 ) -> ::core::ffi::c_int;
472 /// Add one {OH_UdsHtml} data to the [`OH_UdmfRecord`] record.
473 ///
474 /// # Arguments
475 ///
476 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
477 ///
478 /// * `html` - Represents a pointer to an instance of [`OH_UdsHtml`].
479 ///
480 /// # Returns
481 ///
482 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
483 /// [`UDMF_E_OK`] success.
484 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
485 /// [`OH_UdmfRecord`] OH_UdsHtml Udmf_ErrCode.
486 ///
487 /// Available since API-level: 12
488 #[cfg(feature = "api-12")]
489 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
490 pub fn OH_UdmfRecord_AddHtml(
491 pThis: *mut OH_UdmfRecord,
492 html: *mut OH_UdsHtml,
493 ) -> ::core::ffi::c_int;
494 /// Add one {OH_UdsAppItem} data to the [`OH_UdmfRecord`] record.
495 ///
496 /// # Arguments
497 ///
498 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
499 ///
500 /// * `appItem` - Represents a pointer to an instance of [`OH_UdsAppItem`].
501 ///
502 /// # Returns
503 ///
504 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
505 /// [`UDMF_E_OK`] success.
506 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
507 /// [`OH_UdmfRecord`] OH_UdsAppItem Udmf_ErrCode.
508 ///
509 /// Available since API-level: 12
510 #[cfg(feature = "api-12")]
511 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
512 pub fn OH_UdmfRecord_AddAppItem(
513 pThis: *mut OH_UdmfRecord,
514 appItem: *mut OH_UdsAppItem,
515 ) -> ::core::ffi::c_int;
516 /// Add one {OH_UdsFileUri} data to the [`OH_UdmfRecord`] record.
517 ///
518 /// # Arguments
519 ///
520 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
521 ///
522 /// * `fileUri` - Represents a pointer to an instance of [`OH_UdsFileUri`].
523 ///
524 /// # Returns
525 ///
526 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
527 /// [`UDMF_E_OK`] success.
528 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
529 /// [`OH_UdmfRecord`] OH_UdsFileUri Udmf_ErrCode.
530 ///
531 /// Available since API-level: 13
532 #[cfg(feature = "api-13")]
533 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
534 pub fn OH_UdmfRecord_AddFileUri(
535 pThis: *mut OH_UdmfRecord,
536 fileUri: *mut OH_UdsFileUri,
537 ) -> ::core::ffi::c_int;
538 /// Add one {OH_UdsPixelMap} data to the [`OH_UdmfRecord`] record.
539 ///
540 /// # Arguments
541 ///
542 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
543 ///
544 /// * `pixelMap` - Represents a pointer to an instance of [`OH_UdsPixelMap`].
545 ///
546 /// # Returns
547 ///
548 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
549 /// [`UDMF_E_OK`] success.
550 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
551 /// [`OH_UdmfRecord`] OH_UdsPixelMap Udmf_ErrCode.
552 ///
553 /// Available since API-level: 13
554 #[cfg(feature = "api-13")]
555 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
556 pub fn OH_UdmfRecord_AddPixelMap(
557 pThis: *mut OH_UdmfRecord,
558 pixelMap: *mut OH_UdsPixelMap,
559 ) -> ::core::ffi::c_int;
560 /// Add one [`OH_UdsArrayBuffer`] data to the [`OH_UdmfRecord`] record.
561 ///
562 /// # Arguments
563 ///
564 /// * `record` - Represents a pointer to an instance of [`OH_UdmfRecord`].
565 ///
566 /// * `type` - Represents record type, reference udmf_meta.h.
567 ///
568 /// * `buffer` - Represents a pointer to an instance of [`OH_UdsArrayBuffer`].
569 ///
570 /// # Returns
571 ///
572 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
573 /// [`UDMF_E_OK`] success.
574 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
575 /// [`OH_UdmfRecord`] OH_UdsArrayBuffer Udmf_ErrCode.
576 ///
577 /// Available since API-level: 13
578 #[cfg(feature = "api-13")]
579 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
580 pub fn OH_UdmfRecord_AddArrayBuffer(
581 record: *mut OH_UdmfRecord,
582 type_: *const ::core::ffi::c_char,
583 buffer: *mut OH_UdsArrayBuffer,
584 ) -> ::core::ffi::c_int;
585 /// Add one [`OH_UdsContentForm`] data to the [`OH_UdmfRecord`] record.
586 ///
587 /// # Arguments
588 ///
589 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
590 ///
591 /// * `contentForm` - Represents a pointer to an instance of [`OH_UdsContentForm`].
592 ///
593 /// # Returns
594 ///
595 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
596 /// [`UDMF_E_OK`] success.
597 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
598 /// [`OH_UdmfRecord`] OH_UdsContentForm Udmf_ErrCode.
599 ///
600 /// Available since API-level: 14
601 #[cfg(feature = "api-14")]
602 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
603 pub fn OH_UdmfRecord_AddContentForm(
604 pThis: *mut OH_UdmfRecord,
605 contentForm: *mut OH_UdsContentForm,
606 ) -> ::core::ffi::c_int;
607 /// Get all types in the [`OH_UdmfRecord`] record.
608 ///
609 /// # Arguments
610 ///
611 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
612 ///
613 /// * `count` - Represents the types count that is a output param.
614 ///
615 /// # Returns
616 ///
617 /// * Returns string array that in [`OH_UdmfRecord`] when input parameters valid,
618 /// otherwise return nullptr.
619 /// [`OH_UdmfRecord.`]
620 /// Available since API-level: 12
621 #[cfg(feature = "api-12")]
622 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
623 pub fn OH_UdmfRecord_GetTypes(
624 pThis: *mut OH_UdmfRecord,
625 count: *mut ::core::ffi::c_uint,
626 ) -> *mut *mut ::core::ffi::c_char;
627 /// Get one entry data from the [`OH_UdmfRecord`] record.
628 ///
629 /// # Arguments
630 ///
631 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
632 ///
633 /// * `typeId` - Represents record type, reference udmf_meta.h.
634 ///
635 /// * `entry` - Represents a pointer to entry data that is a output param.
636 ///
637 /// * `count` - Represents the entry data length that is a output param.
638 ///
639 /// # Returns
640 ///
641 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
642 /// [`UDMF_E_OK`] success.
643 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
644 /// [`UDMF_ERR`] Internal data error.
645 /// [`OH_UdmfRecord`] Udmf_ErrCode.
646 ///
647 /// Available since API-level: 12
648 #[cfg(feature = "api-12")]
649 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
650 pub fn OH_UdmfRecord_GetGeneralEntry(
651 pThis: *mut OH_UdmfRecord,
652 typeId: *const ::core::ffi::c_char,
653 entry: *mut *mut ::core::ffi::c_uchar,
654 count: *mut ::core::ffi::c_uint,
655 ) -> ::core::ffi::c_int;
656 /// Get one {OH_UdsPlainText} data from the [`OH_UdmfRecord`] record.
657 ///
658 /// # Arguments
659 ///
660 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
661 ///
662 /// * `plainText` - Represents a pointer to an instance of [`OH_UdsPlainText`].
663 ///
664 /// # Returns
665 ///
666 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
667 /// [`UDMF_E_OK`] success.
668 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
669 /// [`UDMF_ERR`] Internal data error.
670 /// [`OH_UdmfRecord`] OH_UdsPlainText Udmf_ErrCode.
671 ///
672 /// Available since API-level: 12
673 #[cfg(feature = "api-12")]
674 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
675 pub fn OH_UdmfRecord_GetPlainText(
676 pThis: *mut OH_UdmfRecord,
677 plainText: *mut OH_UdsPlainText,
678 ) -> ::core::ffi::c_int;
679 /// Get one {OH_UdsHyperlink} data from the [`OH_UdmfRecord`] record.
680 ///
681 /// # Arguments
682 ///
683 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
684 ///
685 /// * `hyperlink` - Represents a pointer to an instance of [`OH_UdsHyperlink`].
686 ///
687 /// # Returns
688 ///
689 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
690 /// [`UDMF_E_OK`] success.
691 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
692 /// [`UDMF_ERR`] Internal data error.
693 /// [`OH_UdmfRecord`] OH_UdsHyperlink Udmf_ErrCode.
694 ///
695 /// Available since API-level: 12
696 #[cfg(feature = "api-12")]
697 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
698 pub fn OH_UdmfRecord_GetHyperlink(
699 pThis: *mut OH_UdmfRecord,
700 hyperlink: *mut OH_UdsHyperlink,
701 ) -> ::core::ffi::c_int;
702 /// Get one {OH_UdsHtml} data from the [`OH_UdmfRecord`] record.
703 ///
704 /// # Arguments
705 ///
706 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
707 ///
708 /// * `html` - Represents a pointer to an instance of [`OH_UdsHtml`].
709 ///
710 /// # Returns
711 ///
712 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
713 /// [`UDMF_E_OK`] success.
714 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
715 /// [`UDMF_ERR`] Internal data error.
716 /// [`OH_UdmfRecord`] OH_UdsHtml Udmf_ErrCode.
717 ///
718 /// Available since API-level: 12
719 #[cfg(feature = "api-12")]
720 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
721 pub fn OH_UdmfRecord_GetHtml(
722 pThis: *mut OH_UdmfRecord,
723 html: *mut OH_UdsHtml,
724 ) -> ::core::ffi::c_int;
725 /// Get one {OH_UdsAppItem} data from the [`OH_UdmfRecord`] record.
726 ///
727 /// # Arguments
728 ///
729 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
730 ///
731 /// * `appItem` - Represents a pointer to an instance of [`OH_UdsAppItem`].
732 ///
733 /// # Returns
734 ///
735 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
736 /// [`UDMF_E_OK`] success.
737 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
738 /// [`UDMF_ERR`] Internal data error.
739 /// [`OH_UdmfRecord`] OH_UdsAppItem Udmf_ErrCode.
740 ///
741 /// Available since API-level: 12
742 #[cfg(feature = "api-12")]
743 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
744 pub fn OH_UdmfRecord_GetAppItem(
745 pThis: *mut OH_UdmfRecord,
746 appItem: *mut OH_UdsAppItem,
747 ) -> ::core::ffi::c_int;
748 /// Get one {OH_UdsFileUri} data from the [`OH_UdmfRecord`] record.
749 ///
750 /// # Arguments
751 ///
752 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
753 ///
754 /// * `fileUri` - Represents a pointer to an instance of [`OH_UdsFileUri`].
755 ///
756 /// # Returns
757 ///
758 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
759 /// [`UDMF_E_OK`] success.
760 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
761 /// [`OH_UdmfRecord`] OH_UdsFileUri Udmf_ErrCode.
762 ///
763 /// Available since API-level: 13
764 #[cfg(feature = "api-13")]
765 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
766 pub fn OH_UdmfRecord_GetFileUri(
767 pThis: *mut OH_UdmfRecord,
768 fileUri: *mut OH_UdsFileUri,
769 ) -> ::core::ffi::c_int;
770 /// Get one {OH_UdsPixelMap} data from the [`OH_UdmfRecord`] record.
771 ///
772 /// # Arguments
773 ///
774 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
775 ///
776 /// * `pixelMap` - Represents a pointer to an instance of [`OH_UdsPixelMap`].
777 ///
778 /// # Returns
779 ///
780 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
781 /// [`UDMF_E_OK`] success.
782 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
783 /// [`OH_UdmfRecord`] OH_UdsPixelMap Udmf_ErrCode.
784 ///
785 /// Available since API-level: 13
786 #[cfg(feature = "api-13")]
787 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
788 pub fn OH_UdmfRecord_GetPixelMap(
789 pThis: *mut OH_UdmfRecord,
790 pixelMap: *mut OH_UdsPixelMap,
791 ) -> ::core::ffi::c_int;
792 /// Set the data provider of the types.
793 ///
794 /// # Arguments
795 ///
796 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
797 ///
798 /// * `types` - Represents a pointer to a group of data types;
799 ///
800 /// * `count` - Represents the number of data types;
801 ///
802 /// * `provider` - Represents a pointer an instance of [`OH_UdmfRecordProvider`].
803 ///
804 /// # Returns
805 ///
806 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
807 /// [`UDMF_E_OK`] success.
808 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
809 /// [`OH_UdmfRecord`] OH_UdmfRecordProvider Udmf_ErrCode.
810 ///
811 /// Available since API-level: 13
812 #[cfg(feature = "api-13")]
813 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
814 pub fn OH_UdmfRecord_SetProvider(
815 pThis: *mut OH_UdmfRecord,
816 types: *const *const ::core::ffi::c_char,
817 count: ::core::ffi::c_uint,
818 provider: *mut OH_UdmfRecordProvider,
819 ) -> ::core::ffi::c_int;
820 /// Get one [`OH_UdsArrayBuffer`] data from the [`OH_UdmfRecord`] record.
821 ///
822 /// # Arguments
823 ///
824 /// * `record` - Represents a pointer to an instance of [`OH_UdmfRecord`].
825 ///
826 /// * `type` - Represents record type, reference udmf_meta.h.
827 ///
828 /// * `buffer` - Represents a pointer to an instance of [`OH_UdsArrayBuffer`].
829 ///
830 /// # Returns
831 ///
832 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
833 /// [`UDMF_E_OK`] success.
834 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
835 /// [`OH_UdmfRecord`] OH_UdsArrayBuffer Udmf_ErrCode.
836 ///
837 /// Available since API-level: 13
838 #[cfg(feature = "api-13")]
839 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
840 pub fn OH_UdmfRecord_GetArrayBuffer(
841 record: *mut OH_UdmfRecord,
842 type_: *const ::core::ffi::c_char,
843 buffer: *mut OH_UdsArrayBuffer,
844 ) -> ::core::ffi::c_int;
845 /// Get one [`OH_UdsContentForm`] data from the [`OH_UdmfRecord`] record.
846 ///
847 /// # Arguments
848 ///
849 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfRecord`].
850 ///
851 /// * `contentForm` - Represents a pointer to an instance of [`OH_UdsContentForm`].
852 ///
853 /// # Returns
854 ///
855 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
856 /// [`UDMF_E_OK`] success.
857 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
858 /// [`OH_UdmfRecord`] OH_UdsContentForm Udmf_ErrCode.
859 ///
860 /// Available since API-level: 14
861 #[cfg(feature = "api-14")]
862 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
863 pub fn OH_UdmfRecord_GetContentForm(
864 pThis: *mut OH_UdmfRecord,
865 contentForm: *mut OH_UdsContentForm,
866 ) -> ::core::ffi::c_int;
867 /// Get primary [`OH_UdsPlainText`] data from the [`OH_UdmfData`].
868 ///
869 /// # Arguments
870 ///
871 /// * `data` - Represents a pointer to an instance of [`OH_UdmfData`].
872 ///
873 /// * `plainText` - Represents a pointer to an instance of [`OH_UdsPlainText`].
874 ///
875 /// # Returns
876 ///
877 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
878 /// [`UDMF_E_OK`] success.
879 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
880 /// [`OH_UdmfData`] OH_UdsPlainText Udmf_ErrCode.
881 ///
882 /// Available since API-level: 13
883 #[cfg(feature = "api-13")]
884 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
885 pub fn OH_UdmfData_GetPrimaryPlainText(
886 data: *mut OH_UdmfData,
887 plainText: *mut OH_UdsPlainText,
888 ) -> ::core::ffi::c_int;
889 /// Get one [`OH_UdsHtml`] data from the [`OH_UdmfData`].
890 ///
891 /// # Arguments
892 ///
893 /// * `data` - Represents a pointer to an instance of [`OH_UdmfData`].
894 ///
895 /// * `html` - Represents a pointer to an instance of [`OH_UdsHtml`].
896 ///
897 /// # Returns
898 ///
899 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
900 /// [`UDMF_E_OK`] success.
901 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
902 /// [`OH_UdmfData`] OH_UdsHtml Udmf_ErrCode.
903 ///
904 /// Available since API-level: 13
905 #[cfg(feature = "api-13")]
906 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
907 pub fn OH_UdmfData_GetPrimaryHtml(
908 data: *mut OH_UdmfData,
909 html: *mut OH_UdsHtml,
910 ) -> ::core::ffi::c_int;
911 /// Get the count of [`OH_UdmfRecord`] in the [`OH_UdmfData`].
912 ///
913 /// # Arguments
914 ///
915 /// * `data` - Represents a pointer to an instance of [`OH_UdmfData`].
916 ///
917 /// # Returns
918 ///
919 /// * Returns the count of [`OH_UdmfRecord`]
920 /// [`OH_UdmfData.`]
921 /// Available since API-level: 13
922 #[cfg(feature = "api-13")]
923 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
924 pub fn OH_UdmfData_GetRecordCount(data: *mut OH_UdmfData) -> ::core::ffi::c_int;
925 /// Get the record of the specified index from the [`OH_UdmfData`].
926 ///
927 /// # Arguments
928 ///
929 /// * `data` - Represents a pointer to an instance of [`OH_UdmfData`].
930 ///
931 /// * `index` - Represents the index of [`OH_UdmfRecord`] in the [`OH_UdmfData`].
932 ///
933 /// # Returns
934 ///
935 /// * Returns [`OH_UdmfRecord`] pointer when input parameters valid, otherwise return nullptr.
936 /// [`OH_UdmfData.`]
937 /// Available since API-level: 13
938 #[cfg(feature = "api-13")]
939 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
940 pub fn OH_UdmfData_GetRecord(
941 data: *mut OH_UdmfData,
942 index: ::core::ffi::c_uint,
943 ) -> *mut OH_UdmfRecord;
944 /// Checks whether the UDMF data is from a local device.
945 ///
946 /// # Arguments
947 ///
948 /// * `data` - Represents a pointer to an instance of [`OH_UdmfData`].
949 ///
950 /// # Returns
951 ///
952 /// * Returns a boolean value, which indicates whether the UDMF data is from a local device.
953 /// The value `true` means the data is from a local device.
954 /// The value `false` means the opposite.
955 /// [`OH_UdmfData.`]
956 /// Available since API-level: 13
957 #[cfg(feature = "api-13")]
958 #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
959 pub fn OH_UdmfData_IsLocal(data: *mut OH_UdmfData) -> bool;
960 /// Creation a pointer to the instance of the [`OH_UdmfProperty`]
961 /// from a [`OH_UdmfData`] data.
962 ///
963 /// # Arguments
964 ///
965 /// * `unifiedData` - Represents a pointer to an instance of [`OH_UdmfData`].
966 ///
967 /// # Returns
968 ///
969 /// * If the operation is successful, a pointer to the instance of the [`OH_UdmfProperty`]
970 /// structure is returned. If the operation is failed, nullptr is returned.
971 /// [`OH_UdmfData`] OH_UdmfProperty.
972 ///
973 /// Available since API-level: 12
974 #[cfg(feature = "api-12")]
975 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
976 pub fn OH_UdmfProperty_Create(unifiedData: *mut OH_UdmfData) -> *mut OH_UdmfProperty;
977 /// Destroy a pointer that points to the [`OH_UdmfProperty`] instance.
978 ///
979 /// # Arguments
980 ///
981 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
982 /// [`OH_UdmfProperty.`]
983 /// Available since API-level: 12
984 #[cfg(feature = "api-12")]
985 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
986 pub fn OH_UdmfProperty_Destroy(pThis: *mut OH_UdmfProperty);
987 /// Get tag value from the [`OH_UdmfProperty`].
988 ///
989 /// # Arguments
990 ///
991 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
992 ///
993 /// # Returns
994 ///
995 /// * Returns a pointer of the tag value string when input parameters valid, otherwise return nullptr.
996 /// [`OH_UdmfProperty.`]
997 /// Available since API-level: 12
998 #[cfg(feature = "api-12")]
999 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1000 pub fn OH_UdmfProperty_GetTag(pThis: *mut OH_UdmfProperty) -> *const ::core::ffi::c_char;
1001 /// Get timestamp value from the [`OH_UdmfProperty`].
1002 ///
1003 /// # Arguments
1004 ///
1005 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
1006 ///
1007 /// # Returns
1008 ///
1009 /// * Returns timestamp value.
1010 /// [`OH_UdmfProperty`]
1011 /// Available since API-level: 12
1012 #[cfg(feature = "api-12")]
1013 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1014 pub fn OH_UdmfProperty_GetTimestamp(pThis: *mut OH_UdmfProperty) -> i64;
1015 /// Get share option value from the [`OH_UdmfProperty`].
1016 ///
1017 /// # Arguments
1018 ///
1019 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
1020 ///
1021 /// # Returns
1022 ///
1023 /// * Returns [`Udmf_ShareOption`] value.
1024 /// [`OH_UdmfProperty`] Udmf_ShareOption
1025 ///
1026 /// Available since API-level: 12
1027 #[cfg(feature = "api-12")]
1028 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1029 pub fn OH_UdmfProperty_GetShareOption(pThis: *mut OH_UdmfProperty) -> Udmf_ShareOption;
1030 /// Get integer value by key from the [`OH_UdmfProperty`].
1031 ///
1032 /// # Arguments
1033 ///
1034 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
1035 ///
1036 /// * `key` - Represents key-value pair's key
1037 ///
1038 /// * `defaultValue` - Represents when get value failure.
1039 ///
1040 /// # Returns
1041 ///
1042 /// * Returns value associated with the key in successfully, otherwise return defaultValue.
1043 /// [`OH_UdmfProperty.`]
1044 /// Available since API-level: 12
1045 #[cfg(feature = "api-12")]
1046 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1047 pub fn OH_UdmfProperty_GetExtrasIntParam(
1048 pThis: *mut OH_UdmfProperty,
1049 key: *const ::core::ffi::c_char,
1050 defaultValue: ::core::ffi::c_int,
1051 ) -> ::core::ffi::c_int;
1052 /// Get tag value from the [`OH_UdmfProperty`].
1053 ///
1054 /// # Arguments
1055 ///
1056 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
1057 ///
1058 /// * `key` - Represents key-value pair's key.
1059 ///
1060 /// # Returns
1061 ///
1062 /// * Returns a pointer of the key value string when input parameters valid, otherwise return nullptr.
1063 /// [`OH_UdmfProperty`]
1064 /// Available since API-level: 12
1065 #[cfg(feature = "api-12")]
1066 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1067 pub fn OH_UdmfProperty_GetExtrasStringParam(
1068 pThis: *mut OH_UdmfProperty,
1069 key: *const ::core::ffi::c_char,
1070 ) -> *const ::core::ffi::c_char;
1071 /// Set tag value to [`OH_UdmfProperty`] .
1072 ///
1073 /// # Arguments
1074 ///
1075 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
1076 ///
1077 /// * `tag` - Represents new tag param.
1078 ///
1079 /// # Returns
1080 ///
1081 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1082 /// [`UDMF_E_OK`] success.
1083 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1084 /// [`OH_UdmfProperty`] Udmf_ErrCode.
1085 ///
1086 /// Available since API-level: 12
1087 #[cfg(feature = "api-12")]
1088 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1089 pub fn OH_UdmfProperty_SetTag(
1090 pThis: *mut OH_UdmfProperty,
1091 tag: *const ::core::ffi::c_char,
1092 ) -> ::core::ffi::c_int;
1093 /// Set Udmf_ShareOption value to [`OH_UdmfProperty`].
1094 ///
1095 /// # Arguments
1096 ///
1097 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
1098 ///
1099 /// * `option` - Represents new [`Udmf_ShareOption`] param.
1100 ///
1101 /// # Returns
1102 ///
1103 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1104 /// [`UDMF_E_OK`] success.
1105 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1106 /// [`OH_UdmfProperty`] Udmf_ShareOption Udmf_ErrCode.
1107 ///
1108 /// Available since API-level: 12
1109 #[cfg(feature = "api-12")]
1110 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1111 pub fn OH_UdmfProperty_SetShareOption(
1112 pThis: *mut OH_UdmfProperty,
1113 option: Udmf_ShareOption,
1114 ) -> ::core::ffi::c_int;
1115 /// Set extras param to [`OH_UdmfProperty`].
1116 ///
1117 /// # Arguments
1118 ///
1119 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
1120 ///
1121 /// * `key` - Represents extras param's key value.
1122 ///
1123 /// * `param` - Represents value of k-v pairs.
1124 ///
1125 /// # Returns
1126 ///
1127 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1128 /// [`UDMF_E_OK`] success.
1129 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1130 /// [`OH_UdmfProperty`] Udmf_ErrCode.
1131 ///
1132 /// Available since API-level: 12
1133 #[cfg(feature = "api-12")]
1134 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1135 pub fn OH_UdmfProperty_SetExtrasIntParam(
1136 pThis: *mut OH_UdmfProperty,
1137 key: *const ::core::ffi::c_char,
1138 param: ::core::ffi::c_int,
1139 ) -> ::core::ffi::c_int;
1140 /// Set extras param to [`OH_UdmfProperty`].
1141 ///
1142 /// # Arguments
1143 ///
1144 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfProperty`].
1145 ///
1146 /// * `key` - Represents extras param's key value.
1147 ///
1148 /// * `param` - Represents value of k-v pairs.
1149 ///
1150 /// # Returns
1151 ///
1152 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1153 /// [`UDMF_E_OK`] success.
1154 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1155 /// [`OH_UdmfProperty`] Udmf_ErrCode.
1156 ///
1157 /// Available since API-level: 12
1158 #[cfg(feature = "api-12")]
1159 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1160 pub fn OH_UdmfProperty_SetExtrasStringParam(
1161 pThis: *mut OH_UdmfProperty,
1162 key: *const ::core::ffi::c_char,
1163 param: *const ::core::ffi::c_char,
1164 ) -> ::core::ffi::c_int;
1165 /// Creation a pointer to the instance of the [`OH_UdmfOptions`].
1166 ///
1167 ///
1168 /// # Returns
1169 ///
1170 /// * If the operation is successful, a pointer to the instance of the [`OH_UdmfOptions`]
1171 /// structure is returned. If the operation is failed, nullptr is returned.
1172 /// [`OH_UdmfOptions.`]
1173 /// Available since API-level: 20
1174 #[cfg(feature = "api-20")]
1175 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1176 pub fn OH_UdmfOptions_Create() -> *mut OH_UdmfOptions;
1177 /// Destroy the heap memory pointed to by the pointer of [`OH_UdmfOptions`].
1178 /// Note that this function cannot be called repeatedly for the same pointer.
1179 ///
1180 /// # Arguments
1181 ///
1182 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1183 /// [`OH_UdmfOptions.`]
1184 /// Available since API-level: 20
1185 #[cfg(feature = "api-20")]
1186 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1187 pub fn OH_UdmfOptions_Destroy(pThis: *mut OH_UdmfOptions);
1188 /// Get key from the [`OH_UdmfOptions`].
1189 ///
1190 /// # Arguments
1191 ///
1192 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1193 ///
1194 /// # Returns
1195 ///
1196 /// * Returns a pointer of the value string when input args normally, otherwise return nullptr.
1197 /// [`OH_UdmfOptions`]
1198 /// Available since API-level: 20
1199 #[cfg(feature = "api-20")]
1200 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1201 pub fn OH_UdmfOptions_GetKey(pThis: *mut OH_UdmfOptions) -> *const ::core::ffi::c_char;
1202 /// Set the key to the [`OH_UdmfOptions`].
1203 ///
1204 /// # Arguments
1205 ///
1206 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1207 ///
1208 /// * `key` - Represents a new string value of the key.
1209 ///
1210 /// # Returns
1211 ///
1212 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1213 /// [`UDMF_E_OK`] success.
1214 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1215 /// [`OH_UdmfOptions`] Udmf_ErrCode
1216 ///
1217 /// Available since API-level: 20
1218 #[cfg(feature = "api-20")]
1219 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1220 pub fn OH_UdmfOptions_SetKey(
1221 pThis: *mut OH_UdmfOptions,
1222 key: *const ::core::ffi::c_char,
1223 ) -> ::core::ffi::c_int;
1224 /// Get intention from the [`OH_UdmfOptions`].
1225 ///
1226 /// # Arguments
1227 ///
1228 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1229 ///
1230 /// # Returns
1231 ///
1232 /// * Returns [`Udmf_Intention`] value.
1233 /// [`OH_UdmfOptions`] Udmf_Intention
1234 ///
1235 /// Available since API-level: 20
1236 #[cfg(feature = "api-20")]
1237 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1238 pub fn OH_UdmfOptions_GetIntention(pThis: *mut OH_UdmfOptions) -> Udmf_Intention;
1239 /// Set intention value to [`OH_UdmfOptions`].
1240 ///
1241 /// # Arguments
1242 ///
1243 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1244 ///
1245 /// * `intention` - Represents new [`Udmf_Intention`] param.
1246 ///
1247 /// # Returns
1248 ///
1249 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1250 /// [`UDMF_E_OK`] success.
1251 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1252 /// [`OH_UdmfOptions`] Udmf_Intention Udmf_ErrCode.
1253 ///
1254 /// Available since API-level: 20
1255 #[cfg(feature = "api-20")]
1256 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1257 pub fn OH_UdmfOptions_SetIntention(
1258 pThis: *mut OH_UdmfOptions,
1259 intention: Udmf_Intention,
1260 ) -> ::core::ffi::c_int;
1261 /// Reset [`OH_UdmfOptions`] to default.
1262 ///
1263 /// # Arguments
1264 ///
1265 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1266 ///
1267 /// # Returns
1268 ///
1269 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1270 /// [`UDMF_E_OK`] success.
1271 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1272 /// [`OH_UdmfOptions`] Udmf_ErrCode.
1273 ///
1274 /// Available since API-level: 20
1275 #[cfg(feature = "api-20")]
1276 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1277 pub fn OH_UdmfOptions_Reset(pThis: *mut OH_UdmfOptions) -> ::core::ffi::c_int;
1278 /// Get visibility from the [`OH_UdmfOptions`].
1279 ///
1280 /// # Arguments
1281 ///
1282 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1283 ///
1284 /// # Returns
1285 ///
1286 /// * Returns [`Udmf_Visibility`] value.
1287 /// [`OH_UdmfOptions`] Udmf_Visibility
1288 ///
1289 /// Available since API-level: 20
1290 #[cfg(feature = "api-20")]
1291 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1292 pub fn OH_UdmfOptions_GetVisibility(pThis: *mut OH_UdmfOptions) -> Udmf_Visibility;
1293 /// Set visibility value to [`OH_UdmfOptions`].
1294 ///
1295 /// # Arguments
1296 ///
1297 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1298 ///
1299 /// * `visibility` - Represents new [`Udmf_Visibility`] param.
1300 ///
1301 /// # Returns
1302 ///
1303 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1304 /// [`UDMF_E_OK`] success.
1305 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1306 /// [`OH_UdmfOptions`] Udmf_Visibility Udmf_ErrCode.
1307 ///
1308 /// Available since API-level: 20
1309 #[cfg(feature = "api-20")]
1310 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1311 pub fn OH_UdmfOptions_SetVisibility(
1312 pThis: *mut OH_UdmfOptions,
1313 visibility: Udmf_Visibility,
1314 ) -> ::core::ffi::c_int;
1315 /// Get [`OH_UdmfData`] data from udmf database.
1316 ///
1317 /// # Arguments
1318 ///
1319 /// * `key` - Represents database store's key value.
1320 ///
1321 /// * `intention` - Represents data type [`Udmf_Intention`]
1322 ///
1323 /// * `unifiedData` - Represents output params of [`OH_UdmfData`];
1324 ///
1325 /// # Returns
1326 ///
1327 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1328 /// [`UDMF_E_OK`] success.
1329 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1330 /// [`UDMF_ERR`] Internal data error.
1331 /// The possible cause is that the server is faulty or the memory is insufficient.
1332 /// [`OH_UdmfProperty`] Udmf_Intention Udmf_ErrCode.
1333 ///
1334 /// Available since API-level: 12
1335 #[cfg(feature = "api-12")]
1336 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1337 pub fn OH_Udmf_GetUnifiedData(
1338 key: *const ::core::ffi::c_char,
1339 intention: Udmf_Intention,
1340 unifiedData: *mut OH_UdmfData,
1341 ) -> ::core::ffi::c_int;
1342 /// Get [`OH_UdmfData`] data array from udmf database by intention.
1343 ///
1344 /// # Arguments
1345 ///
1346 /// * `options` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1347 ///
1348 /// * `dataArray` - Represents output params of [`OH_UdmfData`].
1349 /// It should be accessed using [`OH_UDMF_GetDataElementAt`] to retrieve elements by index.
1350 /// This pointer needs to be released using the [`OH_Udmf_DestroyDataArray`] function.
1351 ///
1352 /// * `dataSize` - Represents the data count of output params.
1353 ///
1354 /// # Returns
1355 ///
1356 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1357 /// [`UDMF_E_OK`] success.
1358 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1359 /// [`UDMF_ERR`] Internal data error.
1360 /// The possible cause is that the server is faulty or the memory is insufficient.
1361 /// [`OH_UdmfData`] Udmf_Intention Udmf_ErrCode.
1362 ///
1363 /// Available since API-level: 20
1364 #[cfg(feature = "api-20")]
1365 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1366 pub fn OH_Udmf_GetUnifiedDataByOptions(
1367 options: *mut OH_UdmfOptions,
1368 dataArray: *mut *mut OH_UdmfData,
1369 dataSize: *mut ::core::ffi::c_uint,
1370 ) -> ::core::ffi::c_int;
1371 /// Set [`OH_UdmfData`] data to database.
1372 ///
1373 /// # Arguments
1374 ///
1375 /// * `intention` - Represents data type [`Udmf_Intention`].
1376 ///
1377 /// * `unifiedData` - Represents a pointer to an instance of [`OH_UdmfData`].
1378 ///
1379 /// * `key` - Represents return value after set data to database successfully,
1380 /// it's memory size not less than [`UDMF_KEY_BUFFER_LEN`].
1381 ///
1382 /// * `keyLen` - Represents size of key param.
1383 ///
1384 /// # Returns
1385 ///
1386 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1387 /// [`UDMF_E_OK`] success.
1388 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1389 /// [`UDMF_ERR`] Internal data error.
1390 /// The possible cause is that the server is faulty or the memory is insufficient.
1391 /// [`OH_UdmfProperty`] Udmf_Intention Udmf_ErrCode.
1392 ///
1393 /// Available since API-level: 12
1394 #[cfg(feature = "api-12")]
1395 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1396 pub fn OH_Udmf_SetUnifiedData(
1397 intention: Udmf_Intention,
1398 unifiedData: *mut OH_UdmfData,
1399 key: *mut ::core::ffi::c_char,
1400 keyLen: ::core::ffi::c_uint,
1401 ) -> ::core::ffi::c_int;
1402 /// Set [`OH_UdmfData`] data to database with options.
1403 ///
1404 /// # Arguments
1405 ///
1406 /// * `options` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1407 ///
1408 /// * `unifiedData` - Represents a pointer to an instance of [`OH_UdmfData`].
1409 ///
1410 /// * `key` - Represents return value after set data to database successfully,
1411 /// it's memory size not less than [`UDMF_KEY_BUFFER_LEN`].
1412 ///
1413 /// * `keyLen` - Represents size of key param.
1414 ///
1415 /// # Returns
1416 ///
1417 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1418 /// [`UDMF_E_OK`] success.
1419 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1420 /// [`UDMF_ERR`] Internal data error.
1421 /// The possible cause is that the server is faulty or the memory is insufficient.
1422 /// [`OH_UdmfOptions`] OH_UdmfData Udmf_ErrCode.
1423 ///
1424 /// Available since API-level: 20
1425 #[cfg(feature = "api-20")]
1426 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1427 pub fn OH_Udmf_SetUnifiedDataByOptions(
1428 options: *mut OH_UdmfOptions,
1429 unifiedData: *mut OH_UdmfData,
1430 key: *mut ::core::ffi::c_char,
1431 keyLen: ::core::ffi::c_uint,
1432 ) -> ::core::ffi::c_int;
1433 /// Update [`OH_UdmfData`] data to database with options.
1434 ///
1435 /// # Arguments
1436 ///
1437 /// * `options` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1438 ///
1439 /// * `unifiedData` - Represents a pointer to an instance of [`OH_UdmfData`].
1440 ///
1441 /// # Returns
1442 ///
1443 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1444 /// [`UDMF_E_OK`] success.
1445 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1446 /// [`UDMF_ERR`] Internal data error.
1447 /// The possible cause is that the server is faulty or the memory is insufficient.
1448 /// [`OH_UdmfOptions`] OH_UdmfData Udmf_ErrCode.
1449 ///
1450 /// Available since API-level: 20
1451 #[cfg(feature = "api-20")]
1452 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1453 pub fn OH_Udmf_UpdateUnifiedData(
1454 options: *mut OH_UdmfOptions,
1455 unifiedData: *mut OH_UdmfData,
1456 ) -> ::core::ffi::c_int;
1457 /// Delete [`OH_UdmfData`] data of database with options.
1458 ///
1459 /// # Arguments
1460 ///
1461 /// * `options` - Represents a pointer to an instance of [`OH_UdmfOptions`].
1462 ///
1463 /// * `dataArray` - Represents output params of [`OH_UdmfData`].
1464 /// It should be accessed using [`OH_UDMF_GetDataElementAt`] to retrieve elements by index.
1465 /// This pointer needs to be released using the [`OH_Udmf_DestroyDataArray`] function.
1466 ///
1467 /// * `dataSize` - Represents the data count of output params.
1468 ///
1469 /// # Returns
1470 ///
1471 /// * Returns the status code of the execution. See [`Udmf_ErrCode`].
1472 /// [`UDMF_E_OK`] success.
1473 /// [`UDMF_E_INVALID_PARAM`] The error code for common invalid args.
1474 /// [`UDMF_ERR`] Internal data error.
1475 /// The possible cause is that the server is faulty or the memory is insufficient.
1476 /// [`OH_UdmfData`] Udmf_Intention Udmf_ErrCode.
1477 ///
1478 /// Available since API-level: 20
1479 #[cfg(feature = "api-20")]
1480 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1481 pub fn OH_Udmf_DeleteUnifiedData(
1482 options: *mut OH_UdmfOptions,
1483 dataArray: *mut *mut OH_UdmfData,
1484 dataSize: *mut ::core::ffi::c_uint,
1485 ) -> ::core::ffi::c_int;
1486 /// Gets the pointer to the element at the specified index from the input array.
1487 ///
1488 /// # Arguments
1489 ///
1490 /// * `dataArray` - A pointer to an array of [`OH_UdmfData`] pointers.
1491 ///
1492 /// * `index` - The index of the desired element. Note that the input index should not exceed the array range.
1493 ///
1494 /// # Returns
1495 ///
1496 /// * A pointer to the [`OH_UdmfData`] element at the specified index; returns NULL if the array is NULL.
1497 /// [`OH_UdmfData`]
1498 /// Available since API-level: 22
1499 #[cfg(feature = "api-22")]
1500 #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
1501 pub fn OH_UDMF_GetDataElementAt(
1502 dataArray: *mut *mut OH_UdmfData,
1503 index: ::core::ffi::c_uint,
1504 ) -> *mut OH_UdmfData;
1505 /// Destroy data array memory.
1506 ///
1507 /// # Arguments
1508 ///
1509 /// * `dataArray` - Represents a point to [`OH_UdmfData`].
1510 ///
1511 /// * `dataSize` - Represents data size in list.
1512 /// [`OH_UdmfData`]
1513 /// Available since API-level: 20
1514 #[cfg(feature = "api-20")]
1515 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1516 pub fn OH_Udmf_DestroyDataArray(
1517 dataArray: *mut *mut OH_UdmfData,
1518 dataSize: ::core::ffi::c_uint,
1519 );
1520 /// Gets the progress from the [`OH_Udmf_ProgressInfo`].
1521 ///
1522 /// # Arguments
1523 ///
1524 /// * `progressInfo` - Represents a pointer to an instance of [`OH_Udmf_ProgressInfo`].
1525 ///
1526 /// # Returns
1527 ///
1528 /// * Returns the progress.
1529 /// [`OH_Udmf_ProgressInfo`]
1530 /// Available since API-level: 15
1531 #[cfg(feature = "api-15")]
1532 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1533 pub fn OH_UdmfProgressInfo_GetProgress(
1534 progressInfo: *mut OH_Udmf_ProgressInfo,
1535 ) -> ::core::ffi::c_int;
1536 /// Gets the status from the [`OH_Udmf_ProgressInfo`].
1537 ///
1538 /// # Arguments
1539 ///
1540 /// * `progressInfo` - Represents a pointer to an instance of [`OH_Udmf_ProgressInfo`].
1541 ///
1542 /// # Returns
1543 ///
1544 /// * Returns the status code. See [`Udmf_ListenerStatus`].
1545 /// [`OH_Udmf_ProgressInfo`] Udmf_ListenerStatus
1546 ///
1547 /// Available since API-level: 15
1548 #[cfg(feature = "api-15")]
1549 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1550 pub fn OH_UdmfProgressInfo_GetStatus(
1551 progressInfo: *mut OH_Udmf_ProgressInfo,
1552 ) -> ::core::ffi::c_int;
1553 /// Creation a pointer to the instance of the [`OH_UdmfGetDataParams`].
1554 ///
1555 ///
1556 /// # Returns
1557 ///
1558 /// * If the operation is successful, a pointer to the instance of the [`OH_UdmfGetDataParams`]
1559 /// structure is returned. If the operation is failed, nullptr is returned.
1560 /// [`OH_UdmfGetDataParams`]
1561 /// Available since API-level: 15
1562 #[cfg(feature = "api-15")]
1563 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1564 pub fn OH_UdmfGetDataParams_Create() -> *mut OH_UdmfGetDataParams;
1565 /// Destroy a pointer that points to an instance of [`OH_UdmfGetDataParams`].
1566 ///
1567 /// # Arguments
1568 ///
1569 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfGetDataParams`].
1570 /// [`OH_UdmfGetDataParams`]
1571 /// Available since API-level: 15
1572 #[cfg(feature = "api-15")]
1573 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1574 pub fn OH_UdmfGetDataParams_Destroy(pThis: *mut OH_UdmfGetDataParams);
1575 /// Sets the destination uri to the [`OH_UdmfGetDataParams`].
1576 ///
1577 /// # Arguments
1578 ///
1579 /// * `params` - Represents a pointer to an instance of [`OH_UdmfGetDataParams`].
1580 ///
1581 /// * `destUri` - Pointer to a destination uri.
1582 /// [`OH_UdmfGetDataParams`]
1583 /// Available since API-level: 15
1584 #[cfg(feature = "api-15")]
1585 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1586 pub fn OH_UdmfGetDataParams_SetDestUri(
1587 params: *mut OH_UdmfGetDataParams,
1588 destUri: *const ::core::ffi::c_char,
1589 );
1590 /// Sets the file conflict options to the [`OH_UdmfGetDataParams`].
1591 ///
1592 /// # Arguments
1593 ///
1594 /// * `params` - Represents a pointer to an instance of [`OH_UdmfGetDataParams`].
1595 ///
1596 /// * `options` - Represents to the file conflict options.
1597 /// [`OH_UdmfGetDataParams`] Udmf_FileConflictOptions
1598 ///
1599 /// Available since API-level: 15
1600 #[cfg(feature = "api-15")]
1601 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1602 pub fn OH_UdmfGetDataParams_SetFileConflictOptions(
1603 params: *mut OH_UdmfGetDataParams,
1604 options: Udmf_FileConflictOptions,
1605 );
1606 /// Sets the progress indicator to the [`OH_UdmfGetDataParams`].
1607 ///
1608 /// # Arguments
1609 ///
1610 /// * `params` - Represents a pointer to an instance of [`OH_UdmfGetDataParams`].
1611 ///
1612 /// * `progressIndicator` - Represents to the progress indicator.
1613 /// [`OH_UdmfGetDataParams`] Udmf_ProgressIndicator
1614 ///
1615 /// Available since API-level: 15
1616 #[cfg(feature = "api-15")]
1617 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1618 pub fn OH_UdmfGetDataParams_SetProgressIndicator(
1619 params: *mut OH_UdmfGetDataParams,
1620 progressIndicator: Udmf_ProgressIndicator,
1621 );
1622 /// Sets the progress indicator to the [`OH_UdmfGetDataParams`].
1623 ///
1624 /// # Arguments
1625 ///
1626 /// * `params` - Represents a pointer to an instance of [`OH_UdmfGetDataParams`].
1627 ///
1628 /// * `dataProgressListener` - Represents to the data progress listener.
1629 /// [`OH_UdmfGetDataParams`] OH_Udmf_DataProgressListener
1630 ///
1631 /// Available since API-level: 15
1632 #[cfg(feature = "api-15")]
1633 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1634 pub fn OH_UdmfGetDataParams_SetDataProgressListener(
1635 params: *mut OH_UdmfGetDataParams,
1636 dataProgressListener: OH_Udmf_DataProgressListener,
1637 );
1638 /// Sets the acceptable info to the [`OH_UdmfGetDataParams`].
1639 ///
1640 /// # Arguments
1641 ///
1642 /// * `params` - Represents a pointer to an instance of [`OH_UdmfGetDataParams`].
1643 ///
1644 /// * `acceptableInfo` - Represents a pointer to an instance of [`OH_UdmfDataLoadInfo`].
1645 /// [`OH_UdmfGetDataParams`] OH_UdmfDataLoadInfo
1646 ///
1647 /// Available since API-level: 20
1648 #[cfg(feature = "api-20")]
1649 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1650 pub fn OH_UdmfGetDataParams_SetAcceptableInfo(
1651 params: *mut OH_UdmfGetDataParams,
1652 acceptableInfo: *mut OH_UdmfDataLoadInfo,
1653 );
1654 /// Creation a pointer to the instance of the [`OH_UdmfDataLoadParams`].
1655 ///
1656 ///
1657 /// # Returns
1658 ///
1659 /// * If the operation is successful, a pointer to the instance of the [`OH_UdmfDataLoadParams`]
1660 /// structure is returned. If the operation is failed, nullptr is returned.
1661 /// [`OH_UdmfDataLoadParams`]
1662 /// Available since API-level: 20
1663 #[cfg(feature = "api-20")]
1664 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1665 pub fn OH_UdmfDataLoadParams_Create() -> *mut OH_UdmfDataLoadParams;
1666 /// Destroy a pointer that points to an instance of [`OH_UdmfDataLoadParams`].
1667 ///
1668 /// # Arguments
1669 ///
1670 /// * `pThis` - Represents a pointer to an instance of [`OH_UdmfDataLoadParams`].
1671 /// [`OH_UdmfDataLoadParams`]
1672 /// Available since API-level: 20
1673 #[cfg(feature = "api-20")]
1674 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1675 pub fn OH_UdmfDataLoadParams_Destroy(pThis: *mut OH_UdmfDataLoadParams);
1676 /// Sets the data load handler to the [`OH_UdmfDataLoadParams`].
1677 ///
1678 /// # Arguments
1679 ///
1680 /// * `params` - Represents a pointer to an instance of [`OH_UdmfDataLoadParams`].
1681 ///
1682 /// * `dataLoadHandler` - Represents to the data load handler.
1683 /// [`OH_UdmfDataLoadParams`] OH_Udmf_DataLoadHandler
1684 ///
1685 /// Available since API-level: 20
1686 #[cfg(feature = "api-20")]
1687 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1688 pub fn OH_UdmfDataLoadParams_SetLoadHandler(
1689 params: *mut OH_UdmfDataLoadParams,
1690 dataLoadHandler: OH_Udmf_DataLoadHandler,
1691 );
1692 /// Sets the data load info to the [`OH_UdmfDataLoadParams`].
1693 ///
1694 /// # Arguments
1695 ///
1696 /// * `params` - Represents a pointer to an instance of [`OH_UdmfDataLoadParams`].
1697 ///
1698 /// * `dataLoadInfo` - Represents a pointer to an instance of [`OH_UdmfDataLoadInfo`].
1699 /// [`OH_UdmfDataLoadParams`] OH_UdmfDataLoadInfo
1700 ///
1701 /// Available since API-level: 20
1702 #[cfg(feature = "api-20")]
1703 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1704 pub fn OH_UdmfDataLoadParams_SetDataLoadInfo(
1705 params: *mut OH_UdmfDataLoadParams,
1706 dataLoadInfo: *mut OH_UdmfDataLoadInfo,
1707 );
1708 /// Creation a pointer to the instance of the [`OH_UdmfDataLoadInfo`].
1709 ///
1710 ///
1711 /// # Returns
1712 ///
1713 /// * If the operation is successful, a pointer to the instance of the [`OH_UdmfDataLoadInfo`]
1714 /// structure is returned. If the operation is failed, nullptr is returned.
1715 /// [`OH_UdmfDataLoadInfo`]
1716 /// Available since API-level: 20
1717 #[cfg(feature = "api-20")]
1718 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1719 pub fn OH_UdmfDataLoadInfo_Create() -> *mut OH_UdmfDataLoadInfo;
1720 /// Destroy the heap memory pointed to by the pointer of [`OH_UdmfDataLoadInfo`].
1721 /// Note that this function cannot be called repeatedly for the same pointer.
1722 ///
1723 /// # Arguments
1724 ///
1725 /// * `dataLoadInfo` - Represents a pointer to an instance of [`OH_UdmfDataLoadInfo`].
1726 /// [`OH_UdmfDataLoadInfo`]
1727 /// Available since API-level: 20
1728 #[cfg(feature = "api-20")]
1729 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1730 pub fn OH_UdmfDataLoadInfo_Destroy(dataLoadInfo: *mut OH_UdmfDataLoadInfo);
1731 /// Gets the types from the [`OH_UdmfDataLoadInfo`].
1732 ///
1733 /// # Arguments
1734 ///
1735 /// * `dataLoadInfo` - Represents a pointer to an instance of [`OH_UdmfDataLoadInfo`].
1736 ///
1737 /// * `count` - the types count of data.
1738 ///
1739 /// # Returns
1740 ///
1741 /// * Returns the types of data.
1742 /// [`OH_UdmfDataLoadInfo`]
1743 /// Available since API-level: 20
1744 #[cfg(feature = "api-20")]
1745 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1746 pub fn OH_UdmfDataLoadInfo_GetTypes(
1747 dataLoadInfo: *mut OH_UdmfDataLoadInfo,
1748 count: *mut ::core::ffi::c_uint,
1749 ) -> *mut *mut ::core::ffi::c_char;
1750 /// Sets the data load info to the [`OH_UdmfDataLoadInfo`].
1751 ///
1752 /// # Arguments
1753 ///
1754 /// * `dataLoadInfo` - Represents a pointer to an instance of [`OH_UdmfDataLoadInfo`].
1755 ///
1756 /// * `type` - Represents the type of data.
1757 /// [`OH_UdmfDataLoadInfo`]
1758 /// Available since API-level: 20
1759 #[cfg(feature = "api-20")]
1760 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1761 pub fn OH_UdmfDataLoadInfo_SetType(
1762 dataLoadInfo: *mut OH_UdmfDataLoadInfo,
1763 type_: *const ::core::ffi::c_char,
1764 );
1765 /// Gets the record count from the [`OH_UdmfDataLoadInfo`].
1766 ///
1767 /// # Arguments
1768 ///
1769 /// * `dataLoadInfo` - Represents a pointer to an instance of [`OH_UdmfDataLoadInfo`].
1770 ///
1771 /// # Returns
1772 ///
1773 /// * Returns the record count.
1774 /// [`OH_UdmfDataLoadInfo`]
1775 /// Available since API-level: 20
1776 #[cfg(feature = "api-20")]
1777 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1778 pub fn OH_UdmfDataLoadInfo_GetRecordCount(
1779 dataLoadInfo: *mut OH_UdmfDataLoadInfo,
1780 ) -> ::core::ffi::c_int;
1781 /// Sets the record count to the [`OH_UdmfDataLoadInfo`].
1782 ///
1783 /// # Arguments
1784 ///
1785 /// * `dataLoadInfo` - Represents a pointer to an instance of [`OH_UdmfDataLoadInfo`].
1786 ///
1787 /// * `recordCount` - Represents the types of data.
1788 /// [`OH_UdmfDataLoadInfo`]
1789 /// Available since API-level: 20
1790 #[cfg(feature = "api-20")]
1791 #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1792 pub fn OH_UdmfDataLoadInfo_SetRecordCount(
1793 dataLoadInfo: *mut OH_UdmfDataLoadInfo,
1794 recordCount: ::core::ffi::c_uint,
1795 );
1796}