view src/over.h @ 271:3477050e8d10 noffle

[svn] * src/client.c,src/fetch.c,src/lock.c.src/protocol.c,src/util.h,src/util.c: Define our own SignalHandler type rather than use the rather Linux-specific (and potentially glibc version specific) sig_t. * src/client.c,src/database.h,src/database.c,src/over.h,src/over.c, src/pseudo.c,src/server.c: Ensure format string specifiers and passed data types match. As part of this, change some uses of size_t as a general data type to an appropriate base C type. Database status changes from int to unsigned.
author bears
date Sun, 10 Nov 2002 11:32:17 +0000
parents c874bd3c4bb8
children
line wrap: on
line source

/*
  over.h

  Processing of single article overviews. Handling of overview files is in
  content.c. An article overview contains important article properties,
  such as date, from, subject.

  $Id: over.h 403 2002-11-10 11:32:17Z bears $ 
*/

#ifndef OVER_H
#define OVER_H

#if HAVE_CONFIG_H
#include <config.h>
#endif

#if TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif

#include "common.h"

struct Over;
typedef struct Over Over;

/*
  Usual fields from overview databases.
  Xref without hostname.
*/
Over *
new_Over( const char *subj, const char *from, const char *date,
          const char *msgId, const char *ref,
	  unsigned long bytes, unsigned long lines );


/* free memory */
void
del_Over( Over *self );

/* read Over-struct from line */
Over *
Ov_read( char *line );

/* write struct Over to f as a line */
Bool
Ov_write( const Over *self, FILE *f );

/* Access particular fields in struct over */

int
Ov_numb( const Over *self );

const char *
Ov_subj( const Over *self );

const char *
Ov_from( const Over *self );

const char *
Ov_date( const Over *self );

const char *
Ov_msgId( const Over *self );

const char *
Ov_ref( const Over *self );

unsigned long
Ov_bytes( const Over *self );

unsigned long
Ov_lines( const Over *self );

void
Ov_setNumb( Over *self, int numb );

#endif