/*
 * webcamd.h
 */

#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <syslog.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/uio.h>
#include <pthread.h>

#include <dmedia/dmedia.h>
#include <dmedia/vl.h>
#include <dmedia/cl.h>

#define MAXLEN 1024

/* hold a pointer to an image and it's size */
typedef struct {
	char* data;
	int size;
} Image;

/* we just create one History and use it in many places 
 * it holds all the information we need
 */
typedef struct {
	Image* images;
	int     history_size;
	int     sleep;
	int     filled;
	int     zoom;
	int     quality;
} History;


/*
 * function definitions 
 */
void clean_up(int signo); 
void vlerror_exit(void);  
void fillImage(Image* i);
void *server_thread(void *arg);
void *harvest_thread(void *arg); 

