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

int gp_filesystem_set_folder_funcs ( CameraFilesystem fs,
CameraFilesystemPutFileFunc  put_file_func,
CameraFilesystemDeleteAllFunc  delete_all_func,
CameraFilesystemDirFunc  make_dir_func,
CameraFilesystemDirFunc  remove_dir_func,
void *  data 

Set folder related functions of the filesystem.

fs a CameraFilesystem
put_file_func function used to upload files
delete_all_func function used to delete all files in a folder
make_dir_func function used to create a new directory
remove_dir_func function used to remove an existing directory
data a data object that will passed to all called functions
Tells the filesystem which functions to call for file upload, deletion of all files in a given folder, creation or removal of a folder. Typically, a camera driver would call this function on initialization. If one functionality is not supported, NULL can be supplied. If you don't call this function, the fs will assume that neither of these features is supported.

The fs will try to compensate missing delete_all_func functionality with the delete_file_func if such a function has been supplied.

a gphoto2 error code.

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

References CHECK_NULL, _CameraFilesystem::delete_all_func, _CameraFilesystem::folder_data, GP_OK, _CameraFilesystem::make_dir_func, _CameraFilesystem::put_file_func, and _CameraFilesystem::remove_dir_func.

      CHECK_NULL (fs);

      fs->put_file_func = put_file_func;
      fs->delete_all_func = delete_all_func;
      fs->make_dir_func = make_dir_func;
      fs->remove_dir_func = remove_dir_func;
      fs->folder_data = data;

      return (GP_OK);

Generated by  Doxygen 1.6.0   Back to index