Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

Classes | Defines | Typedefs | Enumerations | Functions

gphoto2-port.h File Reference

#include <gphoto2/gphoto2-port-info-list.h>
#include <gphoto2/gphoto2-port-portability.h>
Include dependency graph for gphoto2-port.h:

Go to the source code of this file.

Classes

struct  _GPPort
 The GPhoto port structure. More...
union  _GPPortSettings
 Union of port settings. More...
struct  _GPPortSettingsDisk
 Port settings for the local disk (directories) port. More...
struct  _GPPortSettingsSerial
 Port settings for serial ports. More...
struct  _GPPortSettingsUSB
 Port settings for USB ports. More...
struct  _GPPortSettingsUsbDiskDirect
 Port settings for USB mass storage direct IO ports. More...
struct  _GPPortSettingsUsbScsi
 Port settings for USB Mass Storage raw SCSI ports. More...

Defines

#define FALSE   (1==0)
#define GP_PORT_MAX_BUF_LEN   4096
 Maximum length of receive buffer.
#define PIN_CTS   GP_PIN_CTS
#define TRUE   (0==0)

Typedefs

typedef GPPort gp_port
typedef GPPortSettings gp_port_settings
typedef enum _GPLevel GPLevel
 Level to pull specific lines.
typedef enum _GPPin GPPin
 Serial pins.
typedef struct _GPPort GPPort
 The GPhoto port structure.
typedef struct _GPPortPrivateCore GPPortPrivateCore
typedef struct
_GPPortPrivateLibrary 
GPPortPrivateLibrary
typedef enum _GPPortSerialParity GPPortSerialParity
 Serial parity.
typedef union _GPPortSettings GPPortSettings
 Union of port settings.
typedef struct _GPPortSettingsDisk GPPortSettingsDisk
 Port settings for the local disk (directories) port.
typedef struct
_GPPortSettingsSerial 
GPPortSettingsSerial
 Port settings for serial ports.
typedef struct _GPPortSettingsUSB GPPortSettingsUSB
 Port settings for USB ports.
typedef struct
_GPPortSettingsUsbDiskDirect 
GPPortSettingsUsbDiskDirect
 Port settings for USB mass storage direct IO ports.
typedef struct
_GPPortSettingsUsbScsi 
GPPortSettingsUsbScsi
 Port settings for USB Mass Storage raw SCSI ports.

Enumerations

enum  { GP_PORT_USB_ENDPOINT_IN, GP_PORT_USB_ENDPOINT_OUT, GP_PORT_USB_ENDPOINT_INT }
enum  _GPLevel { GP_LEVEL_LOW = 0, GP_LEVEL_HIGH = 1 }
 

Level to pull specific lines.

More...
enum  _GPPin {
  GP_PIN_RTS, GP_PIN_DTR, GP_PIN_CTS, GP_PIN_DSR,
  GP_PIN_CD, GP_PIN_RING
}
 

Serial pins.

More...
enum  _GPPortSerialParity { GP_PORT_SERIAL_PARITY_OFF = 0, GP_PORT_SERIAL_PARITY_EVEN, GP_PORT_SERIAL_PARITY_ODD }
 

Serial parity.

More...

Functions

int gp_port_check_int (GPPort *port, char *data, int size)
 Check for intterupt.
int gp_port_check_int_fast (GPPort *port, char *data, int size)
 Check for interrupt without wait.
int gp_port_close (GPPort *port)
 Close a port.
int gp_port_flush (GPPort *port, int direction)
 Flush data on serial port.
int gp_port_free (GPPort *port)
 Free the port structure.
const char * gp_port_get_error (GPPort *port)
 Get verbose port error message.
int gp_port_get_info (GPPort *port, GPPortInfo *info)
 Retreives information about the port.
int gp_port_get_pin (GPPort *port, GPPin pin, GPLevel *level)
 Get setting of specific serial PIN.
int gp_port_get_settings (GPPort *port, GPPortSettings *settings)
 Get the current port settings.
int gp_port_get_timeout (GPPort *port, int *timeout)
 Get the current port timeout.
int gp_port_new (GPPort **port)
 Create new GPPort.
int gp_port_open (GPPort *port)
 Open a port.
int gp_port_read (GPPort *port, char *data, int size)
 Read data from port.
int gp_port_seek (GPPort *port, int offset, int whence)
 Seek on a port (for usb disk direct ports)
int gp_port_send_break (GPPort *port, int duration)
 Send a break over a serial port.
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)
 Send a SCSI command to a port (for usb scsi ports)
int gp_port_set_error (GPPort *port, const char *format,...)
 Set verbose port error message.
int gp_port_set_info (GPPort *port, GPPortInfo info)
 Configure a port.
int gp_port_set_pin (GPPort *port, GPPin pin, GPLevel level)
 Set specified serial PIN to value.
int gp_port_set_settings (GPPort *port, GPPortSettings settings)
 Set port settings.
int gp_port_set_timeout (GPPort *port, int timeout)
 Set timeout of port.
int gp_port_usb_clear_halt (GPPort *port, int ep)
 Clear USB endpoint HALT condition.
int gp_port_usb_find_device (GPPort *port, int idvendor, int idproduct)
 Find USB device by vendor/product.
int gp_port_usb_find_device_by_class (GPPort *port, int mainclass, int subclass, int protocol)
 Find USB device by interface class.
int gp_port_usb_msg_class_read (GPPort *port, int request, int value, int index, char *bytes, int size)
 Send a USB class control message with input data.
int gp_port_usb_msg_class_write (GPPort *port, int request, int value, int index, char *bytes, int size)
 Send a USB class control message with output data.
int gp_port_usb_msg_interface_read (GPPort *port, int request, int value, int index, char *bytes, int size)
 Send a USB interface control message with input data.
int gp_port_usb_msg_interface_write (GPPort *port, int request, int value, int index, char *bytes, int size)
 Send a USB interface control message with output data.
int gp_port_usb_msg_read (GPPort *port, int request, int value, int index, char *bytes, int size)
 Send a USB control message with input data.
int gp_port_usb_msg_write (GPPort *port, int request, int value, int index, char *bytes, int size)
 Send a USB control message with output data.
int gp_port_write (GPPort *port, const char *data, int size)
 Writes a specified amount of data to a port.

Detailed Description

Author:
Copyright 2001 Lutz Mueller <lutz@users.sf.net>
License
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.

Definition in file gphoto2-port.h.


Generated by  Doxygen 1.6.0   Back to index