Back to index

im-sdk  12.3.91
iml_fop.h
Go to the documentation of this file.
00001 /*
00002  * iml_fop.h: IIIMF iml file operation - public header file
00003  */
00004 
00005 #if !defined(IIIMF_IML_FOP_H)
00006 #define IIIMF_IML_FOP_H
00007 
00008 #include <dirent.h>
00009 #include <utime.h>
00010 #include <sys/types.h>
00011 #include <sys/stat.h>
00012 #include <sys/time.h>
00013 #include <sys/uio.h>
00014 
00015 #if defined(__cplusplus)
00016 extern "C" {
00017 #endif /* __cplusplus */
00018 
00019 typedef void *       (* iml_fop_get_function_t)(const char *);
00020 
00021 typedef void *       (* iml__fopc_create_t)(const char *, int , void *);
00022 typedef void  (* iml__fopc_free_t)(void *);
00023 
00024 typedef int   (* iml_fop_close_t)(void *, int);
00025 typedef int   (* iml_fop_creat_t)(void *, const char *, mode_t);
00026 typedef int   (* iml_fop_ftruncate_t)(void *, int, off_t);
00027 typedef off_t (* iml_fop_lseek_t)(void *, int, off_t, int);
00028 typedef int   (* iml_fop_open_t)(void *, const char *, int, ...);
00029 typedef ssize_t      (* iml_fop_read_t)(void *, int, void *, size_t);
00030 typedef int   (* iml_fop_truncate_t)(void *, const char *, off_t);
00031 typedef ssize_t      (* iml_fop_write_t)(void *, int, const void *, size_t);
00032 
00033 typedef int   (* iml_fop_link_t)(void *, const char *, const char *);
00034 typedef int   (* iml_fop_readlink_t)(void *,
00035                                    const char *, char *, size_t);
00036 typedef int   (* iml_fop_rename_t)(void *, const char *, const char *);
00037 typedef int   (* iml_fop_symlink_t)(void *, const char *, const char *);
00038 typedef int   (* iml_fop_unlink_t)(void *, const char *);
00039 
00040 typedef int   (* iml_fop_chmod_t)(void *, const char *, mode_t);
00041 typedef int   (* iml_fop_chown_t)(void *, const char *, uid_t, gid_t);
00042 typedef int   (* iml_fop_fchmod_t)(void *, int, mode_t);
00043 typedef int   (* iml_fop_fchown_t)(void *, int, uid_t, gid_t);
00044 typedef int   (* iml_fop_lchown_t)(void *, int, uid_t, gid_t);
00045 
00046 typedef int   (* iml_fop_utime_t)(void *,
00047                                 const char *, const struct utimbuf *);
00048 typedef int   (* iml_fop_utimes_t)(void *,
00049                                  const char *, const struct timeval *);
00050 
00051 typedef int   (* iml_fop_fstat_t)(void *, int, struct stat *);
00052 typedef int   (* iml_fop_lstat_t)(void *, const char *, struct stat *);
00053 typedef int   (* iml_fop_stat_t)(void *, const char *, struct stat *);
00054 
00055 typedef int   (* iml_fop_access_t)(void *, const char *, int);
00056 
00057 typedef int   (* iml_fop_closedir_t)(void *, DIR *);
00058 typedef DIR * (* iml_fop_opendir_t)(void *, const char *);
00059 typedef struct dirent *
00060               (* iml_fop_readdir_t)(void *, DIR *);
00061 typedef void  (* iml_fop_rewinddir_t)(void *, DIR *);
00062 typedef void  (* iml_fop_seekdir_t)(void *, DIR *, long int);
00063 typedef long int(* iml_fop_telldir_t)(void *, DIR *);
00064 
00065 typedef int   (* iml_fop_mkdir_t)(void *, const char *, mode_t);
00066 typedef int   (* iml_fop_rmdir_t)(void *, const char *);
00067 
00068 typedef int   (* iml_fop_fcntl_t)(void *, int, int, ...);
00069 
00070 #if defined(fop_not_defined)
00071 typedef ssize_t      (* iml_fop_readv_t)(void *,
00072                                 int, const struct iovec *, int);
00073 typedef ssize_t      (* iml_fop_writev_t)(void *, int,
00074                                  const struct iovec *, int);
00075 typedef long  (* iml_fop_fpathconf_t)(void *, int, int);
00076 typedef long  (* iml_fop_pathconf_t)(void *, const char *, int);
00077 #endif /* fop_not_defined */
00078 
00079 typedef struct _iml_fop_basic_fopset {
00080     iml_fop_close_t  fop_close;
00081     iml_fop_creat_t  fop_creat;
00082     iml_fop_ftruncate_t     fop_ftruncate;
00083     iml_fop_lseek_t  fop_lseek;
00084     iml_fop_open_t   fop_open;
00085     iml_fop_read_t   fop_read;
00086     iml_fop_truncate_t      fop_truncate;
00087     iml_fop_write_t  fop_write;
00088 
00089     iml_fop_link_t   fop_link;
00090     iml_fop_readlink_t      fop_readlink;
00091     iml_fop_rename_t fop_rename;
00092     iml_fop_symlink_t       fop_symlink;
00093     iml_fop_unlink_t fop_unlink;
00094 
00095     iml_fop_chmod_t  fop_chmod;
00096     iml_fop_chown_t  fop_chown;
00097     iml_fop_fchmod_t fop_fchmod;
00098     iml_fop_fchown_t fop_fchown;
00099     iml_fop_lchown_t fop_lchown;
00100 
00101     iml_fop_utime_t  fop_utime;
00102     iml_fop_utimes_t fop_utimes;
00103 
00104     iml_fop_fstat_t  fop_fstat;
00105     iml_fop_lstat_t  fop_lstat;
00106     iml_fop_stat_t   fop_stat;
00107     iml_fop_access_t fop_access;
00108 
00109     iml_fop_closedir_t      fop_closedir;
00110     iml_fop_opendir_t       fop_opendir;
00111     iml_fop_readdir_t       fop_readdir;
00112     iml_fop_rewinddir_t     fop_rewinddir;
00113     iml_fop_seekdir_t       fop_seekdir;
00114     iml_fop_telldir_t       fop_telldir;
00115 
00116     iml_fop_mkdir_t  fop_mkdir;
00117     iml_fop_rmdir_t  fop_rmdir;
00118 
00119     iml_fop_fcntl_t  fop_fcntl;
00120 } iml_fop_basic_fopset_t;
00121 
00122 
00123 #define IML_FOPC_TYPE_LE    (0)
00124 #define IML_FOPC_TYPE_DESKTOP      (1)
00125 
00126 /* compatibility */
00127 #define IML_NSC_TYPE_LE            (0)
00128 #define IML_NSC_TYPE_DESKTOP       (1)
00129 
00130 #if defined(__cplusplus)
00131 }
00132 #endif /* __cplusplus */
00133 
00134 #endif /* !IIIMF_IML_FOP_H */
00135 
00136 /* Local Variables: */
00137 /* c-file-style: "iiim-project" */
00138 /* End: */