/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* tel.h: Definitions for things having to do with telegrams
- *
+ *
* Known contributors to this file:
- *
+ * Markus Armbruster, 2009
*/
#ifndef TEL_H
#define TEL_H
+#include <stdio.h>
+#include <time.h>
+#include "types.h"
+
#define MAXTELSIZE 1024 /* doesn't apply to TEL_UPDATE */
#define TEL_NORM 0 /* normal */
struct telstr {
natid tel_from; /* sender */
- signed char tel_type;
- long tel_length; /* how long */
+ unsigned char tel_type;
+ unsigned tel_length; /* how long */
time_t tel_date; /* when sent */
};
extern char *mailbox(char *buf, natid cn);
+extern int tel_read_header(FILE *, char *, struct telstr *);
+extern int tel_read_body(FILE *, char *, struct telstr *,
+ int (*sink)(char *, size_t, void *),
+ void *);
#endif