diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-07-16 18:39:54 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-07-16 18:39:54 +0900 |
commit | b3e61d642ff6f56aa2d55651fbad52394dc79964 (patch) | |
tree | db3fb51895cc49a5e7360989a4c2ed50d23bf076 | |
parent | ec78c651f425206c46b543786af0793033a41640 (diff) |
Remove appfw_client
Change-Id: I66f30f5b05966419b76341d1aa16baa534eee81c
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/appfw_client.cpp | 70 | ||||
-rw-r--r-- | src/appfw_client.hpp | 43 | ||||
-rw-r--r-- | src/window_manager.cpp | 13 | ||||
-rw-r--r-- | src/window_manager.hpp | 2 |
5 files changed, 1 insertions, 128 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8bcc3ff..6155ef3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,7 +39,6 @@ add_library(${TARGETS_WM} MODULE wm_config.cpp applist.cpp request.cpp - appfw_client.cpp pm_wrapper.cpp) target_include_directories(${TARGETS_WM} diff --git a/src/appfw_client.cpp b/src/appfw_client.cpp deleted file mode 100644 index 89b7870..0000000 --- a/src/appfw_client.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2017 TOYOTA MOTOR CORPORATION - * - * 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 <string> -#include "appfw_client.hpp" -extern "C" -{ -#include <afb/afb-binding.h> -#include <systemd/sd-bus.h> -} - - -using std::string; -const string default_address = "org.AGL.afm.user"; - -namespace wm { - -AppFWClient::AppFWClient() -{} - -AppFWClient::~AppFWClient() -{ - sd_bus_unref(this->appfw_dbus); -} - -WMError AppFWClient::connect(const string &address) -{ - WMError ret = FAIL; - if(address.size() == 0) - { - return FAIL; - } - - this->appfw_dbus = afb_daemon_get_system_bus(); - int rc = sd_bus_set_address(this->appfw_dbus, address.c_str()); - if(rc < 0) - { - ret = FAIL; - } - else - { - ret = SUCCESS; - } - return ret; -} - -string AppFWClient::queryAppID(unsigned pid) -{ - string ret = ""; - if(this->appfw_dbus == nullptr) - return ret; - - - return ret; -} - -} // namespace wm
\ No newline at end of file diff --git a/src/appfw_client.hpp b/src/appfw_client.hpp deleted file mode 100644 index c8c25a2..0000000 --- a/src/appfw_client.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2017 TOYOTA MOTOR CORPORATION - * - * 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 APPFW_CLIENT_HPP -#define APPFW_CLIENT_HPP -#include <string> -#include "wm_error.hpp" -extern "C" -{ -#include <systemd/sd-bus.h> -} - -namespace wm{ - -class AppFWClient -{ - public: - AppFWClient(); - virtual ~AppFWClient(); - AppFWClient(const AppFWClient &obj) = default; - WMError connect(const std::string &address); - - std::string queryAppID(unsigned pid); - - private: - sd_bus* appfw_dbus; -}; - -} // namespace wm -#endif // APPFW_CLIENT_HPP
\ No newline at end of file diff --git a/src/window_manager.cpp b/src/window_manager.cpp index 17be0f6..a5297a5 100644 --- a/src/window_manager.cpp +++ b/src/window_manager.cpp @@ -183,9 +183,6 @@ int WindowManager::init() // Register callback to PolicyManager this->pmw.registerCallback(onStateTransitioned, onError); - // Initialize appfw client - this->appfw_clt.connect("org.AGL.afm.user"); - // Make afb event for (int i = Event_Val_Min; i <= Event_Val_Max; i++) { @@ -724,8 +721,7 @@ void WindowManager::surface_removed(uint32_t surface_id) void WindowManager::surface_properties(unsigned surface_id, unsigned pid) { HMI_DEBUG("wm", "get surface properties"); - // TODO: I would like to call "afm-main" using afb-binder but I can't now - /* + // search pid from surfaceID json_object *response; afb_service_call_sync("afm-main", "runners", nullptr, &response); @@ -740,13 +736,6 @@ void WindowManager::surface_properties(unsigned surface_id, unsigned pid) { HMI_INFO("wm", "Runners:%s", json_object_get_string(response)); } - */ - std::string appid = appfw_clt.queryAppID(pid); - if(appid.length() == 0) - { - HMI_ERROR("wm", "Unknown surface. Ignore"); - return; - } // check appid then add it to the client g_app_list.addFloatingSurface(appid, surface_id, pid); diff --git a/src/window_manager.hpp b/src/window_manager.hpp index 1ab711a..7fbd43e 100644 --- a/src/window_manager.hpp +++ b/src/window_manager.hpp @@ -29,7 +29,6 @@ #include "hmi-debug.h" #include "request.hpp" #include "wm_error.hpp" -#include "appfw_client.hpp" struct json_object; @@ -283,7 +282,6 @@ class WindowManager std::unordered_map<std::string, std::string> rolenew2old; PMWrapper pmw; - AppFWClient appfw_clt; static const char* kDefaultOldRoleDb; }; |