1 /* Sony DSC-F55 & MSAC-SR1 - gPhoto2 camera library
2  * Copyright 2001, 2002, 2004 Raymond Penners <raymond@dotsphinx.com>
3  * Copyright 2000 Mark Davies <mdavies@dial.pipex.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA  02110-1301  USA
19  */
20 #ifndef SONY_H
21 #define SONY_H
22 
23 #define SONY_CAMERA_ID "sonydscf55"
24 
25 typedef enum {
26 	SONY_MODEL_MSAC_SR1 = 0,
27 	SONY_MODEL_DCR_PC100,
28 	SONY_MODEL_TRV_20E,
29 	SONY_MODEL_DSC_F55,
30 	SONY_MODEL_SIZEOF
31 } SonyModel;
32 
33 #define SONY_FILE_NAME_FMT "dsc%05d.jpg"
34 
35 typedef struct _tagPacket {
36 	int valid;
37 	int length;
38 	unsigned char buffer[16384];
39 	unsigned char checksum;
40 } Packet;
41 
42 struct _CameraPrivateLibrary {
43 	unsigned short int sequence_id;
44 	long current_baud_rate;
45 	int current_mpeg_mode;
46 	SonyModel model;
47 };
48 
49 
50 typedef enum
51 {
52 	SONY_FILE_EXIF=0,
53 	SONY_FILE_THUMBNAIL,
54 	SONY_FILE_IMAGE,
55 	SONY_FILE_MPEG
56 } SonyFileType;
57 
58 int sony_init(Camera * camera, SonyModel model);
59 int sony_exit(Camera * camera);
60 int sony_file_count(Camera * camera, SonyFileType file_type, int * count);
61 int sony_image_get(Camera * camera, int imageid, CameraFile * file, GPContext *context);
62 int sony_thumbnail_get(Camera * camera, int imageid, CameraFile * file, GPContext *context);
63 int sony_exif_get(Camera * camera, int imageid, CameraFile * file, GPContext *context);
64 int sony_mpeg_get(Camera * camera, int imageid, CameraFile * file, GPContext *context);
65 int sony_image_info(Camera * camera, int imageid, SonyFileType file_type, CameraFileInfo * info, GPContext *context);
66 int sony_file_name_get(Camera *camera, int imageid, SonyFileType file_type, char buf[13]);
67 int sony_is_mpeg_file_name(const char * file_name);
68 
69 #endif /* SONY_H */
70 
71 /*
72  * Local Variables:
73  * c-file-style:"linux"
74  * indent-tabs-mode:t
75  * End:
76  */
77