summaryrefslogtreecommitdiff
path: root/camlibs/mustek
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2006-03-31 19:40:29 +0000
committerMarcus Meissner <marcus@jet.franken.de>2006-03-31 19:40:29 +0000
commitf82c951cc8ee6d8b7bc8d7fdc8318fa4a9c55a1d (patch)
treee9daa3eba7f554bdab1aabb0e0d8d74c4c38ac54 /camlibs/mustek
parent25130120544e1366c878abc8a625a04bb2ff39ce (diff)
downloadlibgphoto2-f82c951cc8ee6d8b7bc8d7fdc8318fa4a9c55a1d.tar.gz
converted to fsfuncs.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8690 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/mustek')
-rw-r--r--camlibs/mustek/mdc800.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/camlibs/mustek/mdc800.c b/camlibs/mustek/mdc800.c
index 221efcf99..a51cfb09f 100644
--- a/camlibs/mustek/mdc800.c
+++ b/camlibs/mustek/mdc800.c
@@ -319,6 +319,16 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
return (GP_OK);
}
+static CameraFilesystemFuncs fsfuncs = {
+ .file_list_func = file_list_func,
+ .folder_list_func = folder_list_func,
+ .get_file_func = get_file_func,
+ .put_file_func = put_file_func,
+ .get_info_func = get_info_func,
+ .del_file_func = delete_file_func,
+ .delete_all_func = delete_all_func
+};
+
int
camera_init (Camera *camera, GPContext *context)
{
@@ -332,14 +342,7 @@ camera_init (Camera *camera, GPContext *context)
camera->functions->about = camera_about;
/* Now, tell the filesystem where to get lists, files and info */
- gp_filesystem_set_list_funcs (camera->fs, file_list_func,
- folder_list_func, camera);
- gp_filesystem_set_info_funcs (camera->fs, get_info_func, NULL,
- camera);
- gp_filesystem_set_file_funcs (camera->fs, get_file_func,
- delete_file_func, camera);
- gp_filesystem_set_folder_funcs (camera->fs, put_file_func,
- delete_all_func, NULL, NULL, camera);
+ gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera);
/* Configure port */
gp_port_set_timeout(camera->port,MDC800_DEFAULT_COMMAND_RETRY_DELAY);