diff options
Diffstat (limited to 'libgphoto2_port')
-rw-r--r-- | libgphoto2_port/gphoto2/gphoto2-port-info-list.h | 3 | ||||
-rw-r--r-- | libgphoto2_port/ptpip/ptpip.c | 12 | ||||
-rw-r--r-- | libgphoto2_port/test/test-port-list.c | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h index d611b8157..fcb840b68 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_IP = 1 << 7 /**< \brief generic IP address port. */ } GPPortType; /** diff --git a/libgphoto2_port/ptpip/ptpip.c b/libgphoto2_port/ptpip/ptpip.c index 3b60d8a37..20947d805 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_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_IP); + gp_port_info_set_name (info, ""); + gp_port_info_set_path (info, "^ip:"); + gp_port_info_list_append (list, info); /* do not check return */ #ifdef HAVE_MDNS_BONJOUR ret = DNSServiceBrowse ( &sd, diff --git a/libgphoto2_port/test/test-port-list.c b/libgphoto2_port/test/test-port-list.c index 35dd0bbdc..4da17af58 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_IP: port_type_str = "IP"; break; default: port_type_str = "UNKNOWN"; return 3; break; } printf ("No: %d\n" |