Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / systemservice / power_service / server / src / powerservice_main.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_PowerService
19 /// \brief    Application entry point.
20 ///
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #include <system_service/ss_services.h>
24 #include <system_service/ss_version.h>
25 #include <system_service/ss_system_if.h>
26 #include <native_service/ns_version_if.h>
27 #include <native_service/frameworkunified_dispatcher.h>
28 #include <native_service/frameworkunified_application.h>
29 #include <native_service/ns_message_center_if.h>
30
31 #include "ss_power_powerservicelog.h"
32
33 CFrameworkunifiedVersion g_FrameworkunifiedVersion(MAJORNO, MINORNO, REVISION);
34
35 /// \brief: Name of the Queue that will be
36 /// used to read data from.
37 const CHAR AppName[] = SERVICE_POWER;
38
39 /// \brief: public structure that is used
40 /// for logging by NSLogger.
41 FRAMEWORKUNIFIEDLOGPARAM g_FrameworkunifiedLogParams = {
42 FRAMEWORKUNIFIEDLOGOPTIONS, {
43 ZONE_TEXT_10, ZONE_TEXT_11, ZONE_TEXT_12,
44 ZONE_TEXT_13, ZONE_TEXT_14, ZONE_TEXT_15,
45 ZONE_TEXT_16, ZONE_TEXT_17, ZONE_TEXT_18,
46 ZONE_TEXT_19, ZONE_TEXT_20, ZONE_TEXT_21,
47 ZONE_TEXT_22, ZONE_TEXT_23, ZONE_TEXT_24,
48 ZONE_TEXT_25, ZONE_TEXT_26, ZONE_TEXT_27,
49 ZONE_TEXT_28, ZONE_TEXT_29, ZONE_TEXT_30,
50 ZONE_TEXT_31 }, FRAMEWORKUNIFIEDLOGZONES };
51
52 /**
53  *int main(int argc, char *argv[])
54  * @brief Main function for SS_Power subsystem.
55  *
56  * @param argc number of arguments passed to SS_Power
57  * @param argv array of arguments passed to SS_Power
58  *
59  * @return int status of applications exit.
60  */
61 int main(int argc, char *argv[]) {
62   FRAMEWORKUNIFIED_SET_ZONES();
63   FrameworkunifiedDefaultCallbackHandler cbFuncs;
64   FRAMEWORKUNIFIED_MAKE_DEFAULT_CALLBACK(cbFuncs);
65
66   EFrameworkunifiedStatus eStatus = FrameworkunifiedDispatcherWithArguments(AppName, argc, argv,
67                                                   &cbFuncs);
68   return eStatus;
69 }
70