summaryrefslogtreecommitdiff
path: root/src/device-plugin.c
blob: 6a971298b11bf684378c0141b5b42ef4f6366ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
/*
 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the "License"),
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/


#include <string.h>
#include <sys/types.h>
#include <stdio.h>
#include <dirent.h>
#include <errno.h>

#include "devman_plugin_intf.h"

static int OEM_sys_get_display_count(int *value)
{
	return 0;
}

static int OEM_sys_get_backlight_min_brightness(int index, int *value)
{
	return 0;
}

static int OEM_sys_get_backlight_max_brightness(int index, int *value)
{
	return 0;
}

static int OEM_sys_get_backlight_brightness(int index, int *value, int power_saving)
{
	return 0;
}

static int OEM_sys_set_backlight_brightness(int index, int value, int power_saving)
{
	return 0;
}

static int OEM_sys_set_backlight_dimming(int index, int value)
{
	return 0;
}

static int OEM_sys_get_backlight_acl_control(int index, int *value)
{
	return 0;
}

static int OEM_sys_set_backlight_acl_control(int index, int value)
{
	return 0;
}

static int OEM_sys_get_lcd_power(int index, int *value)
{
	return 0;
}

static int OEM_sys_set_lcd_power(int index, int value)
{
	return 0;
}

static int OEM_sys_get_image_enhance_mode(int *value)
{
	return 0;
}

static int OEM_sys_set_image_enhance_mode(int value)
{
	return 0;
}

static int OEM_sys_get_image_enhance_scenario(int *value)
{
	return 0;
}

static int OEM_sys_set_image_enhance_scenario(int value)
{
	return 0;
}

static int OEM_sys_get_image_enhance_tone(int *value)
{
	return 0;
}

static int OEM_sys_set_image_enhance_tone(int value)
{
	return 0;
}

static int OEM_sys_get_image_enhance_outdoor(int *value)
{
	return 0;
}

static int OEM_sys_set_image_enhance_outdoor(int value)
{
	return 0;
}

static int OEM_sys_get_image_enhance_tune(int *value)
{
	return 0;
}

static int OEM_sys_set_image_enhance_tune(int value)
{
	return 0;
}

static int OEM_sys_image_enhance_info(int *value)
{
	return 0;
}

static int OEM_sys_set_display_frame_rate(int value)
{
	return 0;
}

static int OEM_sys_get_uart_path(int *value)
{
	return 0;
}

static int OEM_sys_set_uart_path(int value)
{
	return 0;
}

static int OEM_sys_get_usb_path(int *value)
{
	return 0;
}

static int OEM_sys_set_usb_path(int value)
{
	return 0;
}

static int OEM_sys_get_battery_capacity(int *value)
{
	return 0;
}

static int OEM_sys_get_battery_capacity_raw(int *value)
{
	return 0;
}

static int OEM_sys_get_battery_charge_full(int *value)
{
	return 0;
}

static int OEM_sys_get_battery_charge_now(int *value)
{
	return 0;
}

static int OEM_sys_get_battery_present(int *value)
{
	return 0;
}

static int OEM_sys_get_battery_health(int *value)
{
	return 0;
}

static int OEM_sys_get_battery_polling_required(int *value)
{
	return 0;
}

static int OEM_sys_get_battery_support_insuspend_charging(int *value)
{
	return 0;
}

static int OEM_sys_get_jack_charger_online(int *value)
{
	return 0;
}

static int OEM_sys_get_jack_earjack_online(int *value)
{
	return 0;
}

static int OEM_sys_get_jack_earkey_online(int *value)
{
	return 0;
}

static int OEM_sys_get_jack_hdmi_online(int *value)
{
	return 0;
}

static int OEM_sys_get_jack_usb_online(int *value)
{
	return 0;
}

static int OEM_sys_get_jack_cradle_online(int *value)
{
	return 0;
}

static int OEM_sys_get_jack_tvout_online(int *value)
{
	return 0;
}

static int OEM_sys_get_jack_keyboard_online(int *value)
{
	return 0;
}

static int OEM_sys_get_leds_torch_max_brightness(int *value)
{
	return 0;
}

static int OEM_sys_get_leds_torch_brightness(int *value)
{
	return 0;
}

static int OEM_sys_set_leds_torch_brightness(int value)
{
	return 0;
}

static int OEM_sys_set_power_state(int value)
{
	return 0;
}

static int OEM_sys_get_power_wakeup_count(int *value)
{
	return 0;
}

static int OEM_sys_set_power_wakeup_count(int value)
{
	return 0;
}

static int OEM_sys_get_backlight_brightness_by_lux(int lux, int *value)
{
	return 0;
}

static int OEM_sys_get_whitemagic_mode(int index, int *value)
{
	return 0;
}

static int OEM_sys_set_whitemagic_mode(int index, int value)
{
	return 0;
}

static int OEM_sys_get_hdmi_support(int *value)
{
	return 0;
}

static int OEM_sys_set_irled_control(char *value)
{
	return 0;
}

static int OEM_sys_get_hardkey_backlight(int *value)
{
	return 0;
}

static int OEM_sys_set_hardkey_backlight(int value)
{
	return 0;
}


const OEM_sys_devman_plugin_interface default_plugin = {
	/* Light interfaces */
	.OEM_sys_get_display_count = &OEM_sys_get_display_count,
	.OEM_sys_get_backlight_min_brightness = &OEM_sys_get_backlight_min_brightness,
	.OEM_sys_get_backlight_max_brightness = &OEM_sys_get_backlight_max_brightness,
	.OEM_sys_get_backlight_brightness = &OEM_sys_get_backlight_brightness,
	.OEM_sys_set_backlight_brightness = &OEM_sys_set_backlight_brightness,
	.OEM_sys_set_backlight_dimming = &OEM_sys_set_backlight_dimming,
	.OEM_sys_get_backlight_acl_control = &OEM_sys_get_backlight_acl_control,
	.OEM_sys_set_backlight_acl_control = &OEM_sys_set_backlight_acl_control,

	.OEM_sys_get_lcd_power = &OEM_sys_get_lcd_power,
	.OEM_sys_set_lcd_power = &OEM_sys_set_lcd_power,

	/* Image Ehnhace interfaces */
	.OEM_sys_get_image_enhance_mode = &OEM_sys_get_image_enhance_mode,
	.OEM_sys_set_image_enhance_mode = &OEM_sys_set_image_enhance_mode,
	.OEM_sys_get_image_enhance_scenario = &OEM_sys_get_image_enhance_scenario,
	.OEM_sys_set_image_enhance_scenario = &OEM_sys_set_image_enhance_scenario,
	.OEM_sys_get_image_enhance_tone = &OEM_sys_get_image_enhance_tone,
	.OEM_sys_set_image_enhance_tone = &OEM_sys_set_image_enhance_tone,
	.OEM_sys_get_image_enhance_outdoor = &OEM_sys_get_image_enhance_outdoor,
	.OEM_sys_set_image_enhance_outdoor = &OEM_sys_set_image_enhance_outdoor,

	.OEM_sys_get_image_enhance_tune = &OEM_sys_get_image_enhance_tune,
	.OEM_sys_set_image_enhance_tune = &OEM_sys_set_image_enhance_tune,

	.OEM_sys_image_enhance_info = &OEM_sys_image_enhance_info,

	.OEM_sys_set_display_frame_rate = &OEM_sys_set_display_frame_rate,

	/* UART path interfaces */
	.OEM_sys_get_uart_path = &OEM_sys_get_uart_path,
	.OEM_sys_set_uart_path = &OEM_sys_set_uart_path,

	/* USB path interfaces */
	.OEM_sys_get_usb_path = &OEM_sys_get_usb_path,
	.OEM_sys_set_usb_path = &OEM_sys_set_usb_path,

	/* Battery interfaces */
	.OEM_sys_get_battery_capacity = &OEM_sys_get_battery_capacity,
	.OEM_sys_get_battery_capacity_raw = &OEM_sys_get_battery_capacity_raw,
	.OEM_sys_get_battery_charge_full = &OEM_sys_get_battery_charge_full,
	.OEM_sys_get_battery_charge_now = &OEM_sys_get_battery_charge_now,
	.OEM_sys_get_battery_present = &OEM_sys_get_battery_present,
	.OEM_sys_get_battery_health = &OEM_sys_get_battery_health,
	.OEM_sys_get_battery_polling_required = &OEM_sys_get_battery_polling_required,
	.OEM_sys_get_battery_support_insuspend_charging = &OEM_sys_get_battery_support_insuspend_charging,

	/* Connection interfaces  */
	.OEM_sys_get_jack_charger_online = &OEM_sys_get_jack_charger_online,
	.OEM_sys_get_jack_earjack_online = &OEM_sys_get_jack_earjack_online,
	.OEM_sys_get_jack_earkey_online = &OEM_sys_get_jack_earkey_online,
	.OEM_sys_get_jack_hdmi_online = &OEM_sys_get_jack_hdmi_online,
	.OEM_sys_get_jack_usb_online = &OEM_sys_get_jack_usb_online,
	.OEM_sys_get_jack_cradle_online = &OEM_sys_get_jack_cradle_online,
	.OEM_sys_get_jack_tvout_online = &OEM_sys_get_jack_tvout_online,
	.OEM_sys_get_jack_keyboard_online = &OEM_sys_get_jack_keyboard_online,

	/* Torch interfaces */
	.OEM_sys_get_leds_torch_max_brightness = &OEM_sys_get_leds_torch_max_brightness,
	.OEM_sys_get_leds_torch_brightness = &OEM_sys_get_leds_torch_brightness,
	.OEM_sys_set_leds_torch_brightness = &OEM_sys_set_leds_torch_brightness,

	/* Power management interfaces */
	.OEM_sys_set_power_state = &OEM_sys_set_power_state,

	/* TODO: Should determine enum values of wakeup_count nodes */
	.OEM_sys_get_power_wakeup_count = &OEM_sys_get_power_wakeup_count,
	.OEM_sys_set_power_wakeup_count = &OEM_sys_set_power_wakeup_count,

	.OEM_sys_get_backlight_brightness_by_lux = &OEM_sys_get_backlight_brightness_by_lux,

	.OEM_sys_get_whitemagic_mode = &OEM_sys_get_whitemagic_mode,
	.OEM_sys_set_whitemagic_mode = &OEM_sys_set_whitemagic_mode,

	.OEM_sys_get_hdmi_support = &OEM_sys_get_hdmi_support,

	.OEM_sys_set_irled_control = &OEM_sys_set_irled_control,

	.OEM_sys_get_hardkey_backlight = &OEM_sys_get_hardkey_backlight,
	.OEM_sys_set_hardkey_backlight = &OEM_sys_set_hardkey_backlight
};