text viewer: reworks screen access logics and some bugs fix.
[kugel-rb.git] / utils / MTP / beastpatcher / mtp_common.h
blob2ca87c7509b452aa4a66e89670bab344d0213d86
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * $Id$
11 * Copyright (c) 2009, Dave Chapman
12 * All rights reserved.
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions are
16 * met:
18 * * Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
21 * * Redistributions in binary form must reproduce the above
22 * copyright notice, this list of conditions and the following
23 * disclaimer in the documentation and/or other materials provided
24 * with the distribution.
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 ****************************************************************************/
40 #ifndef _MTP_COMMON_H
41 #define _MTP_COMMON_H
43 #if defined(__WIN32__) || defined(_WIN32)
44 #else
45 #include "libmtp.h"
46 #endif
48 struct mtp_info_t
50 /* Generic data */
51 char manufacturer[200];
52 char modelname[200];
53 char version[200];
55 /* OS-Specific data */
56 #if defined(__WIN32__) || defined(_WIN32)
57 #else
58 LIBMTP_mtpdevice_t *device;
59 #endif
62 /* Common functions for both libMTP and win32 */
64 int mtp_init(struct mtp_info_t* mtp_info);
65 int mtp_finished(struct mtp_info_t* mtp_info);
66 int mtp_scan(struct mtp_info_t* mtp_info);
67 int mtp_send_firmware(struct mtp_info_t* mtp_info, unsigned char* fwbuf,
68 int fwsize);
69 int mtp_send_file(struct mtp_info_t* mtp_info, const char* filename);
71 #endif /* !_MTP_COMMON_H */