1/*
2 * Copyright (C) 2021 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 SAMPLE_PLUGIN_1_H
17#define SAMPLE_PLUGIN_1_H
18
19#include "plugin/i_plugin.h"
20
21namespace OHOS {
22namespace AI {
23class SamplePlugin1 : public IPlugin {
24public:
25    SamplePlugin1();
26
27    ~SamplePlugin1() override;
28
29    const long long GetVersion() const override;
30
31    const char *GetName() const override;
32
33    const char *GetInferMode() const override;
34
35    int SyncProcess(IRequest *request, IResponse *&response) override;
36
37    int AsyncProcess(IRequest *request, IPluginCallback *callback) override;
38
39    int Prepare(long long transactionId, const DataInfo &inputInfo, DataInfo &outputInfo) override;
40
41    int Release(bool isFullUnload, long long transactionId, const DataInfo &inputInfo) override;
42
43    int SetOption(int optionType, const DataInfo &inputInfo) override;
44
45    int GetOption(int optionType, const DataInfo &inputInfo, DataInfo &outputInfo) override;
46
47private:
48    DataInfo optionData_ {};
49};
50}
51}
52
53#endif // SAMPLE_PLUGIN_1_H
54