libgphoto2 photo camera library (libgphoto2) API: libgphoto2_port/gphoto2/gphoto2-port-info-list.h Source File

libgphoto2 photo camera library (libgphoto2) API 2.5.34

Loading...
Searching...
No Matches
gphoto2-port-info-list.h
Go to the documentation of this file.
1
23
24#ifndef LIBGPHOTO2_GPHOTO2_PORT_INFO_LIST_H
25#define LIBGPHOTO2_GPHOTO2_PORT_INFO_LIST_H
26
34 typedef enum {
35 GP_PORT_NONE = 0,
36 GP_PORT_SERIAL = 1 << 0,
37 GP_PORT_USB = 1 << 2,
38 GP_PORT_DISK = 1 << 3,
39 GP_PORT_PTPIP = 1 << 4,
40 GP_PORT_USB_DISK_DIRECT = 1 << 5,
41 GP_PORT_USB_SCSI = 1 << 6,
42 GP_PORT_IP = 1 << 7
43} GPPortType;
44
54struct _GPPortInfo;
55typedef struct _GPPortInfo *GPPortInfo;
56
57#include <gphoto2/gphoto2-port.h>
58
59#ifdef __cplusplus
60extern "C" {
61#endif /* __cplusplus */
62
63#ifdef _GPHOTO2_INTERNAL_CODE
64#include <gphoto2/gphoto2-port-log.h>
65#endif
66
67int gp_port_info_new (GPPortInfo *info);
68int gp_port_info_get_name (GPPortInfo info, char **name);
69int gp_port_info_set_name (GPPortInfo info, const char *name);
70int gp_port_info_get_path (GPPortInfo info, char **path);
71int gp_port_info_set_path (GPPortInfo info, const char *path);
72int gp_port_info_get_type (GPPortInfo info, GPPortType *type);
73int gp_port_info_set_type (GPPortInfo info, const GPPortType type);
74int gp_port_info_get_library_filename (GPPortInfo info, char **lib);
75int gp_port_info_set_library_filename (GPPortInfo info, char *lib);
76
77/* Internals are private */
78typedef struct _GPPortInfoList GPPortInfoList;
79
80int gp_port_info_list_new (GPPortInfoList **list);
81int gp_port_info_list_free (GPPortInfoList *list);
82
83int gp_port_info_list_append (GPPortInfoList *list, GPPortInfo info);
84
85int gp_port_info_list_load (GPPortInfoList *list);
86
87int gp_port_info_list_count (GPPortInfoList *list);
88
89int gp_port_info_list_lookup_path (GPPortInfoList *list, const char *path);
90int gp_port_info_list_lookup_name (GPPortInfoList *list, const char *name);
91
92int gp_port_info_list_get_info (GPPortInfoList *list, int n, GPPortInfo *info);
93
94const char *gp_port_message_codeset (const char*);
95
96int gp_port_init_localedir (const char *localedir);
97
98
106#ifdef _GPHOTO2_INTERNAL_CODE
107#define IOLIBDIR_ENV "IOLIBS"
108#define IOLIBDIR_PREFIX_ENV "IOLIBS_PREFIX"
109#endif /* _GPHOTO2_INTERNAL_CODE */
110
111
112#ifdef __cplusplus
113}
114#endif /* __cplusplus */
115
116#endif /* !defined(LIBGPHOTO2_GPHOTO2_PORT_INFO_LIST_H) */
GPPortType
GPPortType
The gphoto port type.
Definition gphoto2-port-info-list.h:34
GP_PORT_IP
@ GP_PORT_IP
generic IP address port.
Definition gphoto2-port-info-list.h:42
GP_PORT_USB_SCSI
@ GP_PORT_USB_SCSI
USB Mass Storage raw SCSI port.
Definition gphoto2-port-info-list.h:41
GP_PORT_PTPIP
@ GP_PORT_PTPIP
PTP/IP port.
Definition gphoto2-port-info-list.h:39
GP_PORT_NONE
@ GP_PORT_NONE
No specific type associated.
Definition gphoto2-port-info-list.h:35
GP_PORT_DISK
@ GP_PORT_DISK
Disk / local mountpoint port.
Definition gphoto2-port-info-list.h:38
GP_PORT_USB_DISK_DIRECT
@ GP_PORT_USB_DISK_DIRECT
Direct IO to an usb mass storage device.
Definition gphoto2-port-info-list.h:40
GP_PORT_USB
@ GP_PORT_USB
USB port.
Definition gphoto2-port-info-list.h:37
GP_PORT_SERIAL
@ GP_PORT_SERIAL
Serial port.
Definition gphoto2-port-info-list.h:36
gp_port_init_localedir
int gp_port_init_localedir(const char *localedir)
Initialize the localedir directory for the libgphoto2_port gettext domain.
Definition gphoto2-port-info-list.c:93
gp_port_info_set_name
int gp_port_info_set_name(GPPortInfo info, const char *name)
Set name of a specific port entry.
Definition gphoto2-port-info-list.c:551
gp_port_info_set_type
int gp_port_info_set_type(GPPortInfo info, const GPPortType type)
Set type of a specific port entry.
Definition gphoto2-port-info-list.c:613
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:348
gp_port_info_list_new
int gp_port_info_list_new(GPPortInfoList **list)
Create a new GPPortInfoList.
Definition gphoto2-port-info-list.c:147
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:474
gp_port_info_set_path
int gp_port_info_set_path(GPPortInfo info, const char *path)
Set path of a specific port entry.
Definition gphoto2-port-info-list.c:582
gp_port_message_codeset
const char * gp_port_message_codeset(const char *)
Specify codeset for translations.
Definition gphoto2-port-info-list.c:131
gp_port_info_list_load
int gp_port_info_list_load(GPPortInfoList *list)
Load system ports.
Definition gphoto2-port-info-list.c:315
gp_port_info_get_type
int gp_port_info_get_type(GPPortInfo info, GPPortType *type)
Get type of a specific port entry.
Definition gphoto2-port-info-list.c:597
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:503
gp_port_info_new
int gp_port_info_new(GPPortInfo *info)
Create a new portinfo.
Definition gphoto2-port-info-list.c:628
gp_port_info_get_path
int gp_port_info_get_path(GPPortInfo info, char **path)
Get path of a specific port entry.
Definition gphoto2-port-info-list.c:566
gp_port_info_get_name
int gp_port_info_get_name(GPPortInfo info, char **name)
Get name of a specific port entry.
Definition gphoto2-port-info-list.c:535
gp_port_info_list_free
int gp_port_info_list_free(GPPortInfoList *list)
Free a GPPortInfo list.
Definition gphoto2-port-info-list.c:171
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:213
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:379
gphoto2-port-log.h
gphoto2-port.h
_GPPortInfoList
Definition gphoto2-port-info-list.c:58
_GPPortInfo
Definition gphoto2-port-info.h:32
_GPPortInfo::path
char * path
The path of this port (usb:001,023).
Definition gphoto2-port-info.h:35
_GPPortInfo::type
GPPortType type
The type of this port.
Definition gphoto2-port-info.h:33
_GPPortInfo::name
char * name
The name of this port (usb:).
Definition gphoto2-port-info.h:34