port from perforce
This commit is contained in:
44
nordlicht2014-intro/3rdparty/modified-rocket/sync.h
vendored
Normal file
44
nordlicht2014-intro/3rdparty/modified-rocket/sync.h
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/* Copyright (C) 2010 Erik Faye-Lund and Egbert Teeselink
|
||||
* For conditions of distribution and use, see copyright notice in COPYING
|
||||
*/
|
||||
|
||||
#ifndef SYNC_H
|
||||
#define SYNC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct sync_device;
|
||||
struct sync_track;
|
||||
|
||||
struct sync_device *sync_create_device(const char *);
|
||||
void sync_destroy_device(struct sync_device *);
|
||||
|
||||
#ifndef SYNC_PLAYER
|
||||
struct sync_cb {
|
||||
void (*pause)(void *, int);
|
||||
void (*set_row)(void *, int);
|
||||
int (*is_playing)(void *);
|
||||
};
|
||||
#define SYNC_DEFAULT_PORT 1338
|
||||
int sync_connect(struct sync_device *, const char *, unsigned short);
|
||||
int sync_update(struct sync_device *, int, struct sync_cb *, void *);
|
||||
void sync_save_tracks(const struct sync_device *);
|
||||
#else /* defined(SYNC_PLAYER) */
|
||||
struct sync_io_cb {
|
||||
void *(*open)(const char *filename, const char *mode);
|
||||
size_t (*read)(void *ptr, size_t size, size_t nitems, void *stream);
|
||||
int (*close)(void *stream);
|
||||
};
|
||||
void sync_set_io_cb(struct sync_device *d, struct sync_io_cb *cb);
|
||||
#endif /* defined(SYNC_PLAYER) */
|
||||
|
||||
const struct sync_track *sync_get_track(struct sync_device *, const char *);
|
||||
double sync_get_val(const struct sync_track *, double);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !defined(SYNC_H) */
|
||||
Reference in New Issue
Block a user