1 /*
2  * vfs_async.c
3  * Copyright 2010 Ariadne Conill
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  *    this list of conditions, and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  *    this list of conditions, and the following disclaimer in the documentation
13  *    provided with the distribution.
14  *
15  * This software is provided "as is" and without any warranty, express or
16  * implied. In no event shall the authors be liable for any damages arising from
17  * the use of this software.
18  */
19 
20 #ifndef LIBAUDCORE_VFS_ASYNC_H
21 #define LIBAUDCORE_VFS_ASYNC_H
22 
23 #include <functional>
24 #include <libaudcore/index.h>
25 
26 typedef std::function<void(const char * filename, const Index<char> & buf)>
27     VFSConsumer2;
28 
29 typedef void (*VFSConsumer)(const char * filename, const Index<char> & buf,
30                             void * user);
31 
32 void vfs_async_file_get_contents(const char * filename, VFSConsumer2 cons_f);
33 
34 void vfs_async_file_get_contents(const char * filename, VFSConsumer cons_f,
35                                  void * user) __attribute__((deprecated));
36 
37 #endif
38