Whole document tree
    

Whole document tree

GPhoto2-Port-Library

GPhoto2-Port-Library

Name

GPhoto2-Port-Library -- 

Description

Details

struct GPPortOperations

struct GPPortOperations {
        int (*init)     (GPPort *);
        int (*exit)     (GPPort *);
        int (*open)     (GPPort *);
        int (*close)    (GPPort *);
        int (*read)     (GPPort *,       char *, int);
        int (*write)    (GPPort *, const char *, int);
        int (*update)   (GPPort *);

        /* Pointers to devices. Please note these are stubbed so there is
         no need to #ifdef GP_PORT_* anymore. */

        /* for serial devices */
        int (*get_pin)   (GPPort *, GPPin, GPLevel*);
        int (*set_pin)   (GPPort *, GPPin, GPLevel);
        int (*send_break)(GPPort *, int);
        int (*flush)     (GPPort *, int);

        /* for USB devices */
        int (*find_device)(GPPort * dev, int idvendor, int idproduct);
        int (*find_device_by_class)(GPPort * dev, int class, int subclass, int protocol);
        int (*clear_halt) (GPPort * dev, int ep);
        int (*msg_write)  (GPPort * dev, int request, int value, int index,
                                char *bytes, int size);
        int (*msg_read)   (GPPort * dev, int request, int value, int index,
                                char *bytes, int size);

};


GPPortLibraryType ()

GPPortType  (*GPPortLibraryType)            (void);


GPPortLibraryList ()

int         (*GPPortLibraryList)            (GPPortInfoList *list);


GPPortLibraryOperations ()

GPPortOperations* (*GPPortLibraryOperations)
                                            (void);


gp_port_library_type ()

GPPortType  gp_port_library_type            (void);


gp_port_library_list ()

int         gp_port_library_list            (GPPortInfoList *list);


gp_port_library_operations ()

GPPortOperations* gp_port_library_operations
                                            (void);