--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "auto_restart_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool AutoRestartAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->autorestart != nullptr &&
+ strcasecmp(node->value, info->autorestart) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AUTO_RESTART_APP_FILTER_CHECKER_HH_
+#define AUTO_RESTART_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class AutoRestartAppFilterChecker: public IAppFilterChecker {
+ public:
+ AutoRestartAppFilterChecker() = default;
+ ~AutoRestartAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // AUTO_RESTART_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "check_storage_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool CheckStorageAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return true;
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef CHECK_STORAGE_APP_FILTER_CHECKER_HH_
+#define CHECK_STORAGE_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class CheckStorageAppFilterChecker: public IAppFilterChecker {
+ public:
+ CheckStorageAppFilterChecker() = default;
+ ~CheckStorageAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // CHECK_STORAGE_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "hw_acceleration_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool HWAccelerationAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->hwacceleration != nullptr &&
+ strcmp(node->value, info->hwacceleration) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef HW_ACCELERATION_APP_FILTER_CHECKER_HH_
+#define HW_ACCELERATION_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class HWAccelerationAppFilterChecker: public IAppFilterChecker {
+ public:
+ HWAccelerationAppFilterChecker() = default;
+ ~HWAccelerationAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // HW_ACCELERATION_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "icon_app_filter_checker.hh"
+
+#include <glib.h>
+#include <string.h>
+
+namespace pkgmgr_server {
+namespace database {
+
+bool IconAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ if (node->value == nullptr)
+ return false;
+
+ for (auto* it = info->icon; it; it = g_list_next(it)) {
+ auto path = reinterpret_cast<icon_x*>(it->data)->text;
+ if (path != nullptr && strcmp(path, node->value) == 0)
+ return true;
+ }
+
+ return false;
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ICON_APP_FILTER_CHECKER_HH_
+#define ICON_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class IconAppFilterChecker: public IAppFilterChecker {
+ public:
+ IconAppFilterChecker() = default;
+ ~IconAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // ICON_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "launch_condition_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool LaunchConditionAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->launchcondition != nullptr &&
+ strcmp(node->value, info->launchcondition) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef LAUNCH_CONDITION_APP_FILTER_CHECKER_HH_
+#define LAUNCH_CONDITION_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class LaunchConditionAppFilterChecker: public IAppFilterChecker {
+ public:
+ LaunchConditionAppFilterChecker() = default;
+ ~LaunchConditionAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // LAUNCH_CONDITION_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "mime_app_filter_checker.hh"
+
+#include <glib.h>
+
+namespace pkgmgr_server {
+namespace database {
+
+bool MimeAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ if (node->value == nullptr)
+ return false;
+ for (auto* it = info->appcontrol; it != nullptr; it = g_list_next(it)) {
+ char* value = reinterpret_cast<appcontrol_x*>(it->data)->mime;
+ if (value != nullptr && strcmp(value, node->value) == 0)
+ return true;
+ }
+
+ return false;
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MIME_APP_FILTER_CHECKER_HH_
+#define MIME_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class MimeAppFilterChecker: public IAppFilterChecker {
+ public:
+ MimeAppFilterChecker() = default;
+ ~MimeAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // MIME_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "multiple_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool MultipleAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->multiple != nullptr &&
+ strcasecmp(node->value, info->multiple) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MULTIPLE_APP_FILTER_CHECKER_HH_
+#define MULTIPLE_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class MultipleAppFilterChecker: public IAppFilterChecker {
+ public:
+ MultipleAppFilterChecker() = default;
+ ~MultipleAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // MULTIPLE_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "onboot_app_filter_checker.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool OnBootAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->onboot != nullptr &&
+ strcasecmp(node->value, info->onboot) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ONBOOT_APP_FILTER_CHECKER_HH_
+#define ONBOOT_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class OnBootAppFilterChecker: public IAppFilterChecker {
+ public:
+ OnBootAppFilterChecker() = default;
+ ~OnBootAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // ONBOOT_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "screen_reader_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool ScreenReaderAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->screenreader != nullptr &&
+ strcmp(node->value, info->screenreader) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SCREEN_READER_APP_FILTER_CHECKER_HH_
+#define SCREEN_READER_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class ScreenReaderAppFilterChecker: public IAppFilterChecker {
+ public:
+ ScreenReaderAppFilterChecker() = default;
+ ~ScreenReaderAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // SCREEN_READER_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "support_disable_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool SupportDisableAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->support_disable != nullptr &&
+ strcasecmp(node->value, info->ui_gadget) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SUPPORT_DISABLE_APP_FILTER_CHECKER_HH_
+#define SUPPORT_DISABLE_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class SupportDisableAppFilterChecker: public IAppFilterChecker {
+ public:
+ SupportDisableAppFilterChecker() = default;
+ ~SupportDisableAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // SUPPORT_DISABLE_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "support_mode_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool SupportModeAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->support_mode != nullptr &&
+ strcmp(node->value, info->support_mode) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SUPPORT_MODE_APP_FILTER_CHECKER_HH_
+#define SUPPORT_MODE_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class SupportModeAppFilterChecker: public IAppFilterChecker {
+ public:
+ SupportModeAppFilterChecker() = default;
+ ~SupportModeAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // SUPPORT_MODE_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "task_manage_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool TaskManageAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->taskmanage != nullptr &&
+ strcasecmp(node->value, info->taskmanage) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TASK_MANAGE_APP_FILTER_CHECKER_HH_
+#define TASK_MANAGE_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class TaskManageAppFilterChecker: public IAppFilterChecker {
+ public:
+ TaskManageAppFilterChecker() = default;
+ ~TaskManageAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // TASK_MANAGE_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ui_gadget_app_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool UIGadgetAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ return (node->value != nullptr && info->ui_gadget != nullptr &&
+ strcmp(node->value, info->ui_gadget) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UI_GADGET_APP_FILTER_CHECKER_HH_
+#define UI_GADGET_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class UIGadgetAppFilterChecker: public IAppFilterChecker {
+ public:
+ UIGadgetAppFilterChecker() = default;
+ ~UIGadgetAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // UI_GADGET_APP_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "uri_app_filter_checker.hh"
+
+#include <glib.h>
+
+namespace pkgmgr_server {
+namespace database {
+
+bool URIAppFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ application_x* info) {
+ if (node->value == nullptr)
+ return false;
+ for (auto* it = info->appcontrol; it != nullptr; it = g_list_next(it)) {
+ char* value = reinterpret_cast<appcontrol_x*>(it->data)->uri;
+ if (value != nullptr && strcmp(value, node->value) == 0)
+ return true;
+ }
+
+ return false;
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef URI_APP_FILTER_CHECKER_HH_
+#define URI_APP_FILTER_CHECKER_HH_
+
+#include "app_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class URIAppFilterChecker: public IAppFilterChecker {
+ public:
+ URIAppFilterChecker() = default;
+ ~URIAppFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, application_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // URI_APP_FILTER_CHECKER_HH_
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2021 - 2022 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "app_filter_checker/app_disable_app_filter_checker.hh"
#include "app_filter_checker/appid_app_filter_checker.hh"
+#include "app_filter_checker/auto_restart_app_filter_checker.hh"
#include "app_filter_checker/category_app_filter_checker.hh"
+#include "app_filter_checker/check_storage_app_filter_checker.hh"
#include "app_filter_checker/component_app_filter_checker.hh"
#include "app_filter_checker/default_app_filter_checker.hh"
#include "app_filter_checker/exec_app_filter_checker.hh"
+#include "app_filter_checker/hw_acceleration_app_filter_checker.hh"
+#include "app_filter_checker/icon_app_filter_checker.hh"
+#include "app_filter_checker/launch_condition_app_filter_checker.hh"
+#include "app_filter_checker/mime_app_filter_checker.hh"
+#include "app_filter_checker/multiple_app_filter_checker.hh"
#include "app_filter_checker/nodisplay_app_filter_checker.hh"
+#include "app_filter_checker/onboot_app_filter_checker.hh"
#include "app_filter_checker/operation_app_filter_checker.hh"
#include "app_filter_checker/pkg_disable_app_filter_checker.hh"
#include "app_filter_checker/pkgid_app_filter_checker.hh"
#include "app_filter_checker/privilege_app_filter_checker.hh"
+#include "app_filter_checker/screen_reader_app_filter_checker.hh"
#include "app_filter_checker/storage_app_filter_checker.hh"
+#include "app_filter_checker/support_disable_app_filter_checker.hh"
+#include "app_filter_checker/support_mode_app_filter_checker.hh"
+#include "app_filter_checker/task_manage_app_filter_checker.hh"
#include "app_filter_checker/type_app_filter_checker.hh"
+#include "app_filter_checker/ui_gadget_app_filter_checker.hh"
+#include "app_filter_checker/uri_app_filter_checker.hh"
+#include "pkg_filter_checker/app_setting_pkg_filter_checker.hh"
+#include "pkg_filter_checker/author_email_pkg_filter_checker.hh"
+#include "pkg_filter_checker/author_href_pkg_filter_checker.hh"
+#include "pkg_filter_checker/author_name_pkg_filter_checker.hh"
#include "pkg_filter_checker/check_storage_pkg_filter_checker.hh"
#include "pkg_filter_checker/default_pkg_filter_checker.hh"
#include "pkg_filter_checker/disable_pkg_filter_checker.hh"
+#include "pkg_filter_checker/install_location_pkg_filter_checker.hh"
+#include "pkg_filter_checker/installed_storage_pkg_filter_checker.hh"
+#include "pkg_filter_checker/nodisplay_pkg_filter_checker.hh"
+#include "pkg_filter_checker/pkg_size_pkg_filter_checker.hh"
#include "pkg_filter_checker/pkgid_pkg_filter_checker.hh"
+#include "pkg_filter_checker/pkgtype_pkg_filter_checker.hh"
#include "pkg_filter_checker/preload_pkg_filter_checker.hh"
#include "pkg_filter_checker/privilege_pkg_filter_checker.hh"
+#include "pkg_filter_checker/read_only_pkg_filter_checker.hh"
#include "pkg_filter_checker/removable_pkg_filter_checker.hh"
#include "pkg_filter_checker/restype_pkg_filter_checker.hh"
+#include "pkg_filter_checker/support_disable_pkg_filter_checker.hh"
+#include "pkg_filter_checker/system_pkg_filter_checker.hh"
+#include "pkg_filter_checker/update_pkg_filter_checker.hh"
+#include "pkg_filter_checker/version_pkg_filter_checker.hh"
#endif // FILTER_CHECKER_LIST_HH_
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2021 - 2022 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
FilterCheckerProvider::FilterCheckerProvider() {
pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_ID] =
std::make_unique<PkgIdPkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_TYPE] =
+ std::make_unique<PkgTypePkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_VERSION] =
+ std::make_unique<VersionPkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_INSTALL_LOCATION] =
+ std::make_unique<InstallLocationPkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_INSTALLED_STORAGE] =
+ std::make_unique<InstalledStorageFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_NAME] =
+ std::make_unique<AuthorNamePkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_EMAIL] =
+ std::make_unique<AuthorEmailPkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_AUTHOR_HREF] =
+ std::make_unique<AuthorHrefPkgFilterChecker>();
pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_PRIVILEGE] =
std::make_unique<PrivilegePkgFilterChecker>();
pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE] =
std::make_unique<ResTypePkgFilterChecker>();
pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_CHECK_STORAGE] =
std::make_unique<CheckStoragePkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_SIZE] =
+ std::make_unique<PkgSizePkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_READONLY] =
+ std::make_unique<ReadOnlyPkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_UPDATE] =
+ std::make_unique<UpdatePkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING] =
+ std::make_unique<AppSettingPkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING] =
+ std::make_unique<NoDisplayPkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE] =
+ std::make_unique<SupportDisablePkgFilterChecker>();
+ pkg_checker_map_[E_PMINFO_PKGINFO_PROP_PACKAGE_SYSTEM] =
+ std::make_unique<SystemPkgFilterChecker>();
app_checker_map_[E_PMINFO_APPINFO_PROP_APP_ID] =
std::make_unique<AppIdAppFilterChecker>();
std::make_unique<AppDisableAppFilterChecker>();
app_checker_map_[E_PMINFO_APPINFO_PROP_PKG_DISABLE] =
std::make_unique<PkgDisableAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_ICON] =
+ std::make_unique<IconAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_URI] =
+ std::make_unique<URIAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_MIME] =
+ std::make_unique<MimeAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_MULTIPLE] =
+ std::make_unique<MultipleAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_ONBOOT] =
+ std::make_unique<OnBootAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_AUTORESTART] =
+ std::make_unique<AutoRestartAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_TASKMANAGE] =
+ std::make_unique<TaskManageAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_HWACCELERATION] =
+ std::make_unique<HWAccelerationAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_SCREENREADER] =
+ std::make_unique<ScreenReaderAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION] =
+ std::make_unique<LaunchConditionAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_UI_GADGET] =
+ std::make_unique<UIGadgetAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE] =
+ std::make_unique<SupportDisableAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_SUPPORT_MODE] =
+ std::make_unique<SupportModeAppFilterChecker>();
+ app_checker_map_[E_PMINFO_APPINFO_PROP_APP_CHECK_STORAGE] =
+ std::make_unique<CheckStorageAppFilterChecker>();
default_pkg_checker = std::make_unique<DefaultPkgFilterChecker>();
default_app_checker = std::make_unique<DefaultAppFilterChecker>();
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "app_setting_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool AppSettingPkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->appsetting != nullptr &&
+ strcasecmp(node->value, info->appsetting) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef APP_SETTING_PKG_FILTER_CHECKER_HH_
+#define APP_SETTING_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class AppSettingPkgFilterChecker : public IPkgFilterChecker {
+ public:
+ AppSettingPkgFilterChecker() = default;
+ ~AppSettingPkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // APP_SETTING_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "author_email_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool AuthorEmailPkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr &&
+ static_cast<author_x*>(info->author->data)->email != nullptr &&
+ strcmp(node->value,
+ (static_cast<author_x*>(info->author->data))->email) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AUTHOR_EMAIL_PKG_FILTER_CHECKER_HH_
+#define AUTHOR_EMAIL_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class AuthorEmailPkgFilterChecker : public IPkgFilterChecker {
+ public:
+ AuthorEmailPkgFilterChecker() = default;
+ ~AuthorEmailPkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // AUTHOR_EMAIL_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "author_href_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool AuthorHrefPkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr &&
+ static_cast<author_x*>(info->author->data)->href != nullptr &&
+ strcmp(node->value,
+ (static_cast<author_x*>(info->author->data))->href) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AUTHOR_HREF_PKG_FILTER_CHECKER_HH_
+#define AUTHOR_HREF_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class AuthorHrefPkgFilterChecker : public IPkgFilterChecker {
+ public:
+ AuthorHrefPkgFilterChecker() = default;
+ ~AuthorHrefPkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // AUTHOR_HREF_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "author_name_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool AuthorNamePkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr &&
+ static_cast<author_x*>(info->author->data)->text != nullptr &&
+ strcmp(node->value,
+ (static_cast<author_x*>(info->author->data))->text) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AUTHOR_NAME_PKG_FILTER_CHECKER_HH_
+#define AUTHOR_NAME_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class AuthorNamePkgFilterChecker : public IPkgFilterChecker {
+ public:
+ AuthorNamePkgFilterChecker() = default;
+ ~AuthorNamePkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // AUTHOR_NAME_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "install_location_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool InstallLocationPkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->installlocation != nullptr &&
+ strcmp(node->value, info->installlocation) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INSTALL_LOCATION_PKG_FILTER_CHECKER_HH_
+#define INSTALL_LOCATION_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class InstallLocationPkgFilterChecker : public IPkgFilterChecker {
+ public:
+ InstallLocationPkgFilterChecker() = default;
+ ~InstallLocationPkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // INSTALL_LOCATION_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "installed_storage_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool InstalledStorageFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->installed_storage != nullptr &&
+ strcmp(node->value, info->installed_storage) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INSTALLED_STORAGE_PKG_FILTER_CHECKER_HH_
+#define INSTALLED_STORAGE_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class InstalledStorageFilterChecker : public IPkgFilterChecker {
+ public:
+ InstalledStorageFilterChecker() = default;
+ ~InstalledStorageFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // INSTALLED_STORAGE_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "nodisplay_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool NoDisplayPkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->nodisplay_setting != nullptr &&
+ strcasecmp(node->value, info->nodisplay_setting) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef NODISPLAY_PKG_FILTER_CHECKER_HH_
+#define NODISPLAY_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class NoDisplayPkgFilterChecker : public IPkgFilterChecker {
+ public:
+ NoDisplayPkgFilterChecker() = default;
+ ~NoDisplayPkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // NODISPLAY_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "pkg_size_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool PkgSizePkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->package_size != nullptr &&
+ strcmp(node->value, info->package_size) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef PKG_SIZE_PKG_FILTER_CHECKER_HH_
+#define PKG_SIZE_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class PkgSizePkgFilterChecker : public IPkgFilterChecker {
+ public:
+ PkgSizePkgFilterChecker() = default;
+ ~PkgSizePkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // PKG_SIZE_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "pkgtype_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool PkgTypePkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->type != nullptr &&
+ strcasecmp(node->value, info->type) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef PKGYPTE_PKG_FILTER_CHECKER_HH_
+#define PKGYPTE_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class PkgTypePkgFilterChecker : public IPkgFilterChecker {
+ public:
+ PkgTypePkgFilterChecker() = default;
+ ~PkgTypePkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // PKGYPTE_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "read_only_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool ReadOnlyPkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->readonly != nullptr &&
+ strcasecmp(node->value, info->readonly) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef READ_ONLY_PKG_FILTER_CHECKER_HH_
+#define READ_ONLY_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class ReadOnlyPkgFilterChecker : public IPkgFilterChecker {
+ public:
+ ReadOnlyPkgFilterChecker() = default;
+ ~ReadOnlyPkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // READ_ONLY_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "support_disable_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool SupportDisablePkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->support_disable != nullptr &&
+ strcasecmp(node->value, info->support_disable) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SUPPORT_DISABLE_PKG_FILTER_CHECKER_HH_
+#define SUPPORT_DISABLE_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class SupportDisablePkgFilterChecker : public IPkgFilterChecker {
+ public:
+ SupportDisablePkgFilterChecker() = default;
+ ~SupportDisablePkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // SUPPORT_DISABLE_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "system_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool SystemPkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->system != nullptr &&
+ strcasecmp(node->value, info->system) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SYSTEM_PKG_FILTER_CHECKER_HH_
+#define SYSTEM_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class SystemPkgFilterChecker : public IPkgFilterChecker {
+ public:
+ SystemPkgFilterChecker() = default;
+ ~SystemPkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // SYSTEM_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "update_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool UpdatePkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->update != nullptr &&
+ strcasecmp(node->value, info->update) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UPDATE_PKG_FILTER_CHECKER_HH_
+#define UPDATE_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class UpdatePkgFilterChecker : public IPkgFilterChecker {
+ public:
+ UpdatePkgFilterChecker() = default;
+ ~UpdatePkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // UPDATE_PKG_FILTER_CHECKER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "version_pkg_filter_checker.hh"
+
+namespace pkgmgr_server {
+namespace database {
+
+bool VersionPkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
+ package_x* info) {
+ return (node->value != nullptr && info->version != nullptr &&
+ strcmp(node->value, info->version) == 0);
+}
+
+} // namespace database
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VERSION_PKG_FILTER_CHECKER_HH_
+#define VERSION_PKG_FILTER_CHECKER_HH_
+
+#include "pkg_filter_checker_base.hh"
+
+#include "pkgmgrinfo_basic.h"
+#include "pkgmgrinfo_private.h"
+
+namespace pkgmgr_server {
+namespace database {
+
+class VersionPkgFilterChecker : public IPkgFilterChecker {
+ public:
+ VersionPkgFilterChecker() = default;
+ ~VersionPkgFilterChecker() = default;
+ bool CheckFilter(pkgmgrinfo_node_x* node, package_x* info) override;
+};
+
+} // namespace database
+} // namespace pkgmgr_server
+
+#endif // VERSION_PKG_FILTER_CHECKER_HH_