Remove generated files
[framework/connectivity/libgphoto2.git] / camlibs / gsmart300 / gsmart300.h
1 /****************************************************************/
2 /* gsmart300.h - Gphoto2 library for the Mustek gSmart 300      */
3 /*                                                              */
4 /* Copyright (C) 2002 Jérôme Lodewyck                           */
5 /*                                                              */
6 /* Author: Jérôme Lodewyck <jerome.lodewyck@ens.fr>             */
7 /*                                                              */
8 /* based on code by: Till Adam <till@adam-lilienthal.de>        */
9 /*                                                              */
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     */
14 /* later version.                                               */
15 /*                                                              */
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     */
20 /* more details.                                                */
21 /*                                                              */
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 /****************************************************************/
27
28 #ifndef __GSMART300_H__
29 #define __GSMART300_H__
30 #include <_stdint.h>
31 #include <gphoto2/gphoto2-camera.h>
32
33 #define FLASH_PAGE_SIZE_300 0x200
34 #define GSMART_FILE_TYPE_IMAGE 0x00
35
36 #define CHECK(result) {int res; res = result; if (res < 0) return (res);}
37
38 struct GsmartFile
39 {
40         char *name;
41         int width;
42         int height;
43         int index;
44         uint8_t *fat;
45         int mime_type;
46 };
47
48 struct _CameraPrivateLibrary
49 {
50         GPPort *gpdev;
51         int dirty;
52         int num_files;
53         uint8_t *fats;
54         struct GsmartFile *files;
55 };
56
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,
64                          unsigned int number);
65 int gsmart300_request_thumbnail (CameraPrivateLibrary * lib, CameraFile *file,
66                               unsigned int number, int *type);
67
68 #endif /* __GSMART300_H__ */