Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_port_open ( GPPort port  ) 

Open a port.

port a GPPort
Opens a port which should have been created with gp_port_new and configured with gp_port_set_info and gp_port_set_settings

a gphoto2 error code

Definition at line 250 of file gphoto2-port.c.

References CHECK_NULL, CHECK_RESULT, gp_log(), GP_LOG_DEBUG, GP_OK, GP_PORT_SERIAL, GP_PORT_USB, _GPPortOperations::open, _GPPortPrivateCore::ops, _GPPort::pc, and _GPPort::type.

Referenced by gp_camera_exit(), and gp_camera_init().

      CHECK_NULL (port);
      CHECK_INIT (port);

      gp_log (GP_LOG_DEBUG, "gphoto2-port", _("Opening %s port..."),
            port->type == GP_PORT_SERIAL ? "SERIAL" : 
                  (port->type == GP_PORT_USB ? "USB" : ""));

      CHECK_SUPP (port, "open", port->pc->ops->open);
      CHECK_RESULT (port->pc->ops->open (port));

      return GP_OK;

Generated by  Doxygen 1.6.0   Back to index