2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup tag_SystemManagerIf
19 /// \brief This file provides support for the System Manager AGL framework
22 ///////////////////////////////////////////////////////////////////////////////
24 #include <native_service/frameworkunified_types.h>
25 #include <native_service/frameworkunified_framework_if.h>
27 #include "system_service/ss_system_if.h"
28 #include "system_service/interfaceunified_system_application.h"
29 #include "system_service/ss_services.h"
30 #include "system_service/ss_test_clients.h"
31 #include "system_service/ss_templates.h"
32 #include "ss_system_if_interfaceunifiedlog.h"
34 HANDLE g_SystemIf_hApp = NULL;
36 EFrameworkunifiedStatus FrameworkunifiedSSFrameworkInterface(HANDLE hApp) {
37 EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
38 FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
40 g_SystemIf_hApp = hApp;
41 PCSTR pAppNameStr = FrameworkunifiedGetAppName(hApp);
43 if (0 != strcmp(SERVICE_SYSMANAGER, pAppNameStr) &&
44 0 != strcmp(TC_Power, pAppNameStr)) {
45 l_eStatus = InterfaceunifiedSystemConnectToSystemManagerService(hApp);
46 LOG_STATUS(l_eStatus, "InterfaceunifiedSystemConnectToSystemManagerService()");
48 if (0 != strcmp(TC_SysManager, pAppNameStr)) {
49 l_eStatus = InterfaceunifiedSystemConnectToHeartBeatService(hApp);
50 LOG_STATUS(l_eStatus, "InterfaceunifiedSystemConnectToHeartBeatService()");
53 FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
55 } // LCOV_EXCL_BR_LINE 10:Because the last line