Remove unused directories and files in video_in_hal
[staging/basesystem.git] / systemservice / interface_unified / library / src / ss_framework_if.cpp
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup  tag_SystemManagerIf
19 /// \brief    This file provides support for the System Manager AGL framework
20 ///           interface.
21 ///
22 ///////////////////////////////////////////////////////////////////////////////
23
24 #include <native_service/frameworkunified_types.h>
25 #include <native_service/frameworkunified_framework_if.h>
26 #include <string.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"
33
34 HANDLE  g_SystemIf_hApp = NULL;
35
36 EFrameworkunifiedStatus FrameworkunifiedSSFrameworkInterface(HANDLE hApp) {
37   EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
38   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
39
40   g_SystemIf_hApp = hApp;
41   PCSTR pAppNameStr = FrameworkunifiedGetAppName(hApp);
42
43   if (0 != strcmp(SERVICE_SYSMANAGER, pAppNameStr) &&
44       0 != strcmp(TC_Power, pAppNameStr)) {
45     l_eStatus = InterfaceunifiedSystemConnectToSystemManagerService(hApp);
46     LOG_STATUS(l_eStatus, "InterfaceunifiedSystemConnectToSystemManagerService()");
47
48     if (0 != strcmp(TC_SysManager, pAppNameStr)) {
49       l_eStatus = InterfaceunifiedSystemConnectToHeartBeatService(hApp);
50       LOG_STATUS(l_eStatus, "InterfaceunifiedSystemConnectToHeartBeatService()");
51     }
52   }
53   FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
54   return l_eStatus;
55 }  // LCOV_EXCL_BR_LINE 10:Because the last line