2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <sensor_log.h>
21 int sensor_recorder_is_supported(sensor_type_e type, bool *supported)
23 if (type <= SENSOR_ALL)
24 return SENSOR_ERROR_INVALID_PARAMETER;
26 return SENSOR_ERROR_INVALID_PARAMETER;
30 return SENSOR_ERROR_NONE;
33 int sensor_recorder_start(sensor_type_e type, sensor_recorder_option_h option)
35 if (type <= SENSOR_ALL)
36 return SENSOR_ERROR_INVALID_PARAMETER;
38 return SENSOR_ERROR_NOT_SUPPORTED;
41 int sensor_recorder_stop(sensor_type_e type)
43 if (type <= SENSOR_ALL)
44 return SENSOR_ERROR_INVALID_PARAMETER;
46 return SENSOR_ERROR_NOT_SUPPORTED;
49 int sensor_recorder_create_option(sensor_recorder_option_h *option)
52 return SENSOR_ERROR_INVALID_PARAMETER;
54 *option = (sensor_recorder_option_h)malloc(sizeof(sensor_recorder_option_h));
56 return SENSOR_ERROR_OUT_OF_MEMORY;
58 return SENSOR_ERROR_NONE;
61 int sensor_recorder_destroy_option(sensor_recorder_option_h option)
64 return SENSOR_ERROR_INVALID_PARAMETER;
66 return SENSOR_ERROR_NONE;
69 int sensor_recorder_option_set_int(sensor_recorder_option_h option, sensor_recorder_option_e attribute, int value)
72 return SENSOR_ERROR_INVALID_PARAMETER;
74 return SENSOR_ERROR_INVALID_PARAMETER;
76 return SENSOR_ERROR_NONE;
79 int sensor_recorder_create_query(sensor_recorder_query_h *query)
82 return SENSOR_ERROR_INVALID_PARAMETER;
84 *query = (sensor_recorder_query_h)malloc(sizeof(sensor_recorder_query_h));
86 return SENSOR_ERROR_OUT_OF_MEMORY;
88 return SENSOR_ERROR_NONE;
91 int sensor_recorder_destroy_query(sensor_recorder_query_h query)
94 return SENSOR_ERROR_INVALID_PARAMETER;
96 return SENSOR_ERROR_NONE;
99 int sensor_recorder_query_set_int(sensor_recorder_query_h query, sensor_recorder_query_e attribute, int value)
102 return SENSOR_ERROR_INVALID_PARAMETER;
104 return SENSOR_ERROR_INVALID_PARAMETER;
106 return SENSOR_ERROR_NONE;
109 int sensor_recorder_query_set_time(sensor_recorder_query_h query, sensor_recorder_query_e attribute, time_t t)
112 return SENSOR_ERROR_INVALID_PARAMETER;
114 return SENSOR_ERROR_INVALID_PARAMETER;
116 return SENSOR_ERROR_INVALID_PARAMETER;
118 return SENSOR_ERROR_NONE;
121 int sensor_recorder_read(sensor_type_e type, sensor_recorder_query_h query, sensor_recorder_data_cb cb, void *user_data)
123 if (type <= SENSOR_ALL)
124 return SENSOR_ERROR_INVALID_PARAMETER;
126 return SENSOR_ERROR_INVALID_PARAMETER;
128 return SENSOR_ERROR_NONE;
131 int sensor_recorder_read_sync(sensor_type_e type, sensor_recorder_query_h query, sensor_recorder_data_cb cb, void *user_data)
133 if (type <= SENSOR_ALL)
134 return SENSOR_ERROR_INVALID_PARAMETER;
136 return SENSOR_ERROR_INVALID_PARAMETER;
138 return SENSOR_ERROR_NONE;
141 int sensor_recorder_data_get_time(sensor_recorder_data_h data, time_t *start_time, time_t *end_time)
143 if (!data || !start_time || !end_time)
144 return SENSOR_ERROR_INVALID_PARAMETER;
146 return SENSOR_ERROR_NONE;
149 int sensor_recorder_data_get_int(sensor_recorder_data_h data, sensor_recorder_data_e key, int *value)
152 return SENSOR_ERROR_INVALID_PARAMETER;
154 return SENSOR_ERROR_INVALID_PARAMETER;
156 return SENSOR_ERROR_NONE;
159 int sensor_recorder_data_get_double(sensor_recorder_data_h data, sensor_recorder_data_e key, double *value)
162 return SENSOR_ERROR_INVALID_PARAMETER;
164 return SENSOR_ERROR_INVALID_PARAMETER;
166 return SENSOR_ERROR_NONE;