summaryrefslogtreecommitdiff
path: root/libgphoto2_port/gphoto2
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-03-29 09:25:54 +0000
committerHans de Goede <hdegoede@redhat.com>2010-03-29 09:25:54 +0000
commit004777f2877233fa3e2374664cf2726d237bd214 (patch)
tree8c0ae93cb68458741c02d18c948caf4e51ec6bdd /libgphoto2_port/gphoto2
parentafe1e7bfffea54655a55e25215245989c24bf445 (diff)
downloadlibgphoto2-004777f2877233fa3e2374664cf2726d237bd214.tar.gz
Add ax203 camlib for ax203 based picture frames
This makes it possible to download pictures from / upload pictures to ax203 based picture frames It consists of 2 parts: 1) an ax203 camlib, ax203 access, image table parsing, and decompress / compress code. 2) usbscsi port driver, this is a *Linux only* (for now) port driver for accessing devices which require sending custom scsi commands to an usb mass storage device (using the /dev/sg# device under Linux). git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12854 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/gphoto2')
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-info-list.h3
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-library.h7
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port.h13
3 files changed, 22 insertions, 1 deletions
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
index 74db99154..2fda1b5e5 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
@@ -37,7 +37,8 @@ typedef enum {
GP_PORT_USB = 1 << 2, /**< \brief USB port. */
GP_PORT_DISK = 1 << 3, /**< \brief Disk / local mountpoint port. */
GP_PORT_PTPIP = 1 << 4, /**< \brief PTP/IP port. */
- GP_PORT_USB_DISK_DIRECT = 1 << 5 /**< \brief Direct IO to an usb mass storage device. */
+ GP_PORT_USB_DISK_DIRECT = 1 << 5, /**< \brief Direct IO to an usb mass storage device. */
+ GP_PORT_USB_SCSI = 1 << 6, /**< \brief USB Mass Storage raw SCSI port. */
} GPPortType;
/**
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-library.h b/libgphoto2_port/gphoto2/gphoto2-port-library.h
index 837f2bffc..ef510b705 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-library.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-library.h
@@ -74,6 +74,13 @@ typedef struct _GPPortOperations {
/* For USB disk direct IO devices */
int (*seek) (GPPort * dev, int offset, int whence);
+
+ /* For USB Mass Storage raw SCSI ports */
+ int (*send_scsi_cmd) (GPPort *port, int to_dev,
+ char *cmd, int cmd_size,
+ char *sense, int sense_size,
+ char *data, int data_size);
+
} GPPortOperations;
typedef GPPortType (* GPPortLibraryType) (void);
diff --git a/libgphoto2_port/gphoto2/gphoto2-port.h b/libgphoto2_port/gphoto2/gphoto2-port.h
index 7ca367b43..7214a2a6c 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port.h
@@ -99,6 +99,13 @@ typedef struct _GPPortSettingsUsbDiskDirect {
} GPPortSettingsUsbDiskDirect;
/**
+ * \brief Port settings for USB Mass Storage raw SCSI ports.
+ */
+typedef struct _GPPortSettingsUsbScsi {
+ char path[128]; /**< /brief The ports device node path (/dev/sg#)*/
+} GPPortSettingsUsbScsi;
+
+/**
* \brief Union of port settings.
*
* This contains a shared union of possible settings for ports needing
@@ -108,6 +115,7 @@ typedef union _GPPortSettings {
GPPortSettingsSerial serial; /**< \brief Serial specific settings */
GPPortSettingsUSB usb; /**< \brief USB specific settings */
GPPortSettingsUsbDiskDirect usbdiskdirect; /**< \brief usb disk direct port specific settings */
+ GPPortSettingsUsbScsi usbscsi; /**< \brief usb scsi port specific settings */
} GPPortSettings;
enum {
@@ -214,6 +222,11 @@ int gp_port_usb_msg_class_read (GPPort *port, int request,
int gp_port_seek (GPPort *port, int offset, int whence);
+int gp_port_send_scsi_cmd (GPPort *port, int to_dev,
+ char *cmd, int cmd_size,
+ char *sense, int sense_size,
+ char *data, int data_size);
+
/* Error reporting */
int gp_port_set_error (GPPort *port, const char *format, ...)
#ifdef __GNUC__