147c9fbaeSopenharmony_ci/*
247c9fbaeSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd.
347c9fbaeSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
447c9fbaeSopenharmony_ci * you may not use this file except in compliance with the License.
547c9fbaeSopenharmony_ci * You may obtain a copy of the License at
647c9fbaeSopenharmony_ci *
747c9fbaeSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
847c9fbaeSopenharmony_ci *
947c9fbaeSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1047c9fbaeSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1147c9fbaeSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1247c9fbaeSopenharmony_ci * See the License for the specific language governing permissions and
1347c9fbaeSopenharmony_ci * limitations under the License.
1447c9fbaeSopenharmony_ci */
1547c9fbaeSopenharmony_ci
1647c9fbaeSopenharmony_ci#include "blackbox_detector.h"
1747c9fbaeSopenharmony_ci
1847c9fbaeSopenharmony_ciint UploadEventByFile(const char *filePath)
1947c9fbaeSopenharmony_ci{
2047c9fbaeSopenharmony_ci    if (filePath == NULL) {
2147c9fbaeSopenharmony_ci        BBOX_PRINT_ERR("filePath: %p\n", filePath);
2247c9fbaeSopenharmony_ci        return -1;
2347c9fbaeSopenharmony_ci    }
2447c9fbaeSopenharmony_ci    return 0;
2547c9fbaeSopenharmony_ci}
2647c9fbaeSopenharmony_ci
2747c9fbaeSopenharmony_ciint UploadEventByStream(const char *buf, unsigned int bufSize)
2847c9fbaeSopenharmony_ci{
2947c9fbaeSopenharmony_ci    if (buf == NULL || bufSize == 0) {
3047c9fbaeSopenharmony_ci        BBOX_PRINT_ERR("buf: %p, bufSize: %u\n", buf, bufSize);
3147c9fbaeSopenharmony_ci        return -1;
3247c9fbaeSopenharmony_ci    }
3347c9fbaeSopenharmony_ci    return 0;
3447c9fbaeSopenharmony_ci}