2.0 alpha
[platform/core/system/devman.git] / include / devman_haptic_plugin_intf.h
1 /*
2  *  devman
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: DongGi Jang <dg0402.jang@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20 */
21
22
23 #ifndef __DEVMAN_HAPTIC_PLUGIN_INTF_H__
24 #define __DEVMAN_HAPTIC_PLUGIN_INTF_H__
25
26 #include "devman_haptic_ext.h"
27
28 typedef struct {
29         void (*haptic_internal_prepare_node) (void);
30         int (*haptic_internal_play_buffer) (int, const unsigned char *, int, int, int);
31         int (*haptic_internal_play_file) (int, const char *, int, int, int);
32         int (*haptic_internal_play_monotone) (int, int, int, int);
33         int (*haptic_internal_get_buffer_duration) (int, const unsigned char *, int *);
34         int (*haptic_internal_get_file_duration) (int, const char *, int *);
35         int (*haptic_internal_initialize) (void);
36         int (*haptic_internal_terminate) (void);
37         int (*haptic_internal_open_composite_device) (int *, int, int *);
38         int (*haptic_internal_open_device) (int, int*);
39         int (*haptic_internal_set_device_property_string) (int, int, const char *);
40         int (*haptic_internal_set_device_property_int32) (int, int, int);
41         int (*haptic_internal_set_device_property_bool) (int, int, unsigned char);
42         int (*haptic_internal_get_device_property_string) (int, int, int, char *);
43         int (*haptic_internal_get_device_property_int32) (int, int, int *);
44         int (*haptic_internal_get_device_property_bool) (int, int, unsigned char *);
45         int (*haptic_internal_play_IVT_effect) (int, const unsigned char *, int, int *);
46         int (*haptic_internal_play_IVT_effect_repeat) (int, const unsigned char *, int, unsigned char, int *);
47         int (*haptic_internal_close_device) (int);
48         int (*haptic_internal_stop_all_playing_effects) (int);
49         int (*haptic_internal_get_device_count) (void);
50         int (*haptic_internal_get_device_state) (int, int *);
51         int (*haptic_internal_get_device_capability_bool) (int, int, unsigned char *);
52         int (*haptic_internal_get_device_capability_int32) (int, int, int *);
53         int (*haptic_internal_get_device_capability_string) (int, int, int, char *);
54         int (*haptic_internal_get_IVT_effect_count) (const unsigned char *);
55         int (*haptic_internal_get_IVT_effect_name) (const unsigned char *, int, int, char *);
56         int (*haptic_internal_get_IVT_effect_name_u) (const unsigned char *, int, int, unsigned short *);
57         int (*haptic_internal_get_IVT_effect_index_from_name) (const unsigned char *, const char *, int *);
58         int (*haptic_internal_get_IVT_effect_index_from_name_u) (const unsigned char *, const unsigned short *, int *);
59         int (*haptic_internal_stop_playing_effect) (int, int);
60         int (*haptic_internal_get_IVT_effect_type) (const unsigned char *, int, int *);
61         int (*haptic_internal_get_IVT_magsweep_effect_definition) (const unsigned char *, int, int *, int *, int *, int *, int *, int *, int *);
62         int (*haptic_internal_get_IVT_periodic_effect_definition) (const unsigned char *, int, int *, int *, int *, int *, int *, int *, int *, int *);
63         int (*haptic_internal_get_IVT_effect_duration) (const unsigned char *, int, int *);
64         int (*haptic_internal_play_magsweep_effect) (int, int, int, int, int, int, int, int, int *);
65         int (*haptic_internal_play_periodic_effect) (int, int, int, int, int, int, int, int, int, int *);
66         int (*haptic_internal_play_wave_from_effect) (int, const unsigned char *, int, int, int, int, int *);
67         int (*haptic_internal_modify_playing_magsweep_effect) (int, int, int, int, int, int, int, int, int);
68         int (*haptic_internal_modify_playing_periodic_effect) (int, int, int, int, int, int, int, int, int, int);
69         int (*haptic_internal_create_streaming_effect) (int, int *);
70         int (*haptic_internal_destroy_streaming_effect) (int, int);
71         int (*haptic_internal_play_streaming_sample) (int, int, const unsigned char *, int);
72         int (*haptic_internal_play_streaming_sample_with_offset) (int, int, const unsigned char *, int, int);
73         int (*haptic_internal_save_IVT_file) (const unsigned char *, int, const char *);
74         int (*haptic_internal_delete_IVT_file) (const char *);
75         int (*haptic_internal_pause_playing_effect) (int, int);
76         int (*haptic_internal_resume_paused_effect) (int, int);
77         int (*haptic_internal_get_effect_state) (int, int, int *);
78         int (*haptic_internal_get_IVT_size) (const unsigned char *, int);
79         int (*haptic_internal_initialize_IVT_buffer) (unsigned char *, int);
80         int (*haptic_internal_insert_IVT_element) (unsigned char *, int, int, const HapticElement *);
81         int (*haptic_internal_insert_IVT_element2) (unsigned char *, int, int, const HapticElement2 *);
82         int (*haptic_internal_insert_IVT_element3) (unsigned char *, int, int, const HapticElement3 *);
83         int (*haptic_internal_read_IVT_element) (const unsigned char *, int, int, int, HapticElement *);
84         int (*haptic_internal_read_IVT_element2) (const unsigned char *, int, int, int, HapticElement2 *);
85         int (*haptic_internal_read_IVT_element3) (const unsigned char *, int, int, int, HapticElement3 *);
86         int (*haptic_internal_remove_IVT_element) (unsigned char *, int, int, int);
87 } devman_haptic_plugin_interface;
88
89 const devman_haptic_plugin_interface *get_devman_haptic_plugin_interface();
90
91 #endif  /* __DEVMAN_HAPTIC_PLUGIN_INTF_H__ */