(Metux) autogen.sh: not running ./configure anymore (breaks certain distro builders)
[mirror-ossqm-audiofile.git] / libaudiofile / af_vfs.h
blobdbbab7c28718d302e2bd34490add817f870fabd5
1 /*
2 Audio File Library
3 Copyright (C) 1999, Elliot Lee <sopwith@redhat.com>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307 USA.
22 af_vfs.h
24 Virtual file operations for the Audio File Library.
27 #ifndef AUDIOFILE_VFS_H
28 #define AUDIOFILE_VFS_H 1
30 #include <stdio.h>
31 #include <audiofile.h>
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 struct _AFvirtualfile
39 ssize_t (*read) (AFvirtualfile *vfile, void *data, size_t nbytes);
40 long (*length) (AFvirtualfile *vfile);
41 ssize_t (*write) (AFvirtualfile *vfile, const void *data, size_t nbytes);
42 void (*destroy)(AFvirtualfile *vfile);
43 long (*seek) (AFvirtualfile *vfile, long offset, int is_relative);
44 long (*tell) (AFvirtualfile *vfile);
46 void *closure;
49 AFvirtualfile *af_virtual_file_new (void);
50 AFvirtualfile *af_virtual_file_new_for_file (FILE *fh);
51 void af_virtual_file_destroy (AFvirtualfile *vfile);
53 size_t af_fread (void *data, size_t size, size_t nmemb, AFvirtualfile *vfile);
54 size_t af_fwrite (const void *data, size_t size, size_t nmemb, AFvirtualfile *vfile);
55 int af_fclose (AFvirtualfile *vfile);
56 long af_flength (AFvirtualfile *vfile);
57 int af_fseek (AFvirtualfile *vfile, long offset, int whence);
58 long af_ftell (AFvirtualfile *vfile);
60 #ifdef __cplusplus
62 #endif
64 #endif