qments/include/driver.h

16 lines
425 B
C

#ifndef DRIVER_H
#define DRIVER_H
#include "comment.h"
typedef struct {
/* should return (id > 0) on success, and negative number on error */
int (*leave_comment)(void*, const CommentHeader*, const char*);
/* retrieve header information by id */
int (*get_header)(void*, CommentHeader*, int);
/* retrieve text of comment by id */
int (*get_text)(void*, char*, int);
} Driver;
#endif /* DRIVER_H */