summaryrefslogtreecommitdiff
path: root/camlibs/pccam300/pccam300.h
blob: 7f73c9f776d3c08cd726d4e28d576de69ab94581 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/****************************************************************/
/* pccam300.h - Gphoto2 library for the Creative PC-CAM 300     */
/*                                                              */
/*                                                              */
/* Authors: Till Adam <till@adam-lilienthal.de>                 */
/*          Miah Gregory <mace@darksilence.net>                 */
/*                                                              */
/* This library is free software; you can redistribute it       */
/* and/or modify it under the terms of the GNU Library General  */
/* Public License as published by the Free Software Foundation; */
/* either version 2 of the License, or (at your option) any     */
/* later version.                                               */
/*                                                              */
/* This library is distributed in the hope that it will be      */
/* useful, but WITHOUT ANY WARRANTY; without even the implied   */
/* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      */
/* PURPOSE.  See the GNU Library General Public License for     */
/* more details.                                                */
/*                                                              */
/* You should have received a copy of the GNU Library General   */
/* Public License along with this library; if not, write to the */
/* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,*/
/* Boston, MA  02110-1301  USA					*/
/****************************************************************/


#ifndef __PCCAM300_H__
#define __PCCAM300_H__

#include <gphoto2/gphoto2.h>
#include <gphoto2/gphoto2-port.h>

#define CHECK(result) {int res; res = result; if (res < 0) return (res);}

int pccam300_init (GPPort *port, GPContext *context);
int pccam300_close (GPPort *port, GPContext *context);
int pccam300_get_file_list (GPPort *port, GPContext *context);
int pccam300_delete_file (GPPort *port, GPContext *context, int index);
int pccam300_delete_all (GPPort *port, GPContext *context);
int pccam300_get_file (GPPort *port, GPContext *context, int index,
		       unsigned char **data, unsigned int *size,
		       unsigned int *type);
int pccam300_get_mem_info (GPPort *port, GPContext *context, int *totalmem,
			   int *freemem);
int pccam300_get_filecount (GPPort *port, int *filecount);
int pccam300_get_filesize (GPPort *port, unsigned int index,
			   unsigned int *filesize);

enum {
	PCCAM300_MIME_JPEG,
	PCCAM300_MIME_WAV,
	PCCAM300_MIME_AVI
};


#endif /* __PCCAM300_H__ */