4 * Copyright (c) 2014 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_
23 #include <sensor_common.h>
25 #define COMMAND_CHANNEL_PATH "/tmp/sensord_command_socket"
26 #define EVENT_CHANNEL_PATH "/tmp/sensord_event_socket"
28 #define MAX_HANDLE 256
29 #define MAX_HANDLE_REACHED -2
47 CMD_SET_ATTRIBUTE_INT,
48 CMD_SET_ATTRIBUTE_STR,
57 } cmd_get_sensor_list_t;
84 } cmd_get_sensor_list_done_t;
88 sensor_data_t base_data;
89 } cmd_get_data_done_t;
98 unsigned int event_type;
102 unsigned int event_type;
106 unsigned int interval;
107 unsigned int latency;
124 } cmd_set_attribute_int_t;
130 } cmd_set_attribute_str_t;
132 #define EVENT_CHANNEL_MAGIC 0xCAFECAFE
137 } event_channel_ready_t;
139 typedef void *(*cmd_func_t)(void *data, void *cb_data);
141 #endif /* _COMMAND_COMMON_H_ */