Add switches for crossgen (#91)
[platform/core/dotnet/launcher.git] / NativeLauncher / inc / tac_common.h
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __TAC_COMMON_H__
18 #define __TAC_COMMON_H__
19
20 #include <functional>
21
22 typedef enum {
23         TAC_ERROR_NONE = 0,
24         TAC_ERROR_INVALID_PARAMETER = -1,
25         TAC_ERROR_ALREADY_EXIST = -2,
26         TAC_ERROR_NO_SUCH_FILE = -3,
27         TAC_ERROR_INVALID_PACKAGE = -4,
28         TAC_ERROR_NOT_SUPPORTED = -5,
29         TAC_ERROR_UNKNOWN = -9
30 } tac_error_e;
31
32 /**
33  * @brief restore database of TAC
34  * @return tac_error_e
35  */
36 tac_error_e restoreTACDB();
37
38 /**
39  * @brief remove a symbolic link file, the native images of TAC for specific package.
40  * @param[i] pkgId package ID
41  * @return tac_error_e
42  */
43 tac_error_e resetTACPackage(const std::string& pkgId);
44
45 /**
46  * @brief creates a symbolic link file, the native image of TAC for specific package.
47  * @param[i] pkgId package ID
48  * @return tac_error_e
49  */
50 tac_error_e createTACPackage(const std::string& pkgId, DWORD flags);
51
52 /**
53  * @brief regenerate native image of TAC for all shared assembly.
54  * @return tac_error_e
55  */
56 tac_error_e regenerateTAC(DWORD flags);
57
58 /**
59  * @brief disable tac feature.
60  * @param[i] pkgId package ID
61  * @return tac_error_e
62  */
63 tac_error_e disableTACPackage(const std::string& pkgId);
64
65 /**
66  * @brief enable tac feature.
67  * @param[i] pkgId package ID
68  * @return tac_error_e
69  */
70 tac_error_e enableTACPackage(const std::string& pkgId);
71
72 #endif /* __TAC_COMMON_H__ */