libgphoto2 photo camera library (libgphoto2) API  2.5.2
gphoto2-port-info-list.h
Go to the documentation of this file.
00001 
00024 #ifndef __GPHOTO2_PORT_INFO_LIST_H__
00025 #define __GPHOTO2_PORT_INFO_LIST_H__
00026 
00034 typedef enum { 
00035         GP_PORT_NONE        =      0,   
00036         GP_PORT_SERIAL      = 1 << 0,   
00037         GP_PORT_USB         = 1 << 2,   
00038         GP_PORT_DISK        = 1 << 3,   
00039         GP_PORT_PTPIP       = 1 << 4,   
00040         GP_PORT_USB_DISK_DIRECT = 1 << 5, 
00041         GP_PORT_USB_SCSI    = 1 << 6    
00042 } GPPortType;
00043 
00053 struct _GPPortInfo;
00054 typedef struct _GPPortInfo *GPPortInfo;
00055 
00056 #include <gphoto2/gphoto2-port.h>
00057 
00058 #ifdef __cplusplus
00059 extern "C" {
00060 #endif /* __cplusplus */
00061 
00062 #ifdef _GPHOTO2_INTERNAL_CODE
00063 #include <gphoto2/gphoto2-port-log.h>
00064 extern const StringFlagItem gpi_gphoto_port_type_map[];
00065 #endif
00066 
00067 int gp_port_info_new (GPPortInfo *info);
00068 int gp_port_info_get_name (GPPortInfo info, char **name);
00069 int gp_port_info_set_name (GPPortInfo info, const char *name);
00070 int gp_port_info_get_path (GPPortInfo info, char **path);
00071 int gp_port_info_set_path (GPPortInfo info, const char *path);
00072 int gp_port_info_get_type (GPPortInfo info, GPPortType *type);
00073 int gp_port_info_set_type (GPPortInfo info, const GPPortType type);
00074 int gp_port_info_get_library_filename (GPPortInfo info, char **lib);
00075 int gp_port_info_set_library_filename (GPPortInfo info, char *lib);
00076 
00077 /* Internals are private */
00078 typedef struct _GPPortInfoList GPPortInfoList;
00079 
00080 int gp_port_info_list_new  (GPPortInfoList **list);
00081 int gp_port_info_list_free (GPPortInfoList *list);
00082 
00083 int gp_port_info_list_append (GPPortInfoList *list, GPPortInfo info);
00084 
00085 int gp_port_info_list_load (GPPortInfoList *list);
00086 
00087 int gp_port_info_list_count (GPPortInfoList *list);
00088 
00089 int gp_port_info_list_lookup_path (GPPortInfoList *list, const char *path);
00090 int gp_port_info_list_lookup_name (GPPortInfoList *list, const char *name);
00091 
00092 int gp_port_info_list_get_info (GPPortInfoList *list, int n, GPPortInfo *info);
00093 
00094 const char *gp_port_message_codeset (const char*);
00095 
00103 #ifdef _GPHOTO2_INTERNAL_CODE
00104 #define IOLIBDIR_ENV "IOLIBS"
00105 #endif /* _GPHOTO2_INTERNAL_CODE */
00106 
00107 
00108 #ifdef __cplusplus
00109 }
00110 #endif /* __cplusplus */
00111 
00112 #endif /* __GPHOTO2_PORT_INFO_LIST_H__ */