libgphoto2 photo camera library (libgphoto2) API  2.5.10.1
gphoto2-port-info-list.h
Go to the documentation of this file.
1 
24 #ifndef __GPHOTO2_PORT_INFO_LIST_H__
25 #define __GPHOTO2_PORT_INFO_LIST_H__
26 
34 typedef enum {
36  GP_PORT_SERIAL = 1 << 0,
37  GP_PORT_USB = 1 << 2,
38  GP_PORT_DISK = 1 << 3,
39  GP_PORT_PTPIP = 1 << 4,
41  GP_PORT_USB_SCSI = 1 << 6
42 } GPPortType;
43 
53 struct _GPPortInfo;
54 typedef struct _GPPortInfo *GPPortInfo;
55 
56 #include <gphoto2/gphoto2-port.h>
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif /* __cplusplus */
61 
62 #ifdef _GPHOTO2_INTERNAL_CODE
64 extern const StringFlagItem gpi_gphoto_port_type_map[];
65 #endif
66 
67 int gp_port_info_new (GPPortInfo *info);
68 int gp_port_info_get_name (GPPortInfo info, char **name);
69 int gp_port_info_set_name (GPPortInfo info, const char *name);
70 int gp_port_info_get_path (GPPortInfo info, char **path);
71 int gp_port_info_set_path (GPPortInfo info, const char *path);
72 int gp_port_info_get_type (GPPortInfo info, GPPortType *type);
73 int gp_port_info_set_type (GPPortInfo info, const GPPortType type);
74 int gp_port_info_get_library_filename (GPPortInfo info, char **lib);
75 int gp_port_info_set_library_filename (GPPortInfo info, char *lib);
76 
77 /* Internals are private */
78 typedef struct _GPPortInfoList GPPortInfoList;
79 
82 
83 int gp_port_info_list_append (GPPortInfoList *list, GPPortInfo info);
84 
86 
88 
89 int gp_port_info_list_lookup_path (GPPortInfoList *list, const char *path);
90 int gp_port_info_list_lookup_name (GPPortInfoList *list, const char *name);
91 
92 int gp_port_info_list_get_info (GPPortInfoList *list, int n, GPPortInfo *info);
93 
94 const char *gp_port_message_codeset (const char*);
95 
103 #ifdef _GPHOTO2_INTERNAL_CODE
104 #define IOLIBDIR_ENV "IOLIBS"
105 #endif /* _GPHOTO2_INTERNAL_CODE */
106 
107 
108 #ifdef __cplusplus
109 }
110 #endif /* __cplusplus */
111 
112 #endif /* __GPHOTO2_PORT_INFO_LIST_H__ */
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:334
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:458
char * name
The name of this port (usb:)
Definition: gphoto2-port-info.h:34
int gp_port_info_set_name(GPPortInfo info, const char *name)
Set name of a specific port entry.
Definition: gphoto2-port-info-list.c:506
USB Mass Storage raw SCSI port.
Definition: gphoto2-port-info-list.h:41
int gp_port_info_new(GPPortInfo *info)
Create a new portinfo.
Definition: gphoto2-port-info-list.c:583
int gp_port_info_get_type(GPPortInfo info, GPPortType *type)
Get type of a specific port entry.
Definition: gphoto2-port-info-list.c:552
Serial port.
Definition: gphoto2-port-info-list.h:36
int gp_port_info_list_load(GPPortInfoList *list)
Load system ports.
Definition: gphoto2-port-info-list.c:272
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:429
int gp_port_info_list_new(GPPortInfoList **list)
Create a new GPPortInfoList.
Definition: gphoto2-port-info-list.c:109
PTP/IP port.
Definition: gphoto2-port-info-list.h:39
Direct IO to an usb mass storage device.
Definition: gphoto2-port-info-list.h:40
USB port.
Definition: gphoto2-port-info-list.h:37
int gp_port_info_set_path(GPPortInfo info, const char *path)
Set path of a specific port entry.
Definition: gphoto2-port-info-list.c:537
Disk / local mountpoint port.
Definition: gphoto2-port-info-list.h:38
int gp_port_info_get_path(GPPortInfo info, char **path)
Get path of a specific port entry.
Definition: gphoto2-port-info-list.c:521
No specific type associated.
Definition: gphoto2-port-info-list.h:35
Definition: gphoto2-port-info-list.c:72
char * path
The path of this port (usb:001,023)
Definition: gphoto2-port-info.h:35
const char * gp_port_message_codeset(const char *)
Specify codeset for translations.
Definition: gphoto2-port-info-list.c:94
int gp_port_info_list_free(GPPortInfoList *list)
Free a GPPortInfo list.
Definition: gphoto2-port-info-list.c:133
GPPortType type
The type of this port.
Definition: gphoto2-port-info.h:33
Definition: gphoto2-port-info.h:32
int gp_port_info_list_count(GPPortInfoList *list)
Number of ports in the list.
Definition: gphoto2-port-info-list.c:303
int gp_port_info_list_append(GPPortInfoList *list, GPPortInfo info)
Append a portinfo to the port information list.
Definition: gphoto2-port-info-list.c:175
int gp_port_info_set_type(GPPortInfo info, const GPPortType type)
Set type of a specific port entry.
Definition: gphoto2-port-info-list.c:568
GPPortType
The gphoto port type.
Definition: gphoto2-port-info-list.h:34
int gp_port_info_get_name(GPPortInfo info, char **name)
Get name of a specific port entry.
Definition: gphoto2-port-info-list.c:490