summaryrefslogtreecommitdiff
path: root/camlibs/konica/lowlevel.h
blob: 349b93e4ef53d2f72aad7016dcf806543edf6165 (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
/* lowlevel.h
 *
 * Copyright © 2001 Lutz Müller <lutz@users.sourceforge.net>
 *
 * 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 __KONICA_LOWLEVEL_H__
#define __KONICA_LOWLEVEL_H__

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

int l_ping (GPPort *, GPContext *);
int l_init (GPPort *, GPContext *);

/*
 * Some comments on the structure of send_buffer, image_buffer,
 * and receive_buffer:
 * 
 * send_buffer:	The first two bytes are low order and high
 * 		byte of the command, followed by at least two
 *		more bytes. The number of sent bytes has to be
 *		even.
 *
 * image_buffer: 	This buffer will contain raw data like
 *			jpeg or exif data.
 *
 * receive_buffer:	The first two bytes will be the same as
 *			in send_buffer. This will be checked
 *			here. Then will follow low and high
 *			order byte of the return status. After
 *			that, depending on command and return
 *			status, other bytes will follow.
 */
int l_send_receive (GPPort *, GPContext *,
	unsigned char *send_buffer, unsigned int send_buffer_size,
	unsigned char **receive_buffer, unsigned int *receive_buffer_size,
	unsigned int timeout,
	unsigned char **image_buffer, unsigned int *image_buffer_size);

#endif /* __KONICA_LOWLEVEL_H__ */