2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __TAC_INSTALLER_H__
18 #define __TAC_INSTALLER_H__
25 TAC_STATE_INSTALL = 1,
26 TAC_STATE_UPGRADE = 2,
27 TAC_STATE_UNINSTALL = 3,
28 TAC_STATE_REMOVED = 4,
34 * @param[in] pkgId package ID
35 * @param[in] state state of tac
36 * @param[in] tacForce force TAC to package
37 * @return 0 if success, otherwise -1
39 int tacInstall(const std::string& pkgId, tac_state state, bool tacForce = false);
43 * @param[in] pkgId package ID
44 * @param[in] state state of tac
45 * @param[in] tacForce force TAC to package
46 * @return 0 if success, otherwise -1
48 int tacUpgrade(const std::string& pkgId, tac_state state, bool tacForce = false);
51 * @brief Tac uninstall
52 * @param[in] pkgId package ID
53 * @param[in] state state of tac
54 * @return 0 if success, otherwise -1
56 int tacUninstall(const std::string& pkgId, tac_state state);
60 * @param[in] pkgId package ID
61 * @return 0 if success, otherwise -1
63 int tacClean(const std::string& pkgId);
67 * @param[in] pkgId package ID
68 * @return 0 if success, otherwise -1
70 int tacRemoved(const std::string& pkgId);
74 * @param[in] pkgId package ID
75 * @return 0 if success, otherwise -1
77 int tacUndo(const std::string& pkgId);
79 #endif /* __TAC_INSTALLER_H__ */