Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_filesystem_set_info_noop ( CameraFilesystem fs,
const char *  folder,
CameraFileInfo  info,
GPContext context 
)

Store the file information in the virtual fs.

Parameters:
fs a CameraFilesystem
folder the foldername
info the CameraFileInfo to store
context a GPContext
In contrast to gp_filesystem_set_info, gp_filesystem_set_info_noop will only change the file information in the fs. Typically, camera drivers will use this function in case they get file information "for free" on gp_camera_capture or gp_camera_folder_list_files.

Returns:
a gphoto2 error code

Definition at line 2339 of file gphoto2-filesys.c.

References CHECK_NULL, _CameraFileInfo::file, _CameraFilesystem::folder, gp_filesystem_number(), and _CameraFileInfoFile::name.

{
      int x, y;

      CHECK_NULL (fs && folder);
      CC (context);
      CA (folder, context);

      /* Search folder and file */
      CR (x = gp_filesystem_folder_number (fs, folder, context));
      CR (y = gp_filesystem_number (fs, folder, info.file.name, context));

      memcpy (&fs->folder[x].file[y].info, &info, sizeof (CameraFileInfo));
      fs->folder[x].file[y].info_dirty = 0;

      return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index