* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
use asset_log::loge;
use asset_sdk::{ErrCode, SyncResult};
use crate::*;
fn empty_mode() -> i32 {
loge!("[FATAL][RUST SDK]Asset service is not supported in empty mode");
ErrCode::Unsupported as i32
}
#[no_mangle]
pub extern "C" fn add_asset(_attributes: *const AssetAttr, _attr_cnt: u32) -> i32 {
empty_mode()
}
#[no_mangle]
pub extern "C" fn remove_asset(_query: *const AssetAttr, _query_cnt: u32) -> i32 {
empty_mode()
}
#[no_mangle]
pub extern "C" fn update_asset(
_query: *const AssetAttr,
_query_cnt: u32,
_attrs_to_update: *const AssetAttr,
_update_cnt: u32,
) -> i32 {
empty_mode()
}
#[no_mangle]
pub unsafe extern "C" fn pre_query_asset(_query: *const AssetAttr, _query_cnt: u32, _challenge: *mut AssetBlob) -> i32 {
empty_mode()
}
#[no_mangle]
pub unsafe extern "C" fn query_asset(_query: *const AssetAttr, _query_cnt: u32, _result_set: *mut AssetResultSet) -> i32 {
empty_mode()
}
#[no_mangle]
pub extern "C" fn post_query_asset(_handle: *const AssetAttr, _handle_cnt: u32) -> i32 {
empty_mode()
}
#[no_mangle]
pub unsafe extern "C" fn query_sync_result(
_query: *const AssetAttr,
_query_cnt: u32,
_sync_result: *mut SyncResult,
) -> i32 {
empty_mode()
}
#[no_mangle]
pub extern "C" fn asset_batch_add(
_c_array: &C2DArray,
_err_info: &mut MutPairVec,
) -> i32 {
empty_mode()
}
#[no_mangle]
pub extern "C" fn asset_batch_update(
_c_array: &C2DArray,
_c_array_to_update: &C2DArray,
_err_info: &mut MutPairVec,
) -> i32 {
empty_mode()
}
#[no_mangle]
pub extern "C" fn asset_batch_remove(_c_array: &C2DArray) -> i32 {
empty_mode()
}
#[no_mangle]
pub extern "C" fn asset_free_mut_pair_vec(_vec: &MutPairVec) -> i32 {
empty_mode()
}