#ifndef _WMR_TXT_PAGE_H
#define _WMR_TXT_PAGE_H

#include "app_general.h"
#include "wmr_txt.h"

#define DESCRIPTION         (0x01)
#define VALUE               (0x02)
#define UNITS               (0x04)
#define CR                  (0x08)
#define SEPARATOR           (0x10)
#define BR                  (0x20)
#define CONVERSIONS	    (0x40)

typedef enum message_category_type {
  id_anemometer_data,
  id_rain_gauge_data,
  id_sensor_outside_data,
  id_outside_data,
  id_old_inside_data,
  id_inside_data,
  id_minute_data,
  id_hour_data,
  id_unknown_message
} message_category_type;

typedef enum status_table_type {
  status_table,
  status_table_body
} status_table_type;

typedef enum additional_status_table_type {
  additional_status_table,
  additional_status_table_body
} additional_status_table_type;

#define NUM_MESSAGES (id_unknown_message)
/* message length is returned (or zero in case of invalid message id) */
unsigned int
wmr_message_length(unsigned int /* char */ id);

void
wmr_txt_out_xml (int *fd);

void
wmr_txt_out_status_html (int *fd); /* full status */

void
wmr_txt_out_status (int * fd, status_table_type content); /* status list only */

void
wmr_txt_out_additional_status (int * fd, additional_status_table_type content);

void
wmr_txt_out_html (int *fd);

void
wmr_txt_out_txt (int *fd);

void
wmr_txt_out_category (int *fd, message_category_type category);

#endif