Logo Search packages:      
Sourcecode: libgphoto2 version File versions

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 
)

gp_filesystem_set_folder_funcs: : a CameraFilesystem : function used to upload files : function used to delete all files in a folder : function used to create a new directory : function used to remove an existing directory : 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 will assume that neither of these features is supported.

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

Return value: a gphoto2 error code.

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

References _CameraFilesystem::delete_all_func, _CameraFilesystem::folder_data, _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