summaryrefslogtreecommitdiff
path: root/camlibs/sierra/library.h
blob: 40567fbc6c06d4acca41cf11528812eb3198ff41 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* library.h
 *
 * Copyright (C) 2001 Lutz Müller <urc8@rz.uni-karlsruhe.de>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser 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
 * Lesser General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __LIBRARY_H__
#define __LIBRARY_H__

#include <gphoto2-camera.h>

typedef enum {
	SIERRA_LOCKED_NO  = 0x00,
	SIERRA_LOCKED_YES = 0x01
} SierraLocked;

typedef struct _SierraPicInfo SierraPicInfo;
struct _SierraPicInfo {
	unsigned int size_file;
	unsigned int size_preview;
	unsigned int size_audio;
	unsigned int resolution;
	SierraLocked locked;
	unsigned int date;
	unsigned int animation_type;
};
int sierra_get_pic_info (Camera *camera, unsigned int n,
			 SierraPicInfo *pic_info);
int sierra_set_locked (Camera *camera, unsigned int n, SierraLocked locked);

/* Communications functions */
int sierra_set_speed		  (Camera *camera, int speed);
int sierra_end_session		  (Camera *camera);
int sierra_ping			  (Camera *camera);
int sierra_get_memory_left        (Camera *camera, int *memory);
int sierra_check_battery_capacity (Camera *camera);
int sierra_set_int_register 	  (Camera *camera, int reg, int value);
int sierra_get_int_register 	  (Camera *camera, int reg, int *value);
int sierra_set_string_register	  (Camera *camera, int reg, const char *s, long int length);
int sierra_get_string_register	  (Camera *camera, int reg, int file_number,
				   CameraFile *file,
				   unsigned char *b, unsigned int *b_len);
int sierra_delete		  (Camera *camera, int picture_number);
int sierra_delete_all             (Camera *camera);
int sierra_capture		  (Camera *camera, CameraCaptureType type, 
				   CameraFilePath *filepath);
int sierra_capture_preview 	  (Camera *camera, CameraFile *file);
int sierra_change_folder          (Camera *camera, const char *folder);

/* Filesystem functions */
int sierra_list_files         (Camera *camera, const char *folder, CameraList *list);
int sierra_list_folders       (Camera *camera, const char *folder, CameraList *list);
int sierra_get_picture_folder (Camera *camera, char **folder);
int sierra_upload_file        (Camera *camera, CameraFile *file);

#endif /* __LIBRARY_H__ */