Debian Codegraph @

camlibs/kodak/dc240/library.h

raw
1 /* library.h
2 *
3 * Copyright (C) 2001,2002 Hubert Figuiere <[email protected]>
4 * Copyright (C) 2000,2001,2002 Scott Fritzinger
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
20 */
21
22 /*
23 Kodak DC 240/280/3400/5000 driver.
24 */
25
26 #ifndef CAMLIBS_KODAK_DC240_LIBRARY_H
27 #define CAMLIBS_KODAK_DC240_LIBRARY_H
28
29 #define DC240_ACTION_PREVIEW (uint8_t)0x93
30 #define DC240_ACTION_IMAGE (uint8_t)0x9A
31 #define DC240_ACTION_DELETE (uint8_t)0x9D
32
33 #include "libgphoto2/gphoto2-endian.h"
34
35
36 const char *dc240_convert_type_to_camera (uint16_t type);
37 const char *dc240_get_battery_status_str (uint8_t status);
38 const char *dc240_get_ac_status_str (uint8_t status);
39 const char *dc240_get_memcard_status_str(uint8_t status);
40
41 /* Define the status table for DC240 and DC280. */
42 typedef struct {
43 uint8_t cameraType; /* 1 */
44 uint8_t fwVersInt; /* 2 */
45 uint8_t fwVersDec; /* 3 */
46 uint8_t romVers32Int; /* 4 */
47 uint8_t romVers32Dec; /* 5 */
48 uint8_t romVers8Int; /* 6 */
49 uint8_t romVers8Dec; /* 7 */
50 uint8_t battStatus; /* 8 */
51 uint8_t acAdapter; /* 9 */
52 uint8_t strobeStatus; /* 10 */
53 uint8_t memCardStatus; /* 11 */
54 uint8_t videoFormat; /* 12 */
55 uint8_t quickViewMode; /* 13 DC280 */
56 uint16_t numPict; /* 14-15 BigEndian */
57 char volumeID[11]; /* 16-26 */
58 uint8_t powerSave; /* 27 DC280 */
59 char cameraID[32]; /* 28-59 */
60 uint16_t remPictLow; /* 60-61 BE */
61 uint16_t remPictMed; /* 62-63 BE */
62 uint16_t remPictHigh; /* 64-65 BE */
63 uint16_t totalPictTaken; /* 66-67 BE */
64 uint16_t totalStrobeFired; /* 68-69 BE */
65 uint8_t langType; /* 70 DC280 */
66 uint8_t beep; /* 71 */
67
68 uint8_t fileType; /* 78 */
69 uint8_t pictSize; /* 79 */
70 uint8_t imgQuality; /* 80 */
71 uint8_t ipChainDisable; /* 81 */ /* ????? what does that mean reserved on DC280 */
72 uint8_t imageIncomplete; /* 82 */
73 uint8_t timerMode; /* 83 */
74
75 uint16_t year; /* 88-89 BE */
76 uint8_t month; /* 90 */
77 uint8_t day; /* 91 */
78 uint8_t hour; /* 92 */
79 uint8_t minute; /* 93 */
80 uint8_t second; /* 94 */
81 uint8_t tenmSec; /* 95 */
82
83 uint8_t strobeMode; /* 97 */
84 uint16_t exposureComp; /* 98-99 BE see note */
85 uint8_t aeMode; /* 100 */
86 uint8_t focusMode; /* 101 */
87 uint8_t afMode; /* 102 */
88 uint8_t awbMode; /* 103 */
89 uint32_t zoomMag; /* 104-107 BE see doc */
90
91 uint8_t exposureMode; /* 129 */
92
93 uint8_t sharpControl; /* 131 */
94 uint32_t expTime; /* 132-135 BE */
95 uint16_t fValue; /* 136-137 BE */
96 uint8_t imageEffect; /* 138 */
97 uint8_t dateTimeStamp; /* 139 */
98 char borderFileName [11]; /* 140-151 */
99 uint8_t exposureLock; /* 152 */
100 uint8_t isoMode; /* 153 DC280 */
101 } DC240StatusTable;
102
103
104 int dc240_open (Camera *camera);
105 int dc240_close (Camera *camera, GPContext *context);
106
107 int dc240_set_speed (Camera *camera, int speed);
108
109 int dc240_get_status (Camera *camera, DC240StatusTable *table,
110 GPContext *context);
111
112 int dc240_get_directory_list (Camera *camera, CameraList *list, const char *folder,
113 unsigned char attrib, GPContext *context);
114
115
116 int dc240_file_action (Camera *camera, int action, CameraFile *file,
117 const char *folder, const char *filename,
118 GPContext *context);
119
120 int dc240_capture (Camera *camera, CameraFilePath *path,
121 GPContext *context);
122 int dc240_packet_set_size (Camera *camera, short int size);
123
124 #endif /* !defined(CAMLIBS_KODAK_DC240_LIBRARY_H) */