Mike Lockwood | 16864ba | 2010-05-11 17:16:59 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Gadget Function Driver for MTP |
| 3 | * |
| 4 | * Copyright (C) 2010 Google, Inc. |
| 5 | * Author: Mike Lockwood <lockwood@android.com> |
| 6 | * |
| 7 | * This software is licensed under the terms of the GNU General Public |
| 8 | * License version 2, as published by the Free Software Foundation, and |
| 9 | * may be copied, distributed, and modified under those terms. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #ifndef __LINUX_USB_F_MTP_H |
| 19 | #define __LINUX_USB_F_MTP_H |
| 20 | |
| 21 | struct mtp_file_range { |
| 22 | /* path for file to transfer */ |
| 23 | const char *path; |
| 24 | /* strlen(path) */ |
| 25 | int path_length; |
| 26 | /* offset in file for start of transfer */ |
| 27 | loff_t offset; |
| 28 | /* number of bytes to transfer */ |
| 29 | size_t length; |
| 30 | }; |
| 31 | |
| 32 | /* Sends the specified file range to the host */ |
| 33 | #define MTP_SEND_FILE _IOW('M', 0, struct mtp_file_range) |
| 34 | /* Receives data from the host and writes it to a file. |
| 35 | * The file is created if it does not exist. |
| 36 | */ |
| 37 | #define MTP_RECEIVE_FILE _IOW('M', 1, struct mtp_file_range) |
| 38 | |
| 39 | #endif /* __LINUX_USB_F_MTP_H */ |