From 0c227e6517e747b912e104f33e41300b090b7e11 Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Thu, 17 Aug 2023 10:38:15 +0900 Subject: [PATCH] display: Remove display module from headless plugin Headless does not use display device, however dummy display.so file exists. As display refactoring progressed, there was no need for dummy display module to exist. Thus, display module is removed from headless plugin. Change-Id: Ia0bf6bf53ae5883a86f26bc522f222130ae95b3d Signed-off-by: Yunhee Seo --- CMakeLists.txt | 1 - packaging/deviced.spec | 2 - plugins/iot-headless/display/CMakeLists.txt | 23 ---------- plugins/iot-headless/display/core.c | 66 ----------------------------- 4 files changed, 92 deletions(-) delete mode 100644 plugins/iot-headless/display/CMakeLists.txt delete mode 100644 plugins/iot-headless/display/core.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 52ab2f5..ee7bca9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -345,7 +345,6 @@ ADD_SUBDIRECTORY(plugins/wearable/display) ADD_SUBDIRECTORY(plugins/tv/display) ADD_SUBDIRECTORY(plugins/iot-headed/display) ADD_SUBDIRECTORY(plugins/iot-headless/input) -ADD_SUBDIRECTORY(plugins/iot-headless/display) IF(BATTERY_MODULE STREQUAL on) ADD_SUBDIRECTORY(plugins/mobile/battery) ADD_SUBDIRECTORY(plugins/wearable/battery) diff --git a/packaging/deviced.spec b/packaging/deviced.spec index 3f7bb9c..ae1a832 100644 --- a/packaging/deviced.spec +++ b/packaging/deviced.spec @@ -261,7 +261,6 @@ mv %{_sysconfdir}/deviced/input-profile-iot-headless.conf %{_sysconfdir}/deviced mv %{_sysconfdir}/deviced/power-profile-iot-headless.conf %{_sysconfdir}/deviced/power.conf mkdir -p %{_libdir}/deviced mv %{_libdir}/iot-headless-input-handler.so %{_libdir}/deviced/input-handler.so -mv %{_libdir}/iot-headless-display.so %{_libdir}/deviced/display.so %files %manifest %{name}.manifest @@ -396,6 +395,5 @@ mv %{_libdir}/iot-headless-display.so %{_libdir}/deviced/display.so %config %{_sysconfdir}/deviced/input-profile-iot-headless.conf %config %{_sysconfdir}/deviced/power-profile-iot-headless.conf %{_libdir}/iot-headless-input-handler.so -%{_libdir}/iot-headless-display.so %{_unitdir}/rndis.service %{_bindir}/rndis.sh diff --git a/plugins/iot-headless/display/CMakeLists.txt b/plugins/iot-headless/display/CMakeLists.txt deleted file mode 100644 index 20507d2..0000000 --- a/plugins/iot-headless/display/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(iot-headless-display C) - -FILE(GLOB SRCS "*.c") - -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src) -# FIXME: Temporary include path for separating display core and plugin -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/display) - -INCLUDE(FindPkgConfig) -pkg_check_modules(libpkgs REQUIRED - libsyscommon) - -FOREACH(flag ${libpkgs_CFLAGS}) - SET(EXTRA_LIB_CFLAGS "${EXTRA_LIB_CFLAGS} ${flag}") -ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS}") - -ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libpkgs_LDFLAGS} deviced-common-private) -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "") -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME iot-headless-display) -INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) diff --git a/plugins/iot-headless/display/core.c b/plugins/iot-headless/display/core.c deleted file mode 100644 index 0b50049..0000000 --- a/plugins/iot-headless/display/core.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * deviced - * - * Copyright (c) 2022 Samsung Electronics Co., Ltd. - * - * 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 -#include -#include - -#include "core/log.h" - -static GVariant *dbus_lockstate(GDBusConnection *conn, - const gchar *sender, const gchar *path, const gchar *iface, const gchar *name, - GVariant *param, GDBusMethodInvocation *invocation, gpointer user_data) -{ - return g_variant_new("(i)", 0); -} - -static GVariant *dbus_unlockstate(GDBusConnection *conn, - const gchar *sender, const gchar *path, const gchar *iface, const gchar *name, - GVariant *param, GDBusMethodInvocation *invocation, gpointer user_data) -{ - return g_variant_new("(i)", 0); -} - -static const dbus_method_s dbus_methods[] = { - { "lockstate", "sssi", "i", dbus_lockstate }, - { "unlockstate", "ss", "i", dbus_unlockstate } -}; - -static const dbus_interface_u dbus_interface = { - .oh = NULL, - .name = DEVICED_INTERFACE_DISPLAY, - .methods = dbus_methods, - .nr_methods = ARRAY_SIZE(dbus_methods), -}; - -static void display_init(void *data) -{ - int ret = 0; - - ret = gdbus_add_object(NULL, DEVICED_PATH_DISPLAY, &dbus_interface); - if (ret < 0) - _W("Failed to init plugin iot-headless display dbus interface(%d)", ret); -} - -static const struct device_ops display_plugin_device_ops = { - .disable_auto_init = true, - DECLARE_NAME_LEN("display-plugin"), - .init = display_init, -}; - -DEVICE_OPS_REGISTER(&display_plugin_device_ops) -- 2.7.4