17405867cSopenharmony_ci/* 27405867cSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 37405867cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 47405867cSopenharmony_ci * you may not use this file except in compliance with the License. 57405867cSopenharmony_ci * You may obtain a copy of the License at 67405867cSopenharmony_ci * 77405867cSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 87405867cSopenharmony_ci * 97405867cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 107405867cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 117405867cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 127405867cSopenharmony_ci * See the License for the specific language governing permissions and 137405867cSopenharmony_ci * limitations under the License. 147405867cSopenharmony_ci */ 157405867cSopenharmony_ci 167405867cSopenharmony_ci#ifndef HIAPPEVENT_FFI_H 177405867cSopenharmony_ci#define HIAPPEVENT_FFI_H 187405867cSopenharmony_ci 197405867cSopenharmony_ci#include <cstdint> 207405867cSopenharmony_ci 217405867cSopenharmony_ci#include "cj_ffi/cj_common_ffi.h" 227405867cSopenharmony_ci#include "common.h" 237405867cSopenharmony_ci 247405867cSopenharmony_ciextern "C" { 257405867cSopenharmony_ci FFI_EXPORT int FfiOHOSHiAppEventConfigure(CConfigOption config); 267405867cSopenharmony_ci FFI_EXPORT int FfiOHOSHiAppEventWrite(CAppEventInfo info); 277405867cSopenharmony_ci FFI_EXPORT RetDataBool FfiOHOSHiAppEventAddProcessor(CProcessor processor); 287405867cSopenharmony_ci FFI_EXPORT int FfiOHOSHiAppEventSetUserId(const char* name, const char* value); 297405867cSopenharmony_ci FFI_EXPORT RetDataCString FfiOHOSHiAppEventGetUserId(const char* name); 307405867cSopenharmony_ci FFI_EXPORT int FfiOHOSHiAppEventSetUserProperty(const char* name, const char* value); 317405867cSopenharmony_ci FFI_EXPORT RetDataCString FfiOHOSHiAppEventgetUserProperty(const char* name); 327405867cSopenharmony_ci FFI_EXPORT int64_t FfiOHOSHiAppEventConstructor(char* cWatcherName); 337405867cSopenharmony_ci FFI_EXPORT int FfiOHOSHiAppEventSetSize(int64_t id, int size); 347405867cSopenharmony_ci FFI_EXPORT ReTakeNext FfiOHOSHiAppEventTakeNext(int64_t id); 357405867cSopenharmony_ci FFI_EXPORT RetDataI64 FfiOHOSHiAppEventAddWatcher(CWatcher watcher); 367405867cSopenharmony_ci FFI_EXPORT int FfiOHOSHiAppEventRemoveWatcher(CWatcher watcher); 377405867cSopenharmony_ci} 387405867cSopenharmony_ci 397405867cSopenharmony_ci#endif