3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef __UM_USB_HOST_MANAGER_H__
19 #define __UM_USB_HOST_MANAGER_H__
22 #include <sys/mount.h>
25 #include "um_customize.h"
26 #include "um_usb_notification.h"
28 #define MTAB_FILE "/etc/mtab"
29 #define MOUNT_POINT "/opt/storage/usb"
31 int um_get_device_info(UmMainData *ad);
32 void destroy_device(gpointer data);
33 void usb_host_added_cb(UmMainData *ad);
34 void usb_host_removed_cb(UmMainData *ad);
35 int find_host_fd(UmMainData *ad, char *appId);
36 int grant_host_permission(UmMainData *ad, char *appId, int vendor, int product);
37 int launch_host_app(char *appId);
38 Eina_Bool has_host_permission(UmMainData *ad, char *appId, int vendor, int product);
39 void disconnect_usb_host(UmMainData *ad);
40 void show_all_usb_devices(GList *devList);
41 Eina_Bool is_host_connected(UmMainData *ad, int vendor, int product);
42 bool is_mass_storage_mounted(UmMainData *ad, char *devname);
44 void um_uevent_usb_host_added(UmMainData *ad);
45 void um_uevent_usb_host_removed(UmMainData *ad);
46 void um_uevent_mass_storage_added(UmMainData *ad, char *devname, char *fstype);
47 void um_uevent_mass_storage_removed(UmMainData *ad, char *devname);
49 #endif /* __UM_USB_HOST_MANAGER_H__ */