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 #ifndef DATA_SHARE_PREDICATES_FFI_H 17 #define DATA_SHARE_PREDICATES_FFI_H 18 19 #include "data_share_predicates_utils.h" 20 #include "ffi_remote_data.h" 21 22 namespace OHOS { 23 namespace DataShare { 24 #ifdef __cplusplus 25 #if __cplusplus 26 extern "C" { 27 #endif 28 #endif 29 30 FFI_EXPORT int64_t FfiOHOSDataSharePredicatesCreateDataSharePredicates(); 31 32 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesEqualTo(int64_t id, const char *field, CValueType value); 33 34 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesAnd(int64_t id); 35 36 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesOrderByAsc(int64_t id, const char *field); 37 38 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesOrderByDesc(int64_t id, const char *field); 39 40 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesLimit(int64_t id, const int32_t field, const int32_t value); 41 42 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesIn(int64_t id, const char *field, CValueType *values, int64_t valuesSize); 43 44 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesOr(int64_t id); 45 46 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesBeginWrap(int64_t id); 47 48 FFI_EXPORT int32_t FfiOHOSDataSharePredicatesEndWrap(int64_t id); 49 50 #ifdef __cplusplus 51 #if __cplusplus 52 } 53 #endif 54 #endif 55 } // namespace DataShare 56 } // namespace OHOS 57 58 #endif // endif DATA_SHARE_PREDICATES_FFI_H 59