blob: ef4952bed3e4450a0fbd1fdaac85fb9a88751d8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
/*@@
@header ioutil_AdvertisedFiles.h
@date Tue 19 Sep 2000
@author Thomas Radke
@desc
Structures and function prototypes for advertising files.
@history
@endhistory
@version $Header$
@@*/
#ifndef _IOUTIL_ADVERTISED_FILES_H_
#define _IOUTIL_ADVERTISED_FILES_H_
#ifdef __cplusplus
extern "C"
{
#endif
/* structure describing an advertised file
It contains pointer to strings holding
- the thorn which created the file
- the variable name the file contents data belongs to
- the MIME type for the file format used
- a short slice string indication the dimensionality of the data
- an arbitrary additional description of the file contents */
typedef struct
{
const char *thorn;
const char *varname;
const char *mimetype;
const char *slice;
const char *description;
} ioAdvertisedFileDesc;
/* structure containing function pointers for handling with advertised files
For the moment it contains only a registration routine for new files to
be advertised. In the future we might also want something like
unadvertising, or notification when the contents of the file changed. */
typedef struct
{
int (*advertise) (const cGH *GH,
const char *filename,
const ioAdvertisedFileDesc *description);
} ioAdvertisedFileListenerCallbacks;
/* register a new listener with its own callbacks for file advertising */
int IOUtil_RegisterAdvertisedFileListener (const cGH *GH,
const char *listener,
const ioAdvertisedFileListenerCallbacks *callbacks);
/* advertise a file */
int IOUtil_AdvertiseFile (const cGH *GH,
const char *filename,
const ioAdvertisedFileDesc *desc);
#ifdef __cplusplus
}
#endif
#endif /* _IOUTIL_ADVERTISED_FILES_H_ */
|