Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
gslfilehash.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __GSL_FILE_HASH_H__
3 #define __GSL_FILE_HASH_H__
4 
5 #include <bse/gsldefs.hh>
6 #include <bse/gslcommon.hh>
7 
8 
9 
10 /* --- typedefs & structures --- */
11 typedef struct {
12  gchar *file_name;
13  GTime mtime;
14  GslLong n_bytes;
15  /*< private >*/
16  GslLong cpos;
17  Bse::Mutex mutex;
18  gint fd;
19  guint ocount;
20  GslLong zoffset;
21 } GslHFile;
22 typedef struct {
23  GslHFile *hfile;
24  GslLong offset;
25 } GslRFile;
26 
27 
28 /* --- GslHFile API --- */
29 GslHFile* gsl_hfile_open (const gchar *file_name);
30 GslLong gsl_hfile_pread (GslHFile *hfile,
31  GslLong offset,
32  GslLong n_bytes,
33  gpointer bytes);
34 GslLong gsl_hfile_zoffset (GslHFile *hfile);
35 void gsl_hfile_close (GslHFile *hfile);
36 
37 
38 /* --- GslRFile API --- */
39 GslRFile* gsl_rfile_open (const gchar *file_name);
40 gchar* gsl_rfile_name (GslRFile *rfile);
41 GslLong gsl_rfile_pread (GslRFile *rfile,
42  GslLong offset,
43  GslLong n_bytes,
44  gpointer bytes);
45 GslLong gsl_rfile_read (GslRFile *rfile,
46  GslLong n_bytes,
47  gpointer bytes);
48 GslLong gsl_rfile_seek_set (GslRFile *rfile,
49  GslLong offset);
50 GslLong gsl_rfile_position (GslRFile *rfile);
51 GslLong gsl_rfile_length (GslRFile *rfile);
52 void gsl_rfile_close (GslRFile *rfile);
53 
54 
55 #endif /* __GSL_FILE_HASH_H__ */
GslLong gsl_rfile_length(GslRFile *rfile)
Definition: gslfilehash.cc:375
Definition: gslfilehash.hh:11
Definition: gslfilehash.hh:22
void gsl_rfile_close(GslRFile *rfile)
Definition: gslfilehash.cc:440
void gsl_hfile_close(GslHFile *hfile)
Definition: gslfilehash.cc:124
GslLong gsl_rfile_pread(GslRFile *rfile, GslLong offset, GslLong n_bytes, gpointer bytes)
Definition: gslfilehash.cc:398
GslLong gsl_hfile_zoffset(GslHFile *hfile)
Definition: gslfilehash.cc:238
GslHFile * gsl_hfile_open(const gchar *file_name)
Definition: gslfilehash.cc:73
gchar * gsl_rfile_name(GslRFile *rfile)
Definition: gslfilehash.cc:320
GslLong gsl_hfile_pread(GslHFile *hfile, GslLong offset, GslLong n_bytes, gpointer bytes)
Definition: gslfilehash.cc:166
GslLong gsl_rfile_read(GslRFile *rfile, GslLong n_bytes, gpointer bytes)
Definition: gslfilehash.cc:419
GslLong gsl_rfile_position(GslRFile *rfile)
Definition: gslfilehash.cc:359
GslRFile * gsl_rfile_open(const gchar *file_name)
Definition: gslfilehash.cc:297
GslLong gsl_rfile_seek_set(GslRFile *rfile, GslLong offset)
Definition: gslfilehash.cc:337