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

int gp_filesystem_set_funcs ( CameraFilesystem fs,
CameraFilesystemFuncs *  funcs,
void *  data 
)

Set all filesystem related function pointers.

Parameters:
fs a CameraFilesystem
funcs pointer to a struct of filesystem functions
data private data
Tells the filesystem which functions to call for camera/filesystem specific functions, like listing, retrieving, uploading files and so on.

Returns:
a gphoto2 error code.

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

References CHECK_NULL, _CameraFilesystem::delete_all_func, _CameraFilesystem::delete_file_func, _CameraFilesystem::file_data, _CameraFilesystem::file_list_func, _CameraFilesystem::folder_data, _CameraFilesystem::folder_list_func, _CameraFilesystem::get_file_func, _CameraFilesystem::get_info_func, GP_OK, _CameraFilesystem::info_data, _CameraFilesystem::list_data, _CameraFilesystem::make_dir_func, _CameraFilesystem::put_file_func, _CameraFilesystem::remove_dir_func, _CameraFilesystem::set_info_func, and _CameraFilesystem::storage_info_func.

Referenced by camera_init().

{
      CHECK_NULL (fs);

      fs->get_info_func = funcs->get_info_func;
      fs->set_info_func = funcs->set_info_func;
      fs->info_data = data;

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

      fs->file_list_func      = funcs->file_list_func;
      fs->folder_list_func    = funcs->folder_list_func;
      fs->list_data = data;

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

      fs->storage_info_func   = funcs->storage_info_func;
      return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index