2002-02-06 Lutz M�ller <lutz@users.sourceforge.net>

* libgphoto2_port/gphoto2-port.h: extern C.


git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@4084 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Lutz Mueller
2002-02-06 12:44:15 +00:00
parent 8c1ab3a6c0
commit a360bc4dfa
2 changed files with 18 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
2002-02-06 Lutz Müller <lutz@users.sourceforge.net>
* libgphoto2_port/gphoto2-port.h: extern C.
2002-01-13 Hans Ulrich Niedermann <gp@n-dimensional.de>
* configure.in: Added "ja" to ALL_LINGUAS to fix broken "make dist"

View File

@@ -30,6 +30,10 @@
#include <os2.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifndef TRUE
#define TRUE (0==0)
#endif
@@ -40,26 +44,26 @@
#define GP_PORT_MAX_BUF_LEN 4096 /* max length of receive buffer */
typedef struct _GPPortSettingsSerial GPPortSettingsSerial;
struct _GPPortSettingsSerial {
char port[128];
int speed;
int bits, parity, stopbits;
};
typedef struct _GPPortSettingsSerial GPPortSettingsSerial;
typedef struct _GPPortSettingsUSB GPPortSettingsUSB;
struct _GPPortSettingsUSB {
int inep, outep;
int config;
int interface;
int altsetting;
};
typedef struct _GPPortSettingsUSB GPPortSettingsUSB;
typedef union _GPPortSettings GPPortSettings;
union _GPPortSettings {
GPPortSettingsSerial serial;
GPPortSettingsUSB usb;
};
typedef union _GPPortSettings GPPortSettings;
enum {
GP_PORT_USB_ENDPOINT_IN,
@@ -69,6 +73,7 @@ enum {
typedef struct _GPPortPrivateLibrary GPPortPrivateLibrary;
typedef struct _GPPortPrivateCore GPPortPrivateCore;
typedef struct _GPPort GPPort;
struct _GPPort {
/* For your convenience */
@@ -82,7 +87,6 @@ struct _GPPort {
GPPortPrivateLibrary *pl;
GPPortPrivateCore *pc;
};
typedef struct _GPPort GPPort;
int gp_port_new (GPPort **port);
int gp_port_free (GPPort *port);
@@ -102,6 +106,7 @@ int gp_port_set_timeout (GPPort *port, int timeout);
int gp_port_set_settings (GPPort *port, GPPortSettings settings);
int gp_port_get_settings (GPPort *port, GPPortSettings *settings);
typedef enum _GPPin GPPin;
enum _GPPin {
GP_PIN_RTS,
GP_PIN_DTR,
@@ -110,13 +115,12 @@ enum _GPPin {
GP_PIN_CD,
GP_PIN_RING
};
typedef enum _GPPin GPPin;
typedef enum _GPLevel GPLevel;
enum _GPLevel {
GP_LEVEL_LOW = 0,
GP_LEVEL_HIGH = 1
};
typedef enum _GPLevel GPLevel;
int gp_port_get_pin (GPPort *port, GPPin pin, GPLevel *level);
int gp_port_set_pin (GPPort *port, GPPin pin, GPLevel level);
@@ -141,6 +145,10 @@ typedef GPPort gp_port;
typedef GPPortSettings gp_port_settings;
#define PIN_CTS GP_PIN_CTS
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GPHOTO2_PORT_H__ */