diff --git a/DisplayInfo/CMakeLists.txt b/DisplayInfo/CMakeLists.txt index 0fb9ce7..6351e57 100644 --- a/DisplayInfo/CMakeLists.txt +++ b/DisplayInfo/CMakeLists.txt @@ -48,7 +48,7 @@ find_package(CompileSettingsDebug CONFIG REQUIRED) find_package(BCM_HOST QUIET) find_package(NEXUS QUIET) find_package(NXCLIENT QUIET) -find_package(LibDRM QUIET) +find_package(libdrm QUIET) add_library(${MODULE_NAME} SHARED DisplayInfo.cpp diff --git a/DisplayInfo/cmake/FindLibDRM.cmake b/DisplayInfo/cmake/FindLibDRM.cmake deleted file mode 100644 index 9bf34d0..0000000 --- a/DisplayInfo/cmake/FindLibDRM.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# If not stated otherwise in this file or this component's license file the -# following copyright and licenses apply: -# -# Copyright 2020 Metrological B.V. -# -# 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. - -if(LibDRM_FIND_QUIETLY) - set(_LibDRM_MODE QUIET) -elseif(LibDRM_FIND_REQUIRED) - set(_LibDRM_MODE REQUIRED) -endif() - -find_package(PkgConfig) - -# Just check if the libdrm.pc exist, and create the PkgConfig::libdrm target -# No version requirement (yet) -pkg_check_modules(LibDRM ${_LibDRM_MODE} IMPORTED_TARGET libdrm) - -include(FindPackageHandleStandardArgs) - -# Sets the FOUND variable to TRUE if all required variables are present and set -find_package_handle_standard_args( - LibDRM - REQUIRED_VARS - LibDRM_INCLUDE_DIRS - LibDRM_CFLAGS - LibDRM_LDFLAGS - LibDRM_LIBRARIES - LibDRM_ACTUAL_LIBRARY - VERSION_VAR - LibDRM_VERSION -) -mark_as_advanced(LibDRM_INCLUDE_DIRS LibDRM_LIBRARIES) - -if(LibDRM_FOUND) - add_library(libdrm::libdrm ALIAS PkgConfig::LibDRM) -endif() \ No newline at end of file diff --git a/DisplayInfo/cmake/Findlibdrm.cmake b/DisplayInfo/cmake/Findlibdrm.cmake new file mode 100644 index 0000000..e798a69 --- /dev/null +++ b/DisplayInfo/cmake/Findlibdrm.cmake @@ -0,0 +1,59 @@ +# If not stated otherwise in this file or this component's license file the +# following copyright and licenses apply: +# +# Copyright 2020 Metrological B.V. +# +# 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. + +find_package(PkgConfig) + +if(${PKG_CONFIG_FOUND}) + + # Just check if the libdrm.pc exist, and create the PkgConfig::libdrm target + # No version requirement (yet) + pkg_check_modules(libdrm QUIET IMPORTED_TARGET libdrm) + + include(FindPackageHandleStandardArgs) + + # Sets the FOUND variable to TRUE if all required variables are present and set + find_package_handle_standard_args( + libdrm + REQUIRED_VARS + libdrm_INCLUDE_DIRS + libdrm_CFLAGS + libdrm_LDFLAGS + libdrm_LIBRARIES + VERSION_VAR + libdrm_VERSION + ) + + find_library(libdrm_ACTUAL_LIBRARY NAMES drm + HINTS ${libdrm_LIBRARY_DIRS} ) + + if(libdrm_FOUND AND NOT TARGET libdrm::libdrm) + add_library(libdrm::libdrm UNKNOWN IMPORTED) + set_target_properties(libdrm::libdrm PROPERTIES + IMPORTED_LOCATION "${libdrm_ACTUAL_LIBRARY}" + INTERFACE_LINK_LIBRARIES "${libdrm_LIBRARIES}" + INTERFACE_COMPILE_OPTIONS "${libdrm_CFLAGS}" + INTERFACE_INCLUDE_DIRECTORIES "${libdrm_INCLUDE_DIRS}" + ) + endif() + + mark_as_advanced(libdrm_INCLUDE_DIRS libdrm_LIBRARIES) + +else() + + message(STATUS "Unable to locate PkgConfig") + +endif() diff --git a/OpenCDMi/FrameworkRPC.cpp b/OpenCDMi/FrameworkRPC.cpp index 4023744..2425047 100644 --- a/OpenCDMi/FrameworkRPC.cpp +++ b/OpenCDMi/FrameworkRPC.cpp @@ -105,18 +105,17 @@ namespace Plugin { }; class ExternalAccess : public RPC::Communicator { - private: + public: ExternalAccess() = delete; ExternalAccess(const ExternalAccess&) = delete; ExternalAccess& operator=(const ExternalAccess&) = delete; - public: ExternalAccess( - const Core::NodeId& source, + const Core::NodeId& sourceNode, Exchange::IAccessorOCDM* parentInterface, const string& proxyStubPath, - const Core::ProxyType & engine) - : RPC::Communicator(source, proxyStubPath, Core::ProxyType(engine)) + const Core::ProxyType& engine) + : RPC::Communicator(sourceNode, proxyStubPath, Core::ProxyType(engine), _T("@OCDM")) , _parentInterface(parentInterface) { Open(Core::infinite); diff --git a/SecurityAgent/SecurityAgent.h b/SecurityAgent/SecurityAgent.h index d28afb3..e5f89b8 100644 --- a/SecurityAgent/SecurityAgent.h +++ b/SecurityAgent/SecurityAgent.h @@ -44,7 +44,7 @@ namespace Plugin { PluginHost::IAuthenticate* parentInterface, const Core::ProxyType& engine ) - : RPC::Communicator(source, proxyStubPath, Core::ProxyType(engine)) + : RPC::Communicator(source, proxyStubPath, Core::ProxyType(engine), _T("@SecurityAgent")) , _parentInterface(parentInterface) { if (_parentInterface != nullptr){