summaryrefslogtreecommitdiff
path: root/libgphoto2_port/gphoto2
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2008-03-15 21:45:48 +0000
committerMarcus Meissner <marcus@jet.franken.de>2008-03-15 21:45:48 +0000
commit3c26841fa08d4f7c82ea7b4004a954f6fe146f17 (patch)
tree77e49b5d592507d3aa7e03ef5117c4dcd5850e5e /libgphoto2_port/gphoto2
parentf50fb2ec5e87a8538befd8909ae6243711d49baa (diff)
downloadlibgphoto2-3c26841fa08d4f7c82ea7b4004a954f6fe146f17.tar.gz
GPPortInfo struct abstracted into a private struct.
- libgphoto2_port rewritten for new GPPortInfo. - camlibs/directory and camlibs/ptp2 adjusted. - libgphoto2/ adjusted for the changed GPPortInfo list handling. - configure.ac adjusted, NEWS adjusted git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10990 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/gphoto2')
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-info-list.h53
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port.h26
2 files changed, 13 insertions, 66 deletions
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
index ff9c3a018..3d3414931 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
@@ -48,25 +48,8 @@ typedef enum {
* This is not to be confused with the driver configurable port settings
* in \ref GPPortSettings.
*/
-typedef struct _GPPortInfo {
- GPPortType type; /**< \brief The type of this port. */
- char name[64]; /**< \brief The name of this port (usb:) */
- char path[4096]; /**< \brief The path of this port (whatever is after the :) */
-
- /* Private */
- char library_filename[1024]; /**< \brief Internal pathname of the port driver. Do not use outside of the port library. */
-} GPPortInfo;
-
-#ifdef __LIBGPHOTO2_INCLUDE_OLD_VERSIONS
-typedef struct _GPPortInfo_v240 {
- GPPortType type;
- char name[64];
- char path[64];
-
- /* Private */
- char library_filename[1024];
-} GPPortInfo_v240;
-#endif
+struct _GPPortInfo;
+typedef struct _GPPortInfo *GPPortInfo;
#include <gphoto2/gphoto2-port.h>
@@ -79,6 +62,16 @@ extern "C" {
extern const StringFlagItem gpi_gphoto_port_type_map[];
#endif
+int gp_port_info_new (GPPortInfo *info);
+int gp_port_info_get_name (GPPortInfo info, char **name);
+int gp_port_info_set_name (GPPortInfo info, const char *name);
+int gp_port_info_get_path (GPPortInfo info, char **path);
+int gp_port_info_set_path (GPPortInfo info, const char *path);
+int gp_port_info_get_type (GPPortInfo info, GPPortType *type);
+int gp_port_info_set_type (GPPortInfo info, const GPPortType type);
+int gp_port_info_get_library_filename (GPPortInfo info, char **lib);
+int gp_port_info_set_library_filename (GPPortInfo info, char *lib);
+
/* Internals are private */
typedef struct _GPPortInfoList GPPortInfoList;
@@ -98,28 +91,6 @@ int gp_port_info_list_get_info (GPPortInfoList *list, int n, GPPortInfo *info);
const char *gp_port_message_codeset (const char*);
-/* DEPRECATED */
-typedef GPPortInfo gp_port_info;
-
-#ifdef __LIBGPHOTO2_INCLUDE_OLD_VERSIONS
-int gp_port_info_list_append_v240 (GPPortInfoList *list, GPPortInfo_v240 info);
-int gp_port_info_list_append_v250 (GPPortInfoList *list, GPPortInfo info);
-
-
-int gp_port_info_list_get_info_v240 (GPPortInfoList *list, int n, GPPortInfo_v240 *info);
-int gp_port_info_list_get_info_v250 (GPPortInfoList *list, int n, GPPortInfo *info);
-
-#ifdef __LIBGPHOTO2_INCLUDE_OLD_VERSIONS_INFOLIST
-asm(".symver gp_port_info_list_append_v240, gp_port_info_list_append@LIBGPHOTO2_0_0");
-asm(".symver gp_port_info_list_append_v250, gp_port_info_list_append@@LIBGPHOTO2_5_0");
-#define gp_port_info_list_append gp_port_info_list_append_v250
-asm(".symver gp_port_info_list_get_info_v240, gp_port_info_list_get_info@LIBGPHOTO2_0_0");
-asm(".symver gp_port_info_list_get_info_v250, gp_port_info_list_get_info@@LIBGPHOTO2_5_0");
-#define gp_port_info_list_get_info gp_port_info_list_get_info_v250
-#endif
-
-#endif
-
/**
* Name of the environment variable which may contain the path where
* to look for the IO libs. If this environment variable is not defined,
diff --git a/libgphoto2_port/gphoto2/gphoto2-port.h b/libgphoto2_port/gphoto2/gphoto2-port.h
index d50f0c41c..69fca9410 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port.h
@@ -92,13 +92,6 @@ typedef struct _GPPortSettingsUSB {
} GPPortSettingsUSB;
/**
- * \brief Port settings for the local disk (directories) port.
- */
-typedef struct _GPPortSettingsDisk {
- char mountpoint[128]; /**< \brief Path in the UNIX fs which corresponds to gphoto2 / */
-} GPPortSettingsDisk;
-
-/**
* \brief Union of port settings.
*
* This contains a shared union of possible settings for ports needing
@@ -107,7 +100,6 @@ typedef struct _GPPortSettingsDisk {
typedef union _GPPortSettings {
GPPortSettingsSerial serial; /**< \brief Serial specific settings */
GPPortSettingsUSB usb; /**< \brief USB specific settings */
- GPPortSettingsDisk disk; /**< \brief Disk port specific settings */
} GPPortSettings;
enum {
@@ -148,7 +140,7 @@ typedef struct _GPPort {
int gp_port_new (GPPort **port);
int gp_port_free (GPPort *port);
-int gp_port_set_info (GPPort *port, GPPortInfo info);
+int gp_port_set_info (GPPort *port, GPPortInfo info);
int gp_port_get_info (GPPort *port, GPPortInfo *info);
int gp_port_open (GPPort *port);
@@ -220,22 +212,6 @@ int gp_port_set_error (GPPort *port, const char *format, ...)
;
const char *gp_port_get_error (GPPort *port);
-#ifdef __LIBGPHOTO2_INCLUDE_OLD_VERSIONS
-int gp_port_set_info_v240 (GPPort *port, GPPortInfo_v240 info);
-int gp_port_set_info_v250 (GPPort *port, GPPortInfo info);
-int gp_port_get_info_v240 (GPPort *port, GPPortInfo_v240 *info);
-int gp_port_get_info_v250 (GPPort *port, GPPortInfo *info);
-
-#ifdef __LIBGPHOTO2_INCLUDE_OLD_VERSIONS_PORT
-asm(".symver gp_port_set_info_v240, gp_port_set_info@LIBGPHOTO2_0_0");
-asm(".symver gp_port_set_info_v250, gp_port_set_info@@LIBGPHOTO2_5_0");
-#define gp_port_set_info gp_port_set_info_v250
-asm(".symver gp_port_get_info_v240, gp_port_get_info@LIBGPHOTO2_0_0");
-asm(".symver gp_port_get_info_v250, gp_port_get_info@@LIBGPHOTO2_5_0");
-#define gp_port_get_info gp_port_get_info_v250
-#endif
-#endif
-
/* DEPRECATED */
/** \deprecated internal typedef */
typedef GPPort gp_port;