Logo Search packages:      
Sourcecode: libgphoto2 version File versions

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

gp_filesystem_set_funcs: : a CameraFilesystem : pointer to a struct of filesystem functions :

Tells the filesystem which functions to call for camera/filesystem specific functions.

Return value: a gphoto2 error code.

Definition at line 1763 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, _CameraFilesystem::info_data, _CameraFilesystem::list_data, _CameraFilesystem::make_dir_func, _CameraFilesystem::put_file_func, _CameraFilesystem::remove_dir_func, and _CameraFilesystem::set_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;

      return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index