Merge "apply config module"
[apps/native/tizen-things-daemon.git] / daemon / include / ttd-cmd-type.h
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 #ifndef __TTD_CMD_TYPE_H__
19 #define __TTD_CMD_TYPE_H__
20
21 typedef enum {
22         TTD_CMD_STATE_UNKNOWN = -1,
23         TTD_CMD_STATE_CREATED,
24         TTD_CMD_STATE_RUNNING,
25         TTD_CMD_STATE_DONE,
26         TTD_CMD_STATE_FAILED,
27         TTD_CMD_STATE_CANCELED,
28 } ttd_cmd_state_e;
29
30 typedef enum {
31         TTD_CMD_TYPE_UNKNOWN = -1,
32         TTD_CMD_TYPE_POWER,
33         TTD_CMD_TYPE_CONFIG,
34         TTD_CMD_TYPE_PACKAGE,
35         TTD_CMD_TYPE_DIAGNOSIS,
36         TTD_CMD_TYPE_INFO,
37         TTD_CMD_TYPE_LOCAL,
38         TTD_CMD_TYPE_MAX,
39 } ttd_cmd_type_e;
40
41 typedef enum { /* TBD */
42         TTD_CMD_POWER_OFF = 0,
43         TTD_CMD_POWER_RESTART,
44         TTD_CMD_POWER_MAX,
45 } ttd_cmd_power_e;
46
47 typedef enum { /* TBD */
48         TTD_CMD_CONFIG_SET,
49         TTD_CMD_CONFIG_MAX,
50 } ttd_cmd_config_e;
51
52 typedef enum { /* TBD */
53         TTD_CMD_CONFIG_SET_SERVER_URL,
54         TTD_CMD_CONFIG_SET_APP_ID,
55         TTD_CMD_CONFIG_ACTION_MAX,
56 } ttd_cmd_config_action_e;
57
58 typedef enum {
59         TTD_CMD_PACKAGE_INSTALL,
60         TTD_CMD_PACKAGE_REMOVE,
61         TTD_CMD_PACKAGE_GET_APP_LIST,
62         TTD_CMD_PACKAGE_GET_PACKAGE_LIST,
63         TTD_CMD_PACKAGE_MAX,
64 } ttd_cmd_package_e;
65
66 typedef enum { /* TBD */
67         TTD_CMD_DIAGNOSIS_GET_LOG,
68         TTD_CMD_DIAGNOSIS_MAX,
69 } ttd_cmd_diagnosis_e;
70
71 typedef enum { /* TBD */
72         TTD_CMD_INFO_GET_SYSINFO,
73         TTD_CMD_INFO_GET_TASKINFO,
74         TTD_CMD_INFO_GET_MAX,
75 } ttd_cmd_info_e;
76
77 typedef enum { /* TBD */
78         TTD_CMD_LOCAL_SOMETHING,
79         TTD_CMD_LOCAL_GET_CMD,
80         TTD_CMD_LOCAL_MAX,
81 } ttd_cmd_local_e;
82
83 typedef enum {
84         TTD_CMD_RESULT_RUNNING,
85         TTD_CMD_RESULT_SUCCESS,
86         TTD_CMD_RESULT_FAIL,
87 } ttd_cmd_result_e;
88
89 typedef void (*cmd_data_free_func)(void *data);
90 typedef int (*ttd_cmd_launch_func)(void *cmd_data);
91
92 typedef struct _ttd_cmd_data_s ttd_cmd_data;
93
94 #endif /* __TTD_CMD_TYPE_H__ */