From: Mike Lockwood Date: Thu, 15 Jul 2010 16:33:44 +0000 (-0400) Subject: Add header for MTP kernel driver. X-Git-Tag: android-x86-4.4-r1~1251 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=42f160ddfa54d438849e12ff84094222799ed258;p=android-x86%2Fbionic.git Add header for MTP kernel driver. Change-Id: I072e476c28535198689afbe2320a291fa42fe05b Signed-off-by: Mike Lockwood --- diff --git a/libc/kernel/common/linux/usb/f_mtp.h b/libc/kernel/common/linux/usb/f_mtp.h new file mode 100644 index 000000000..e155e7e0a --- /dev/null +++ b/libc/kernel/common/linux/usb/f_mtp.h @@ -0,0 +1,42 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + **************************************************************************** + ****************************************************************************/ +#ifndef __LINUX_USB_F_MTP_H +#define __LINUX_USB_F_MTP_H + +#define MTP_INTERFACE_MODE_MTP 0 +#define MTP_INTERFACE_MODE_PTP 1 + +struct mtp_file_range { + + int fd; + + loff_t offset; + + size_t length; +}; + +struct mtp_event { + + size_t length; + + void *data; +}; + +#define MTP_SEND_FILE _IOW('M', 0, struct mtp_file_range) + +#define MTP_RECEIVE_FILE _IOW('M', 1, struct mtp_file_range) + +#define MTP_SET_INTERFACE_MODE _IOW('M', 2, int) + +#define MTP_SEND_EVENT _IOW('M', 3, struct mtp_event) + +#endif