MTek-GDL
0.100.4-muffintrap
Loading...
Searching...
No Matches
include
mgdl
rocket
sync.h
1
/* Copyright (C) 2010 Contributors
2
* For conditions of distribution and use, see copyright notice in COPYING
3
*/
4
5
#ifndef SYNC_H
6
#define SYNC_H
7
8
#ifdef __cplusplus
9
extern
"C"
{
10
#endif
11
12
#include <stddef.h>
13
14
#ifdef __GNUC__
15
#define SYNC_DEPRECATED(msg) __attribute__ ((deprecated(msg)))
16
#elif defined(_MSC_VER)
17
#define SYNC_DEPRECATED(msg) __declspec(deprecated("is deprecated: " msg))
18
#else
19
#define SYNC_DEPRECATED(msg)
20
#endif
21
22
struct
sync_device
;
23
struct
sync_track
;
24
25
struct
sync_device
*sync_create_device(
const
char
*);
26
void
sync_destroy_device(
struct
sync_device
*);
27
28
#ifndef SYNC_PLAYER
29
struct
sync_cb
{
30
void (*pause)( int);
31
void (*set_row)(int);
32
int (*is_playing)();
33
};
34
#define SYNC_DEFAULT_PORT 1338
35
int
sync_tcp_connect(
struct
sync_device
*,
const
char
*,
unsigned
short
);
36
int
SYNC_DEPRECATED(
"use sync_tcp_connect instead"
) sync_connect(struct
sync_device
*, const
char
*,
unsigned
short
);
37
int
sync_update(struct
sync_device
*,
int
, struct
sync_cb
*);
38
int
sync_save_tracks(const struct
sync_device
*);
39
#endif
/* defined(SYNC_PLAYER) */
40
41
struct
sync_io_cb
{
42
void
*(*open)(
const
char
*filename,
const
char
*mode);
43
size_t (*read)(
void
*ptr,
size_t
size,
size_t
nitems,
void
*stream);
44
int (*close)(
void
*stream);
45
};
46
void
sync_set_io_cb(
struct
sync_device
*d,
struct
sync_io_cb
*cb);
47
48
const
struct
sync_track
*sync_get_track(
struct
sync_device
*,
const
char
*);
49
const
struct
sync_track
*sync_get_track_json(
const
char
*track_name,
const
char
*file_name);
50
51
double
sync_get_val(
const
struct
sync_track
*t,
double
row);
52
53
#ifdef __cplusplus
54
}
55
#endif
56
57
#endif
/* !defined(SYNC_H) */
sync_cb
Definition
sync.h:29
sync_device
Definition
device.h:69
sync_io_cb
Definition
sync.h:41
sync_track
Definition
track.h:26
Generated by
1.9.8