Handle restart request
[platform/core/appfw/launchpad.git] / src / lib / launchpad-common / types.hh
1 /*
2  * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved
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 #ifndef LIB_LAUNCHPAD_COMMON_TYPES_HH_
18 #define LIB_LAUNCHPAD_COMMON_TYPES_HH_
19
20 #undef EXPORT_API
21 #define EXPORT_API __attribute__((visibility("default")))
22
23 namespace launchpad {
24
25 const int kLoaderArgLength = 1024;
26
27 enum LoaderArg {
28   Path,
29   Type,
30   Id,
31   Hydra,
32   Extra,
33   Dummy,
34 };
35
36 enum HydraCmd {
37   LaunchCandidate,
38   LaunchCandidateWithArgs,
39 };
40
41 enum LoaderType {
42   Unsupported = -1,
43   None = 0,
44   User = 1,
45   Dynamic = 100,
46   Max,
47 };
48
49 enum PadCmd {
50   Launch = 0,
51   Visibility = 10,
52   AddLoader = 11,
53   RemoveLoader = 12,
54   MakeDefaultSlots = 13,
55   Demand = 14,
56   Ping = 15,
57   UpdateAppType = 16,
58   PrepareAppDefinedLoader = 17,
59   Connect = 18,
60   KillLoader = 19,
61   RestartLoader = 20,
62 };
63
64 enum PadLoaderId {
65   Static = 0,
66   Direct = 1,
67   DynamicBase = 10,
68 };
69
70 enum AmdCmd {
71   LaunchpadDeadSignal = 61,
72   LaunchpadLaunchSignal = 83,
73   AppStartupSignal = 89,
74 };
75
76 }  // namespace launchpad
77
78 #endif  // LIB_LAUNCHPAD_COMMON_TYPES_HH_