4 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef _COMMAND_COMMON_H_
21 #define _COMMAND_COMMON_H_
24 #include <sensor_common.h>
26 #define COMMAND_CHANNEL_PATH "/tmp/sensord_command_socket"
27 #define EVENT_CHANNEL_PATH "/tmp/sensord_event_socket"
29 #define MAX_HANDLE 256
30 #define MAX_HANDLE_REACHED -2
48 CMD_SET_ATTRIBUTE_INT,
49 CMD_SET_ATTRIBUTE_STR,
58 } cmd_get_sensor_list_t;
85 } cmd_get_sensor_list_done_t;
89 sensor_data_t base_data;
90 } cmd_get_data_done_t;
99 unsigned int event_type;
103 unsigned int event_type;
107 unsigned int interval;
108 unsigned int latency;
125 } cmd_set_attribute_int_t;
131 } cmd_set_attribute_str_t;
133 #define EVENT_CHANNEL_MAGIC 0xCAFECAFE
138 } event_channel_ready_t;
140 typedef void *(*cmd_func_t)(void *data, void *cb_data);
142 #endif /* _COMMAND_COMMON_H_ */