2 * Copyright (c) 2021 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 #include "app_disable_app_filter_checker.hh"
19 #include "pkgmgrinfo_basic.h"
20 #include "pkgmgrinfo_private.h"
22 #include "utils/logging.hh"
24 namespace pkgmgr_server {
27 bool AppDisableAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
28 application_x* app_info, package_x* pkg_info) {
29 if (node->value == nullptr || app_info->is_disabled == nullptr)
32 if (strcasecmp(node->value, app_info->is_disabled) != 0) {
33 if (strcasecmp(app_info->is_disabled, "true") == 0)
34 LOG(WARNING) << "The application [" << app_info->appid << "] is disabled";
41 } // namespace database
42 } // namespace pkgmgr_server