ohos-rdb-sys 0.1.0

Raw bindings to the OpenHarmony relational database (RDB) API
Documentation
// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
use crate::values_bucket::{OH_Data_VBuckets, OH_VBucket};

extern "C" {
    /// Creates an OH_Data_VBuckets instance object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns a pointer to OH_Data_VBuckets instance when the execution is successful.
    /// Otherwise, nullptr is returned. The memory must be released through the OH_VBuckets_Destroy
    /// interface after the use is complete.
    /// [`OH_VBuckets_Destroy.`]
    /// Available since API-level: 18
    #[cfg(feature = "api-18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
    pub fn OH_VBuckets_Create() -> *mut OH_Data_VBuckets;
    /// Destroys an OH_Data_VBuckets instance object.
    ///
    /// # Arguments
    ///
    /// * `buckets` - Represents a pointer to an instance of OH_Data_VBuckets.
    ///
    /// # Returns
    ///
    /// * Returns the error code.
    /// Returns [`RDB_OK`] if the execution is successful.
    /// Returns [`RDB_E_INVALID_ARGS`] if invalid input parameter.
    ///
    /// Available since API-level: 18
    #[cfg(feature = "api-18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
    pub fn OH_VBuckets_Destroy(buckets: *mut OH_Data_VBuckets) -> ::core::ffi::c_int;
    /// Add an OH_VBucket to OH_Data_VBuckets object.
    ///
    /// # Arguments
    ///
    /// * `buckets` - Represents a pointer to an instance of OH_Data_VBuckets.
    ///
    /// * `row` - Represents a pointer to an instance of OH_VBucket.
    ///
    /// # Returns
    ///
    /// * Returns the error code.
    /// Returns [`RDB_OK`] if the execution is successful.
    /// Returns [`RDB_E_INVALID_ARGS`] if invalid input parameter.
    ///
    /// Available since API-level: 18
    #[cfg(feature = "api-18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
    pub fn OH_VBuckets_PutRow(
        buckets: *mut OH_Data_VBuckets,
        row: *const OH_VBucket,
    ) -> ::core::ffi::c_int;
    /// Add an OH_Data_VBuckets to OH_Data_VBuckets object.
    ///
    /// # Arguments
    ///
    /// * `buckets` - Represents a pointer to an instance of OH_Data_VBuckets.
    ///
    /// * `rows` - Represents a pointer to an instance of OH_Data_VBuckets.
    ///
    /// # Returns
    ///
    /// * Returns the error code.
    /// Returns [`RDB_OK`] if the execution is successful.
    /// Returns [`RDB_E_INVALID_ARGS`] if invalid input parameter.
    ///
    /// Available since API-level: 18
    #[cfg(feature = "api-18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
    pub fn OH_VBuckets_PutRows(
        buckets: *mut OH_Data_VBuckets,
        rows: *const OH_Data_VBuckets,
    ) -> ::core::ffi::c_int;
    /// Gets the number of rows in OH_Data_VBuckets object.
    ///
    /// # Arguments
    ///
    /// * `buckets` - Represents a pointer to an instance of OH_Data_VBuckets.
    ///
    /// * `count` - Represents the count of OH_VBucket in OH_Data_VBuckets. It is an output parameter.
    ///
    /// # Returns
    ///
    /// * Returns the error code.
    /// Returns [`RDB_OK`] if the execution is successful.
    /// Returns [`RDB_E_INVALID_ARGS`] if invalid input parameter.
    ///
    /// Available since API-level: 18
    #[cfg(feature = "api-18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
    pub fn OH_VBuckets_RowCount(
        buckets: *mut OH_Data_VBuckets,
        count: *mut usize,
    ) -> ::core::ffi::c_int;
}