summaryrefslogtreecommitdiff
path: root/gphoto2
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2009-02-16 08:09:49 +0000
committerMarcus Meissner <marcus@jet.franken.de>2009-02-16 08:09:49 +0000
commitbb3d18289e752db9dff5f7e60e5368f46bdd1a8a (patch)
tree8b96a77cc35ca978600cbe450a0503d3dd6dc5aa /gphoto2
parent2d0eae7c878f9ee870df185d27e0fafd120a4b42 (diff)
downloadlibgphoto2-bb3d18289e752db9dff5f7e60e5368f46bdd1a8a.tar.gz
Batch commit from weekend work:
- removed "type" from CameraFile handling: - all put_file functions and hooks get "type" as argument now - added type to the set_file_info_noop call - started removal of "name" from CameraFile - generate new filename from original filename + camerafile type + mimetype - new gp_camera_autodetect() helper function - adapted all drivers. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11818 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'gphoto2')
-rw-r--r--gphoto2/gphoto2-camera.h3
-rw-r--r--gphoto2/gphoto2-file.h5
-rw-r--r--gphoto2/gphoto2-filesys.h9
3 files changed, 11 insertions, 6 deletions
diff --git a/gphoto2/gphoto2-camera.h b/gphoto2/gphoto2-camera.h
index 2d19bc215..d79e5044f 100644
--- a/gphoto2/gphoto2-camera.h
+++ b/gphoto2/gphoto2-camera.h
@@ -289,10 +289,12 @@ int gp_camera_get_port_speed (Camera *camera);
/** \name Initialization
* @{
*/
+int gp_camera_autodetect (CameraList *list, GPContext *context);
int gp_camera_init (Camera *camera, GPContext *context);
int gp_camera_exit (Camera *camera, GPContext *context);
/**@}*/
+
/** \name Operations on cameras
@@ -337,6 +339,7 @@ int gp_camera_folder_delete_all (Camera *camera, const char *folder,
GPContext *context);
int gp_camera_folder_put_file (Camera *camera,
const char *folder, const char *filename,
+ CameraFileType type,
CameraFile *file, GPContext *context);
int gp_camera_folder_make_dir (Camera *camera, const char *folder,
const char *name, GPContext *context);
diff --git a/gphoto2/gphoto2-file.h b/gphoto2/gphoto2-file.h
index 7a65fc125..4ee887fbd 100644
--- a/gphoto2/gphoto2-file.h
+++ b/gphoto2/gphoto2-file.h
@@ -2,6 +2,7 @@
* \brief Abstracted gphoto2 file operations.
*
* \author Copyright 2000 Scott Fritzinger
+ * \author Copyright 2008-2009 Marcus Meissner
*
* \note
* This library is free software; you can redistribute it and/or
@@ -132,14 +133,12 @@ int gp_file_get_name (CameraFile *file, const char **name);
int gp_file_set_mime_type (CameraFile *file, const char *mime_type);
int gp_file_get_mime_type (CameraFile *file, const char **mime_type);
-int gp_file_set_type (CameraFile *file, CameraFileType type);
-int gp_file_get_type (CameraFile *file, CameraFileType *type);
-
int gp_file_set_mtime (CameraFile *file, time_t mtime);
int gp_file_get_mtime (CameraFile *file, time_t *mtime);
int gp_file_detect_mime_type (CameraFile *file);
int gp_file_adjust_name_for_mime_type (CameraFile *file);
+int gp_file_get_name_by_type (CameraFile *file, const char *basename, CameraFileType type, char **newname);
int gp_file_append (CameraFile*, const char *data,
unsigned long int size);
diff --git a/gphoto2/gphoto2-filesys.h b/gphoto2/gphoto2-filesys.h
index 6633c93c8..cf4955a94 100644
--- a/gphoto2/gphoto2-filesys.h
+++ b/gphoto2/gphoto2-filesys.h
@@ -2,6 +2,7 @@
* \brief Filesystem related operations and declarations.
*
* \author Copyright 2000 Scott Fritzinger
+ * \author Copyright 2008-2009 Marcus Meissner
*
* \note
* Contributions:
@@ -243,6 +244,7 @@ int gp_filesystem_set_info_noop (CameraFilesystem *fs,
CameraFileInfo info, GPContext *context);
int gp_filesystem_set_file_noop (CameraFilesystem *fs,
const char *folder, const char *filename,
+ CameraFileType type,
CameraFile *file, GPContext *context);
int gp_filesystem_delete_file_noop (CameraFilesystem *fs, const char *folder,
const char *filename, GPContext *context);
@@ -319,7 +321,9 @@ int gp_filesystem_delete_file (CameraFilesystem *fs, const char *folder,
typedef int (*CameraFilesystemPutFileFunc) (CameraFilesystem *fs,
const char *folder,
const char *filename,
- CameraFile *file, void *data,
+ CameraFileType type,
+ CameraFile *file,
+ void *data,
GPContext *context);
typedef int (*CameraFilesystemDeleteAllFunc) (CameraFilesystem *fs,
const char *folder, void *data,
@@ -357,7 +361,6 @@ struct _CameraFilesystemFuncs {
CameraFilesystemDirFunc remove_dir_func;
CameraFilesystemGetFileFunc get_file_func;
CameraFilesystemDeleteFileFunc del_file_func;
-
CameraFilesystemStorageInfoFunc storage_info_func;
/* for later use. Remove one if you add a new function */
@@ -367,7 +370,7 @@ int gp_filesystem_set_funcs (CameraFilesystem *fs,
CameraFilesystemFuncs *funcs,
void *data);
int gp_filesystem_put_file (CameraFilesystem *fs, const char *folder, const char *filename,
- CameraFile *file, GPContext *context);
+ CameraFileType type, CameraFile *file, GPContext *context);
int gp_filesystem_delete_all (CameraFilesystem *fs, const char *folder,
GPContext *context);
int gp_filesystem_make_dir (CameraFilesystem *fs, const char *folder,