60 #ifndef __RUDOLPH1_H__
61 #define __RUDOLPH1_H__
71 RUDOLPH1_FLAG_NEWFILE,
72 RUDOLPH1_FLAG_LASTCHUNK,
75 struct rudolph1_callbacks {
76 void (* write_chunk)(
struct rudolph1_conn *c,
int offset,
int flag,
77 uint8_t *data,
int len);
78 int (* read_chunk)(
struct rudolph1_conn *c,
int offset, uint8_t *to,
82 struct rudolph1_conn {
83 struct trickle_conn trickle;
85 const struct rudolph1_callbacks *cb;
87 clock_time_t send_interval;
88 uint16_t chunk, highest_chunk_heard;
94 void rudolph1_open(
struct rudolph1_conn *c, uint16_t channel,
95 const struct rudolph1_callbacks *cb);
96 void rudolph1_close(
struct rudolph1_conn *c);
97 void rudolph1_send(
struct rudolph1_conn *c, clock_time_t send_interval);
98 void rudolph1_stop(
struct rudolph1_conn *c);