Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int camera_init ( Camera camera  ) 

Initialize the camera.

camera a Camera
This is the most interesting function in your library. Here, you tell gphoto2 what operations your camera supports and you try to connect to the camera. That is, access camera->functions directly and set them to your implementation (if you have any). Then, tell the CameraFilesystem (available in camera->fs) how to retrieve lists (gp_filesystem_set_list_funcs), how to retrieve or set file information (gp_filesystem_set_info_funcs), how to get or delete files (gp_filesystem_set_file_funcs), or how to put files or delete all files in a folder (gp_filesystem_set_folder_funcs). After that, configure the port (camera->port) which is already opened by gphoto2. You just have to call gp_port_settings_get, adjust the settings, call gp_port_settings_set, and try to write to and read from the port. If the camera responds, return GP_OK. If not, return some meaningful error code.

a gphoto2 error code

Definition at line 84 of file gphoto2-library.c.

References GP_OK.

      /* Dummy implementation */
      return (GP_OK);

Generated by  Doxygen 1.6.0   Back to index