1 /* pccam600.h
2  *
3  *  This library is free software; you can redistribute and/or
4  *  modify it inder the terms of the GNU Lesser Genreral Public
5  *  License as publiced by the Free Software Foundation; either
6  *  version 2 of the License, or (at your option) any later version.
7  *
8  *  This library is distributed in the hope that it will be useful,
9  *  but WITHOUT ANY WARRANTY; without even the implied warrenty of
10  *  MERCHANTABULITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  *  lesser General Public License for more details.
12  *
13  *  Author: Peter Kajberg <pbk@odense.kollegienet.dk>
14  */
15 
16 #ifndef __PCCAM600_H__
17 #define __PCCAM600_H__
18 
19 #include <gphoto2/gphoto2.h>
20 #include <gphoto2/gphoto2-port.h>
21 
22 typedef struct {
23   unsigned char state; /*delete or ok*/
24   unsigned char unk1;
25   unsigned char quality;
26   unsigned char name[9];
27   unsigned char unk2[4];
28 
29   unsigned char unk3[10];
30   unsigned char unk4[2];
31   unsigned char unk5;
32   unsigned char size[2];
33   unsigned char unk6;
34 } FileEntry;
35 
36 #define CHECK(result) {int res; res = result; if (res < 0) return (res);}
37 
38 int pccam600_init(GPPort *port, GPContext *context);
39 int pccam600_close(GPPort *port, GPContext *context);
40 int pccam600_get_file_list(GPPort *port, GPContext *context);
41 int pccam600_delete_file(GPPort *port, GPContext *context, int index);
42 int pccam600_read_data(GPPort *port, unsigned char *buffer);
43 int pccam600_get_file(GPPort *port, GPContext *context, int index);
44 int pccam600_get_mem_info(GPPort *port, GPContext *context, int *totalmem,
45 			  int *freemem);
46 #endif /* __PCCAM600_H__ */
47 
48