* camlibs/agfa.c:
* camlibs/commands.c:
* camlibs/commands.h: Use a macro CHECK for most of the simple
error checks. That makes the code much cleaner.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2140 67ed7778-7388-44ab-90cf-0a291f65f57c
* camlibs/barbie/*: Use camera->port and camera->fs.
* camlibs/dimera/dimera3500.c
(populate_filesystem): Removed.
(camera_folder_list_folders): Removed. We don't support folders anyways
(camera_folder_list_files): Renamed to
(file_list_func): Don't access the CameraFilesystem here. Just
populate the list. The CameraFilesystem will get updated by libgphoto2.
(camera_file_get_info): Renamed to
(get_info_func): New
(camera_file_set_info): Removed. Not supported.
(camera_init): Correctly gp_filesystem_set_list_funcs and
gp_filesystem_set_info_funcs so that the CameraFilesystem has full
control over the information
* include/gphoto2-list.h:
* libgphoto2/list.c: (gp_list_populate): New. Please use this
function to populate the list passed to you on file_list_func.
* libgphoto2/filesys.c: Don't remove the dirty flag on folders
on gp_filesystem_append (thanks, Dan!)
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2136 67ed7778-7388-44ab-90cf-0a291f65f57c
* camlibs/template/*: Updated
* include/gphoto2-camera.h: Add a note about c_folder_list_folders and
c_folder_list_files not to be used. Same with [get,set]_info.
* include/gphoto2-filesys.h: Remove an uneeded typedef.
* libgphoto2/filesys.c: Here, too.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2134 67ed7778-7388-44ab-90cf-0a291f65f57c
* gphoto2-library.h: Clean up this file.
* gphoto2-camera.h: We don't need camera_init, camera_abilities, and
camera_id here. That belongs into gphoto2-library.h.
* libgphoto2/camera.c:
* libgphoto2/core.c: Adapt
* camlibs/*: Move camera_init to the bottom of the file. Camera
driver authors, could you please declare the functions above static?
Except camera_id and camera_abilities.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2124 67ed7778-7388-44ab-90cf-0a291f65f57c
* camlibs/sierra/*:
* camlibs/directory/directory.c (camera_folder_list_folders),
(camera_folder_list_files), (camera_file_[get,set]_info): Removed.
Use the camera->fs. Use camera->port.
* camlibs/*: camera->port->* -> camera->port_info->*
* include/gphoto2-camera.h:
* libgphoto2/camera.c: Open the port before accessing a camera,
close it after.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2115 67ed7778-7388-44ab-90cf-0a291f65f57c
* libgphoto2_port/gp_port.c: if (!dev) return (GP_OK) instead of
accessing dev->whatever... Plus, set the timeout on gp_port_open.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2114 67ed7778-7388-44ab-90cf-0a291f65f57c
* include/gphoto2-file.h: Add a note about the crappy API
* include/gphoto2-abilities-list.h:
* libgphoto2/abilities-list.c:
* libgphoto2/core.c: Don't access the CameraAbilitiesList directly
any more.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2107 67ed7778-7388-44ab-90cf-0a291f65f57c
Patch from Fabrice Bellet <Fabrice.Bellet@creatis.insa-lyon.fr>:
* camlibs/sierra/library.[c,h]:
* camlibs/sierra/sierra.c: Use the new filesystem to cache file
information and for listing files/folders.
* include/gphoto2-file.h:
* libgphoto2/file.c (gp_file_detect_mime_type),
(gp_file_adjust_name_for_mime_type): New
* libgphoto2/camera.c: list->count = 0;
* libpghoto2/filesys.c (gp_filesystem_number): If this function is
called, scan the whole filesystem.
* tests/test-filesys.c: Test gp_filesystem_get_folder, too.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2102 67ed7778-7388-44ab-90cf-0a291f65f57c
Suggestion from Fabrice Bellet <Fabrice.Bellet@creatis.insa-lyon.fr>:
* include/gphoto2-port.h:
* usb/libusb.c (gp_port_usb_close): Don't report an error if the
device has already been closed. Correctly reuse the devices on
gp_port_open after gp_port_close.
* parallel/Makefile.am: Remove some references to libgpio.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2099 67ed7778-7388-44ab-90cf-0a291f65f57c
* include/gphoto2-filesys.h:
* libgphoto2/filesys.c: Cache folders and files, too (that is, only
query them from the camera when needed.
* frontends/command-line/main.c: Don't require a port with
"Directory Browse".
* camlibs/konica/library.c: Use the new functions
* camlibs/directory/directory.[c,h]: Use the filesystem
* tests/test-filesys.c: Demonstrate the use of the new functions.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2095 67ed7778-7388-44ab-90cf-0a291f65f57c