1 /****************************************************************/
2 /* gsmart300.h - Gphoto2 library for the Mustek gSmart 300 */
4 /* Copyright (C) 2002 Jérôme Lodewyck */
6 /* Author: Jérôme Lodewyck <jerome.lodewyck@ens.fr> */
8 /* based on code by: Till Adam <till@adam-lilienthal.de> */
10 /* This library is free software; you can redistribute it */
11 /* and/or modify it under the terms of the GNU Library General */
12 /* Public License as published by the Free Software Foundation; */
13 /* either version 2 of the License, or (at your option) any */
16 /* This library is distributed in the hope that it will be */
17 /* useful, but WITHOUT ANY WARRANTY; without even the implied */
18 /* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR */
19 /* PURPOSE. See the GNU Library General Public License for */
22 /* You should have received a copy of the GNU Library General */
23 /* Public License along with this library; if not, write to the */
24 /* Free Software Foundation, Inc., 59 Temple Place - Suite 330, */
25 /* Boston, MA 02111-1307, USA. */
26 /****************************************************************/
28 #ifndef __GSMART300_H__
29 #define __GSMART300_H__
31 #include <gphoto2/gphoto2-camera.h>
33 #define FLASH_PAGE_SIZE_300 0x200
34 #define GSMART_FILE_TYPE_IMAGE 0x00
36 #define CHECK(result) {int res; res = result; if (res < 0) return (res);}
48 struct _CameraPrivateLibrary
54 struct GsmartFile *files;
57 int gsmart300_reset (CameraPrivateLibrary * lib);
58 int gsmart300_get_info (CameraPrivateLibrary * lib);
59 int gsmart300_delete_file (CameraPrivateLibrary * lib, unsigned int index);
60 int gsmart300_delete_all (CameraPrivateLibrary * lib);
61 int gsmart300_get_file_info (CameraPrivateLibrary * lib, unsigned int index,
62 struct GsmartFile **file);
63 int gsmart300_request_file (CameraPrivateLibrary * lib, CameraFile *file,
65 int gsmart300_request_thumbnail (CameraPrivateLibrary * lib, CameraFile *file,
66 unsigned int number, int *type);
68 #endif /* __GSMART300_H__ */