/*
 *
 * CueCat decoder
 * version 0.1
 *
 * (c) 2000 Michael Rothwell
 * rothwell@holly-springs.nc.us
 *
 * Released under the GPL
 *
 */


#ifndef __CUECAT_DECODER_H__
#define __CUECAT_DECODER_H__

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

#define BASE64_PAD_CHAR 	61
#define BASE64_LINE_LENGTH 	76

struct		chunks  { char *head; char *serial; char *ctype; char *data; char *formatted; };

static char codetable[256];
static int	__base64_codetable_initialized=0;

struct 		chunks 	*chunk(char *sample);
char 		*chunkdecode(char *buf, char *type);
struct 		chunks *convert(char *sample);
char 		*decode(char *buf, int length);
void 		init_codetable();
int 		decode_type(struct chunks *c);

#endif


