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 OHOS_ARKCOMPILER_IAOTCOMPILER_INTERFACE_H
17#define OHOS_ARKCOMPILER_IAOTCOMPILER_INTERFACE_H
18
19#include <vector>
20#include <unordered_map>
21#include <string_ex.h>
22#include <cstdint>
23#include <iremote_broker.h>
24#if defined(__clang__)
25#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
26#elif defined(__GNUC__)
27#pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
28#endif
29
30namespace OHOS::ArkCompiler {
31class IAotCompilerInterface : public IRemoteBroker {
32public:
33    DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.ArkCompiler.IAotCompilerInterface");
34
35    virtual ErrCode AotCompiler(
36        const std::unordered_map<std::string, std::string>& argsMap,
37        std::vector<int16_t>& sigData) = 0;
38
39    virtual ErrCode StopAotCompiler() = 0;
40    virtual ErrCode GetAOTVersion(std::string& sigData) = 0;
41    virtual ErrCode NeedReCompile(const std::string& argsString, bool& sigData) = 0;
42protected:
43    const unsigned long vectorMaxSize = 102400;
44    const unsigned long mapMaxSize = 102400;
45};
46} // namespace OHOS::ArkCompiler
47#endif // OHOS_ARKCOMPILER_IAOTCOMPILER_INTERFACE_H
48
49