2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
\r
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__
\r
18 #define __TAC_INSTALLER_H__
\r
20 #include <functional>
\r
24 TAC_STATE_INSTALL = 1,
25 TAC_STATE_UPGRADE = 2,
26 TAC_STATE_UNINSTALL = 3,
27 TAC_STATE_REMOVED = 4,
33 * @param[in] pkgId package ID
34 * @param[in] state state of tac
35 * @param[in] tacForce force TAC to package
36 * @return 0 if success, otherwise -1
38 int tacInstall(const std::string& pkgId, tac_state state, bool tacForce = false);
42 * @param[in] pkgId package ID
43 * @param[in] state state of tac
44 * @param[in] tacForce force TAC to package
45 * @return 0 if success, otherwise -1
47 int tacUpgrade(const std::string& pkgId, tac_state state, bool tacForce = false);
50 * @brief Tac uninstall
51 * @param[in] pkgId package ID
52 * @param[in] state state of tac
53 * @return 0 if success, otherwise -1
55 int tacUninstall(const std::string& pkgId, tac_state state);
59 * @param[in] pkgId package ID
60 * @return 0 if success, otherwise -1
62 int tacClean(const std::string& pkgId);
\r
66 * @param[in] pkgId package ID
67 * @return 0 if success, otherwise -1
69 int tacRemoved(const std::string& pkgId);
\r
73 * @param[in] pkgId package ID
74 * @return 0 if success, otherwise -1
76 int tacUndo(const std::string& pkgId);
\r
78 #endif /* __TAC_INSTALLER_H__ */
\r