• 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 #ifndef CONTACTS_FFI_H
17 #define CONTACTS_FFI_H
18 
19 #include "cj_common_ffi.h"
20 
21 extern "C" {
22     FFI_EXPORT int64_t FfiOHOSContactAddContact(int64_t contextId, OHOS::ContactsFfi::RawContact* rawContact,
23                                                 OHOS::ContactsFfi::ContactData* contactData, int32_t *errCode);
24     FFI_EXPORT void FfiOHOSContactDeleteContact(int64_t contextId, int64_t predicatesId, int32_t *errCode);
25     FFI_EXPORT void FfiOHOSContactUpdateContact(int64_t contextId, int64_t contactId,
26                                                 OHOS::ContactsFfi::ContactData* contactData,
27                                                 int64_t predicatesId, int32_t *errCode);
28     FFI_EXPORT bool FfiOHOSContactIsLocalContact(int64_t contextId, int64_t contactId, int32_t *errCode);
29     FFI_EXPORT bool FfiOHOSContactIsMyCard(int64_t contextId, int64_t contactId, int32_t *errCode);
30     FFI_EXPORT OHOS::ContactsFfi::ContactsData* FfiOHOSContactQueryMyCard(int64_t contextId, int64_t predicatesId,
31                                                                           int32_t *errCode);
32     FFI_EXPORT OHOS::ContactsFfi::HoldersData* FfiOHOSContactQueryHolders(int64_t contextId, int32_t *errCode);
33     FFI_EXPORT OHOS::ContactsFfi::ContactsData* FfiOHOSContactQueryContacts(int64_t contextId, int64_t predicatesId,
34                                                                             int32_t *errCode);
35     FFI_EXPORT OHOS::ContactsFfi::GroupsData* FfiOHOSContactQueryGroups(int64_t contextId, int64_t predicatesId,
36                                                                         int32_t *errCode);
37 }
38 
39 #endif // CONTACTS_FFI_H
40