* libgphoto2/camera.c (gp_camera_list_folders), (gp_camera_list_files): Return the result instead of GP_OK if anything goes wrong
* libgphoto2/filesys.c: Check if path to folder is absolute. If not,
return GP_ERROR_PATH_NOT_ABSOLUTE.
* libgphoto2/result.c:
* include/gphoto2-result.h: GP_ERROR_PATH_NOT_ABSOLUTE: New error.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2221 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
* 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
* 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
* include/gphoto2-filesys.h:
* libgphoto2/filesys.c: Implement caching for file information.
* tests/test-filesys.c: Test it here.
* camlibs/konica/library.c: Use gp_filesystem_[get,set]_info. This
stuff is really incredibly fast.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2090 67ed7778-7388-44ab-90cf-0a291f65f57c
* include/gphoto2-core.h:
* libgphoto2/core.c (gp_autodetect): Revert an API change I committed
by error. Sorry.
* libgphoto2/camera.c:
* frontends/command-line/main.c: Here too.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2085 67ed7778-7388-44ab-90cf-0a291f65f57c
* camlibs/dimera3500.c: Move the raw->pnm conversion ...
* include/gphoto2-file.h:
* libgphto2/file.c: ... here. Now, other camera drivers can use this,
too.
* include/gphoto2-core.c:
* libgphoto2/core.c: Small change to make the API consistent.
* frontends/command-line/main.c: Add possibility for download of raw
data.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2077 67ed7778-7388-44ab-90cf-0a291f65f57c
* include/gphoto2-file.h:
* include/gphoto2-library.h:
* include/gphoto2-camera.h: Support for raw data.
* libpghoto2/file.c: Adjust to above changes.
* libgphoto2/frontend.c: Kill a warning.
* libgphoto2/libgphoto-2.0.pc.in: CFlags -> Cflags
* libgphoto2/widget.c: Include gphoto2-result.h instead of gphoto2.h
* camlibs/*: Prepare support for download of raw data. Remove lots of
redundant code (people just copied & pasted the code for file_get
and file_get_preview...). I hope everything works as it did before.
* frontend/command-line/*: Prepare support for download of raw data
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2072 67ed7778-7388-44ab-90cf-0a291f65f57c
* libgphoto2/abilities.c:
* include/gphoto2-abilities.h: Let gp_abilities_new return an error
code. This was the last one.
* camlibs/*: Adjust to above change.
* camlibs/canon/canon.c: #if 0 some code to kill some warnings
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2068 67ed7778-7388-44ab-90cf-0a291f65f57c
* include/gphoto2-abilities-list.h: Make gp_abilities_list_new
return an error code. Introduce gp_abilities_list_sort and
gp_abilities_list_count.
* libgphoto2/abilities-list.c: See above.
* libgphoto2/core.c: Sorting code now is in abilibies-list.
* libgphoto2/file.c: "image/x-png" -> "image/png"
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2067 67ed7778-7388-44ab-90cf-0a291f65f57c
* camlibs/agfa-cl18/agfa.c: Use gp_file_* instead of directly
accessing the struct.
* camlibs/barbie/barbie.c: And here.
* camlibs/directory/directory.c: And here.
* camlibs/konica/library.c: And here.
* camlibs/sierra/sierra.c: And here.
* camlibs/panasonic/l859/l859.c: And here.
* camlibs/dimera/dimera3500.c: And here.
* frontends/command-line/main.c: And here.
* libgphoto2/camera.c: And here.
* libgphoto2/file.c:
* include/gphoto2-file.h: Introduce some more gp_file_* functions.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2059 67ed7778-7388-44ab-90cf-0a291f65f57c
* doc/OVERVIEW: Cruft, not up to date, incorrect. Removed.
* doc/NOTES: Redundant. Removed.
* libgphoto2/camera.c: Be nice to frontend-writers, call gp_init if
it hasn't been called yet on gp_camera_new.
* libgphoto2/core.c: Same here with gp_autodetect and gp_camera_count.
* include/gphoto2-core.h: Kill compile warning
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2025 67ed7778-7388-44ab-90cf-0a291f65f57c
* README: Add notice about USB Mass Storage cameras.
* include/*:
* libgphoto2/*: Major cleanup - add licence notice to begin of each
file, remove unused files/functions, ...
* camlibs/konica/Makefile.am: There's no ChangeLog here...
* tests/test-gphoto2.c: Adjust headers
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2003 67ed7778-7388-44ab-90cf-0a291f65f57c
* include/gphoto2-camera.h:
* include/gphoto2-file.h:
* include/gphoto2-widget.h: Sort some stuff, put in LGPL notice.
* libgphoto2/widget.c: Hide CameraWidget internals here. No need to
publish all that stuff.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2002 67ed7778-7388-44ab-90cf-0a291f65f57c
* include/gphoto2-datatypes.h: Move the declaration of the lists to ...
* include/gphoto2-lists.h: ... here. This is a first step towards
cleaning up the include-mess. Realized that CameraListType isn't
needed at all - removed.
* include/gphoto2-filesys.h: Hide the actual contents of
the CameraFilesystem ...
* libgphoto2/filesys.c ... here. The normal user doesn't need to
know what's inside.
* libgphoto2/core.c:
* libgphoto2/lists.c:
* camlibs/*: Reflect above changes
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2001 67ed7778-7388-44ab-90cf-0a291f65f57c
* camlibs/sierra/library.[c,h]: (do_capture): Return the right location
of the picture (on my camera, it is in /DCIM/100OLYMP)
(sierra_file_count): Move that function into ...
* camlibs/sierra/sierra.c: (update_fs_for_folder): New. Check the
contents of the camera once at the beginning (init), then don't access
the card anymore.
(camera_init): Populate the filesystem
(camera_folder_list_files): Use gp_filesystem_list_files
(camera_folder_list_folders): Use gp_filesystem_list_folders
(camera_file_get_info): The thumbnails aren't in quicktime format
(camera_capture): Add the picture to the filesystem
* include/gphoto2-filesys.h:
* libgphoto2/filesys.c: (gp_filesystem_append): Allow filename == NULL
for appending just folders
(gp_filesystem_dump): New
(gp_filesystem_list_files): New
(gp_filesystem_list_folders): New
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@1973 67ed7778-7388-44ab-90cf-0a291f65f57c