From 944df748445e616b8055d0d718fd09747db70632 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 26 May 2019 21:41:24 +0200 Subject: initial lumix build https://github.com/gphoto/libgphoto2/issues/409 --- libgphoto2_port/gphoto2/gphoto2-port-info-list.h | 3 ++- libgphoto2_port/ptpip/ptpip.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'libgphoto2_port') diff --git a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h index d611b8157..eec6ceabe 100644 --- a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h +++ b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h @@ -38,7 +38,8 @@ typedef enum { 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_SCSI = 1 << 6 /**< \brief USB Mass Storage raw SCSI port. */ + GP_PORT_USB_SCSI = 1 << 6, /**< \brief USB Mass Storage raw SCSI port. */ + GP_PORT_TCP = 1 << 7 /**< \brief generic TCP port. */ } GPPortType; /** diff --git a/libgphoto2_port/ptpip/ptpip.c b/libgphoto2_port/ptpip/ptpip.c index 3b60d8a37..225419a9d 100644 --- a/libgphoto2_port/ptpip/ptpip.c +++ b/libgphoto2_port/ptpip/ptpip.c @@ -185,6 +185,18 @@ gp_port_library_list (GPPortInfoList *list) gp_port_info_set_path (info, "^ptpip:"); gp_port_info_list_append (list, info); /* do not check return */ + gp_port_info_new (&info); + gp_port_info_set_type (info, GP_PORT_TCP); + gp_port_info_set_name (info, _("TCP Connection")); + gp_port_info_set_path (info, "tcp:"); + CHECK (gp_port_info_list_append (list, info)); + + /* Generic matcher so you can pass any IP address */ + gp_port_info_new (&info); + gp_port_info_set_type (info, GP_PORT_TCP); + gp_port_info_set_name (info, ""); + gp_port_info_set_path (info, "^tcp:"); + gp_port_info_list_append (list, info); /* do not check return */ #ifdef HAVE_MDNS_BONJOUR ret = DNSServiceBrowse ( &sd, -- cgit v1.2.1 From 577cfbea1efffafed29de299d5012b3d403efd60 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 27 Jun 2019 14:48:03 +0200 Subject: port TCP is also valid --- libgphoto2_port/test/test-port-list.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libgphoto2_port') diff --git a/libgphoto2_port/test/test-port-list.c b/libgphoto2_port/test/test-port-list.c index 35dd0bbdc..10c3ecdd0 100644 --- a/libgphoto2_port/test/test-port-list.c +++ b/libgphoto2_port/test/test-port-list.c @@ -107,6 +107,7 @@ run_test () case GP_PORT_USB_SCSI: port_type_str = "USBSCSI"; break; case GP_PORT_DISK: port_type_str = "DISK"; break; case GP_PORT_PTPIP: port_type_str = "PTPIP"; break; + case GP_PORT_TCP: port_type_str = "TCP"; break; default: port_type_str = "UNKNOWN"; return 3; break; } printf ("No: %d\n" -- cgit v1.2.1 From b331c5aeafa41bf16c28e616cbea5ed67b4a9f69 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 1 Jul 2019 08:34:33 +0200 Subject: rename GP_PORT_TCP -> GP_PORT_IP as we just use it specify an IP, regardless of what the driver does --- libgphoto2_port/gphoto2/gphoto2-port-info-list.h | 2 +- libgphoto2_port/ptpip/ptpip.c | 10 +++++----- libgphoto2_port/test/test-port-list.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'libgphoto2_port') diff --git a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h index eec6ceabe..fcb840b68 100644 --- a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h +++ b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h @@ -39,7 +39,7 @@ typedef enum { 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_SCSI = 1 << 6, /**< \brief USB Mass Storage raw SCSI port. */ - GP_PORT_TCP = 1 << 7 /**< \brief generic TCP port. */ + GP_PORT_IP = 1 << 7 /**< \brief generic IP address port. */ } GPPortType; /** diff --git a/libgphoto2_port/ptpip/ptpip.c b/libgphoto2_port/ptpip/ptpip.c index 225419a9d..20947d805 100644 --- a/libgphoto2_port/ptpip/ptpip.c +++ b/libgphoto2_port/ptpip/ptpip.c @@ -186,16 +186,16 @@ gp_port_library_list (GPPortInfoList *list) gp_port_info_list_append (list, info); /* do not check return */ gp_port_info_new (&info); - gp_port_info_set_type (info, GP_PORT_TCP); - gp_port_info_set_name (info, _("TCP Connection")); - gp_port_info_set_path (info, "tcp:"); + gp_port_info_set_type (info, GP_PORT_IP); + gp_port_info_set_name (info, _("IP Connection")); + gp_port_info_set_path (info, "ip:"); CHECK (gp_port_info_list_append (list, info)); /* Generic matcher so you can pass any IP address */ gp_port_info_new (&info); - gp_port_info_set_type (info, GP_PORT_TCP); + gp_port_info_set_type (info, GP_PORT_IP); gp_port_info_set_name (info, ""); - gp_port_info_set_path (info, "^tcp:"); + gp_port_info_set_path (info, "^ip:"); gp_port_info_list_append (list, info); /* do not check return */ #ifdef HAVE_MDNS_BONJOUR ret = DNSServiceBrowse ( diff --git a/libgphoto2_port/test/test-port-list.c b/libgphoto2_port/test/test-port-list.c index 10c3ecdd0..4da17af58 100644 --- a/libgphoto2_port/test/test-port-list.c +++ b/libgphoto2_port/test/test-port-list.c @@ -107,7 +107,7 @@ run_test () case GP_PORT_USB_SCSI: port_type_str = "USBSCSI"; break; case GP_PORT_DISK: port_type_str = "DISK"; break; case GP_PORT_PTPIP: port_type_str = "PTPIP"; break; - case GP_PORT_TCP: port_type_str = "TCP"; break; + case GP_PORT_IP: port_type_str = "IP"; break; default: port_type_str = "UNKNOWN"; return 3; break; } printf ("No: %d\n" -- cgit v1.2.1