Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

Classes | Typedefs | Enumerations | Functions

gphoto2-filesys.h File Reference

Filesystem related operations and declarations. More...

#include <time.h>
#include <gphoto2/gphoto2-context.h>
#include <gphoto2/gphoto2-list.h>
#include <gphoto2/gphoto2-file.h>
Include dependency graph for gphoto2-filesys.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _CameraFileInfo
 File information structure. More...
struct  _CameraFileInfoAudio
 File information of an audio file. More...
struct  _CameraFileInfoFile
 File information of a regular file. More...
struct  _CameraFileInfoPreview
 File information of a preview file. More...
struct  _CameraFilesystemFuncs
struct  _CameraStorageInformation
 Storage information structue. More...

Typedefs

typedef struct _CameraFileInfo CameraFileInfo
 File information structure.
typedef struct _CameraFileInfoAudio CameraFileInfoAudio
 File information of an audio file.
typedef struct _CameraFileInfoFile CameraFileInfoFile
 File information of a regular file.
typedef struct
_CameraFileInfoPreview 
CameraFileInfoPreview
 File information of a preview file.
typedef struct _CameraFilesystem CameraFilesystem
 Filesystem structure, only exposed to camera drivers.
typedef int(* CameraFilesystemDeleteAllFunc )(CameraFilesystem *fs, const char *folder, void *data, GPContext *context)
typedef int(* CameraFilesystemDeleteFileFunc )(CameraFilesystem *fs, const char *folder, const char *filename, void *data, GPContext *context)
typedef int(* CameraFilesystemDirFunc )(CameraFilesystem *fs, const char *folder, const char *name, void *data, GPContext *context)
typedef struct
_CameraFilesystemFuncs 
CameraFilesystemFuncs
typedef int(* CameraFilesystemGetFileFunc )(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileType type, CameraFile *file, void *data, GPContext *context)
typedef int(* CameraFilesystemGetInfoFunc )(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo *info, void *data, GPContext *context)
typedef int(* CameraFilesystemListFunc )(CameraFilesystem *fs, const char *folder, CameraList *list, void *data, GPContext *context)
typedef int(* CameraFilesystemPutFileFunc )(CameraFilesystem *fs, const char *folder, CameraFile *file, void *data, GPContext *context)
typedef int(* CameraFilesystemSetInfoFunc )(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo info, void *data, GPContext *context)
typedef int(* CameraFilesystemStorageInfoFunc )(CameraFilesystem *fs, CameraStorageInformation **, int *nrofstorageinformations, void *data, GPContext *context)
typedef struct
_CameraStorageInformation 
CameraStorageInformation
 Storage information structue.

Enumerations

enum  CameraFileInfoFields {
  GP_FILE_INFO_NONE = 0, GP_FILE_INFO_TYPE = 1 << 0, GP_FILE_INFO_NAME = 1 << 1, GP_FILE_INFO_SIZE = 1 << 2,
  GP_FILE_INFO_WIDTH = 1 << 3, GP_FILE_INFO_HEIGHT = 1 << 4, GP_FILE_INFO_PERMISSIONS = 1 << 5, GP_FILE_INFO_STATUS = 1 << 6,
  GP_FILE_INFO_MTIME = 1 << 7, GP_FILE_INFO_ALL = 0xFF
}
 

Bitmask on what fields are set in the CameraFileInfo structure.

More...
enum  CameraFilePermissions { GP_FILE_PERM_NONE = 0, GP_FILE_PERM_READ = 1 << 0, GP_FILE_PERM_DELETE = 1 << 1, GP_FILE_PERM_ALL = 0xFF }
 

Bitmask containing the file permission flags.

More...
enum  CameraFileStatus { GP_FILE_STATUS_NOT_DOWNLOADED, GP_FILE_STATUS_DOWNLOADED }
 

Possible status values.

More...
enum  CameraStorageAccessType { GP_STORAGEINFO_AC_READWRITE = 0, GP_STORAGEINFO_AC_READONLY = 1, GP_STORAGEINFO_AC_READONLY_WITH_DELETE = 2 }
 

Storage access modes.

More...
enum  CameraStorageFilesystemType { GP_STORAGEINFO_FST_UNDEFINED = 0, GP_STORAGEINFO_FST_GENERICFLAT = 1, GP_STORAGEINFO_FST_GENERICHIERARCHICAL = 2, GP_STORAGEINFO_FST_DCF = 3 }
 

Filesystem hierarchy types.

More...
enum  CameraStorageInfoFields {
  GP_STORAGEINFO_BASE = (1<<0), GP_STORAGEINFO_LABEL = (1<<1), GP_STORAGEINFO_DESCRIPTION = (1<<2), GP_STORAGEINFO_ACCESS = (1<<3),
  GP_STORAGEINFO_STORAGETYPE = (1<<4), GP_STORAGEINFO_FILESYSTEMTYPE = (1<<5), GP_STORAGEINFO_MAXCAPACITY = (1<<6), GP_STORAGEINFO_FREESPACEKBYTES = (1<<7),
  GP_STORAGEINFO_FREESPACEIMAGES = (1<<8)
}
 

Storage information flags.

More...
enum  CameraStorageType {
  GP_STORAGEINFO_ST_UNKNOWN = 0, GP_STORAGEINFO_ST_FIXED_ROM = 1, GP_STORAGEINFO_ST_REMOVABLE_ROM = 2, GP_STORAGEINFO_ST_FIXED_RAM = 3,
  GP_STORAGEINFO_ST_REMOVABLE_RAM = 4
}
 

Hardware storage types.

More...

Functions

int gp_filesystem_append (CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
 Append a file to a folder in a filesystem.
int gp_filesystem_count (CameraFilesystem *fs, const char *folder, GPContext *context)
 Count files a folder of a filesystem.
int gp_filesystem_delete_all (CameraFilesystem *fs, const char *folder, GPContext *context)
 Delete all files in specified folder.
int gp_filesystem_delete_file (CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
 Delete a file from a folder.
int gp_filesystem_delete_file_noop (CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
 Delete a virtal file from a folder in the filesystem.
int gp_filesystem_dump (CameraFilesystem *fs)
 Dump the current filesystem.
int gp_filesystem_free (CameraFilesystem *fs)
 Free filesystem struct.
int gp_filesystem_get_file (CameraFilesystem *fs, const char *folder, const char *filename, CameraFileType type, CameraFile *file, GPContext *context)
 Get file data from the filesystem.
int gp_filesystem_get_folder (CameraFilesystem *fs, const char *filename, const char **folder, GPContext *context)
 Search a folder that contains a given filename.
int gp_filesystem_get_info (CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo *info, GPContext *context)
 Get information about the specified file.
int gp_filesystem_get_storageinfo (CameraFilesystem *fs, CameraStorageInformation **, int *nrofstorageinformations, GPContext *context)
 Get the storage information about this filesystem.
int gp_filesystem_list_files (CameraFilesystem *fs, const char *folder, CameraList *list, GPContext *context)
 Get the list of files in a folder.
int gp_filesystem_list_folders (CameraFilesystem *fs, const char *folder, CameraList *list, GPContext *context)
 List all subfolders within a filesystem folder.
int gp_filesystem_make_dir (CameraFilesystem *fs, const char *folder, const char *name, GPContext *context)
 Create a subfolder within a folder.
int gp_filesystem_name (CameraFilesystem *fs, const char *folder, int filenumber, const char **filename, GPContext *context)
 Lookup the filename of an indexed file within a folder.
int gp_filesystem_new (CameraFilesystem **fs)
 Create a new filesystem struct.
int gp_filesystem_number (CameraFilesystem *fs, const char *folder, const char *filename, GPContext *context)
 Get the index of a file in specified folder.
int gp_filesystem_put_file (CameraFilesystem *fs, const char *folder, CameraFile *file, GPContext *context)
 Upload a file to a folder on the device filesystem.
int gp_filesystem_remove_dir (CameraFilesystem *fs, const char *folder, const char *name, GPContext *context)
 Remove a subfolder from within a folder.
int gp_filesystem_reset (CameraFilesystem *fs)
 Clear the filesystem.
int gp_filesystem_set_file_funcs (CameraFilesystem *fs, CameraFilesystemGetFileFunc get_file_func, CameraFilesystemDeleteFileFunc del_file_func, void *data)
 Set camera filesystem file related functions.
int gp_filesystem_set_file_noop (CameraFilesystem *fs, const char *folder, CameraFile *file, GPContext *context)
 Attach file content to a specified file.
int gp_filesystem_set_folder_funcs (CameraFilesystem *fs, CameraFilesystemPutFileFunc put_file_func, CameraFilesystemDeleteAllFunc delete_all_func, CameraFilesystemDirFunc make_dir_func, CameraFilesystemDirFunc remove_dir_func, void *data)
 Set folder related functions of the filesystem.
int gp_filesystem_set_funcs (CameraFilesystem *fs, CameraFilesystemFuncs *funcs, void *data)
 Set all filesystem related function pointers.
int gp_filesystem_set_info (CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo info, GPContext *context)
 Set information about a file.
int gp_filesystem_set_info_funcs (CameraFilesystem *fs, CameraFilesystemGetInfoFunc get_info_func, CameraFilesystemSetInfoFunc set_info_func, void *data)
 Set file information functions.
int gp_filesystem_set_info_noop (CameraFilesystem *fs, const char *folder, CameraFileInfo info, GPContext *context)
 Store the file information in the virtual fs.
int gp_filesystem_set_list_funcs (CameraFilesystem *fs, CameraFilesystemListFunc file_list_func, CameraFilesystemListFunc folder_list_func, void *data)
 Set the functions to list folders and files.

Detailed Description

Filesystem related operations and declarations.

Author:
Copyright 2000 Scott Fritzinger
Note:
Contributions: Lutz Müller <lutz@users.sf.net> (2001)
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file gphoto2-filesys.h.


Generated by  Doxygen 1.6.0   Back to index