Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

int gp_filesystem_set_file_funcs ( CameraFilesystem fs,
CameraFilesystemGetFileFunc  get_file_func,
CameraFilesystemDeleteFileFunc  del_file_func,
void *  data 

Set camera filesystem file related functions.

fs a CameraFilesystem
get_file_func the function downloading files
del_file_func the function deleting files
data private data structure
Tells the fs which functions to use for file download or file deletion. Typically, a camera driver would call this function on initialization. A function can be NULL indicating that this functionality is not supported. For example, if a camera does not support file deletion, you would supply NULL for del_file_func.

a gphoto2 error code.

Definition at line 1534 of file gphoto2-filesys.c.

References CHECK_NULL, _CameraFilesystem::delete_file_func, _CameraFilesystem::file_data, _CameraFilesystem::get_file_func, and GP_OK.

      CHECK_NULL (fs);

      fs->delete_file_func = del_file_func;
      fs->get_file_func = get_file_func;
      fs->file_data = data;

      return (GP_OK);

Generated by  Doxygen 1.6.0   Back to index