gphoto2-port-info-list.h
Go to the documentation of this file.
#ifndef __GPHOTO2_PORT_INFO_LIST_H__
#define __GPHOTO2_PORT_INFO_LIST_H__
typedef enum {
GP_PORT_NONE = 0,
GP_PORT_SERIAL = 1 << 0,
GP_PORT_USB = 1 << 2,
GP_PORT_DISK = 1 << 3,
GP_PORT_PTPIP = 1 << 4,
GP_PORT_USB_DISK_DIRECT = 1 << 5,
GP_PORT_USB_SCSI = 1 << 6
} GPPortType;
typedef struct _GPPortInfo {
GPPortType type;
char name[64];
char path[64];
/* Private */
char library_filename[1024];
} GPPortInfo;
#include <gphoto2/gphoto2-port.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifdef _GPHOTO2_INTERNAL_CODE
#include <gphoto2/gphoto2-port-log.h>
extern const StringFlagItem gpi_gphoto_port_type_map[];
#endif
/* Internals are private */
typedef struct _GPPortInfoList GPPortInfoList;
int gp_port_info_list_new (GPPortInfoList **list);
int gp_port_info_list_free (GPPortInfoList *list);
int gp_port_info_list_append (GPPortInfoList *list, GPPortInfo info);
int gp_port_info_list_load (GPPortInfoList *list);
int gp_port_info_list_count (GPPortInfoList *list);
int gp_port_info_list_lookup_path (GPPortInfoList *list, const char *path);
int gp_port_info_list_lookup_name (GPPortInfoList *list, const char *name);
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 __cplusplus
}
#endif /* __cplusplus */
#endif /* __GPHOTO2_PORT_INFO_LIST_H__ */
gp_port_info_list_lookup_path
int gp_port_info_list_lookup_path(GPPortInfoList *list, const char *path)
Lookup a specific path in the list.
Definition: gphoto2-port-info-list.c:339
gphoto2-port.h
gp_port_info_list_get_info
int gp_port_info_list_get_info(GPPortInfoList *list, int n, GPPortInfo *info)
Get port information of specific entry.
Definition: gphoto2-port-info-list.c:465
GP_PORT_USB_SCSI
USB Mass Storage raw SCSI port.
Definition: gphoto2-port-info-list.h:41
GP_PORT_SERIAL
Serial port.
Definition: gphoto2-port-info-list.h:36
gp_port_info_list_load
int gp_port_info_list_load(GPPortInfoList *list)
Load system ports.
Definition: gphoto2-port-info-list.c:277
gp_port_info_list_lookup_name
int gp_port_info_list_lookup_name(GPPortInfoList *list, const char *name)
Look up a name in the list.
Definition: gphoto2-port-info-list.c:435
gp_port_info_list_new
int gp_port_info_list_new(GPPortInfoList **list)
Create a new GPPortInfoList.
Definition: gphoto2-port-info-list.c:114
GP_PORT_PTPIP
PTP/IP port.
Definition: gphoto2-port-info-list.h:39
GPPortInfo
struct _GPPortInfo GPPortInfo
Information about the current port.
GP_PORT_USB_DISK_DIRECT
Direct IO to an usb mass storage device.
Definition: gphoto2-port-info-list.h:40
_GPPortInfo::path
char path[64]
The path of this port (whatever is after the :)
Definition: gphoto2-port-info-list.h:56
gphoto2-port-log.h
GP_PORT_USB
USB port.
Definition: gphoto2-port-info-list.h:37
_GPPortInfo::library_filename
char library_filename[1024]
Internal pathname of the port driver. Do not use outside of the port library.
Definition: gphoto2-port-info-list.h:59
GP_PORT_DISK
Disk / local mountpoint port.
Definition: gphoto2-port-info-list.h:38
GP_PORT_NONE
No specific type associated.
Definition: gphoto2-port-info-list.h:35
_GPPortInfoList
Definition: gphoto2-port-info-list.c:69
_GPPortInfo::name
char name[64]
The name of this port (usb:)
Definition: gphoto2-port-info-list.h:55
gp_port_message_codeset
const char * gp_port_message_codeset(const char *)
Specify codeset for translations.
Definition: gphoto2-port-info-list.c:99
gp_port_info_list_free
int gp_port_info_list_free(GPPortInfoList *list)
Free a GPPortInfo list.
Definition: gphoto2-port-info-list.c:141
_GPPortInfo::type
GPPortType type
The type of this port.
Definition: gphoto2-port-info-list.h:54
_GPPortInfo
Information about the current port.
Definition: gphoto2-port-info-list.h:53
gp_port_info_list_count
int gp_port_info_list_count(GPPortInfoList *list)
Number of ports in the list.
Definition: gphoto2-port-info-list.c:306
gp_port_info_list_append
int gp_port_info_list_append(GPPortInfoList *list, GPPortInfo info)
Append a portinfo to the port information list.
Definition: gphoto2-port-info-list.c:173
GPPortType
GPPortType
The gphoto port type.
Definition: gphoto2-port-info-list.h:34