Source code upload
[framework/connectivity/libgphoto2.git] / camlibs / spca50x / spca50x-flash.h
1 /* spca50x_flash.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: Till Adam <till@adam-lilienthal.de>
14  *  based on work by: Mark A. Zimmerman <mark@foresthaven.com>
15  */
16
17 #ifndef __SPCA50X_FLASH_H__
18 #define __SPCA50X_FLASH_H_
19
20 #include <gphoto2/gphoto2.h>
21 #include <gphoto2/gphoto2-port.h>
22
23 #define CHECK(result) {int res; res = result; if (res < 0) return (res);}
24
25 int spca50x_flash_init(CameraPrivateLibrary *pl, GPContext *context);
26 int spca50x_flash_close(CameraPrivateLibrary *pl, GPContext *context);
27
28 int spca50x_flash_get_TOC(CameraPrivateLibrary *pl, int *filecount);
29 int spca50x_flash_get_file_name(CameraPrivateLibrary *pl, int index, char *name);
30 int spca50x_flash_get_file_dimensions(CameraPrivateLibrary *pl, int index,
31                 int *w, int *h);
32 int spca50x_flash_get_file (CameraPrivateLibrary *pl, GPContext *context,
33                 uint8_t **buf, unsigned int *len, int index, int thumbnail);
34 int spca50x_flash_get_file_size(CameraPrivateLibrary *pl, int index, int *size);
35 int spca50x_flash_get_filecount(CameraPrivateLibrary *pl, int *filecount);
36 int spca50x_flash_delete_all (CameraPrivateLibrary *pl, GPContext *context);
37
38 /* for testing */
39 int spca500_flash_delete_file (CameraPrivateLibrary *pl, int index);
40 int spca500_flash_capture (CameraPrivateLibrary *pl);
41
42 #endif