X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=service%2Fsystem%2Finterface_unified%2Flibrary%2Fsrc%2Fss_framework_if.cpp;fp=service%2Fsystem%2Finterface_unified%2Flibrary%2Fsrc%2Fss_framework_if.cpp;h=91d323a0b4232839f58885c94a7ca160f378d940;hb=17cf21bcf8a2e29d2cbcf0a313474d2a4ee44f5d;hp=0000000000000000000000000000000000000000;hpb=9e86046cdb356913ae026f616e5bf17f6f238aa5;p=staging%2Fbasesystem.git diff --git a/service/system/interface_unified/library/src/ss_framework_if.cpp b/service/system/interface_unified/library/src/ss_framework_if.cpp new file mode 100755 index 0000000..91d323a --- /dev/null +++ b/service/system/interface_unified/library/src/ss_framework_if.cpp @@ -0,0 +1,55 @@ +/* + * @copyright Copyright (c) 2016-2020 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. + */ + +/////////////////////////////////////////////////////////////////////////////// +/// \ingroup tag_SystemManagerIf +/// \brief This file provides support for the System Manager AGL framework +/// interface. +/// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include "system_service/ss_system_if.h" +#include "system_service/interfaceunified_system_application.h" +#include "system_service/ss_services.h" +#include "system_service/ss_test_clients.h" +#include "system_service/ss_templates.h" +#include "ss_system_if_interfaceunifiedlog.h" + +HANDLE g_SystemIf_hApp = NULL; + +EFrameworkunifiedStatus FrameworkunifiedSSFrameworkInterface(HANDLE hApp) { + EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK; + FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+"); + + g_SystemIf_hApp = hApp; + PCSTR pAppNameStr = FrameworkunifiedGetAppName(hApp); + + if (0 != strcmp(SERVICE_SYSMANAGER, pAppNameStr) && + 0 != strcmp(TC_Power, pAppNameStr)) { + l_eStatus = InterfaceunifiedSystemConnectToSystemManagerService(hApp); + LOG_STATUS(l_eStatus, "InterfaceunifiedSystemConnectToSystemManagerService()"); + + if (0 != strcmp(TC_SysManager, pAppNameStr)) { + l_eStatus = InterfaceunifiedSystemConnectToHeartBeatService(hApp); + LOG_STATUS(l_eStatus, "InterfaceunifiedSystemConnectToHeartBeatService()"); + } + } + FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-"); + return l_eStatus; +} // LCOV_EXCL_BR_LINE 10:Because the last line