diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2006-03-31 21:43:18 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2006-03-31 21:43:18 +0000 |
commit | 22ce3b452b2c7110405c11a723559ce3594e883a (patch) | |
tree | e84a2cdc45e58da5891d082b1155aeb0daa76ce4 /camlibs/stv0674 | |
parent | 6ec5c187fff1e0887fd4d8d6b0052d9184ad718f (diff) | |
download | libgphoto2-22ce3b452b2c7110405c11a723559ce3594e883a.tar.gz |
converted more camlibs to fsfuncs.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8699 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/stv0674')
-rw-r--r-- | camlibs/stv0674/stv0674.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/camlibs/stv0674/stv0674.c b/camlibs/stv0674/stv0674.c index ab4444b4b..74e77186c 100644 --- a/camlibs/stv0674/stv0674.c +++ b/camlibs/stv0674/stv0674.c @@ -218,6 +218,12 @@ delete_all_func (CameraFilesystem *fs, const char* folder, void *data, return stv0674_delete_all(camera->port); } +static CameraFilesystemFuncs fsfuncs = { + .file_list_func = file_list_func, + .get_file_func = get_file_func, + .delete_all_func = delete_all_func +}; + int camera_init (Camera *camera, GPContext *context) { GPPortSettings settings; @@ -250,14 +256,8 @@ int camera_init (Camera *camera, GPContext *context) gp_context_error (context, _("Could not apply USB settings")); return ret; } - /* Set up the filesystem */ - gp_filesystem_set_list_funcs (camera->fs, file_list_func, NULL, camera); - gp_filesystem_set_file_funcs (camera->fs, get_file_func, NULL, camera); - - gp_filesystem_set_folder_funcs (camera->fs, NULL, delete_all_func, NULL, NULL, camera); - + gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera); /* test camera */ - ret = stv0674_ping(camera->port); - return (ret); + return stv0674_ping(camera->port); } |