28 lines
518 B
C
28 lines
518 B
C
/* vi:set ft=c ts=4 sw=4 noet noai: */
|
|
#pragma once
|
|
|
|
#include "conn.h"
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <time.h>
|
|
|
|
typedef struct limits {
|
|
unsigned short min_age_days;
|
|
unsigned short max_age_days;
|
|
size_t max_size_bytes;
|
|
} limit_t;
|
|
|
|
typedef struct paste_cstate {
|
|
char puid[PUID_LENGTH + 1];
|
|
size_t read;
|
|
size_t sent;
|
|
int fd;
|
|
int sock;
|
|
time_t retention;
|
|
bool quota_exceeded : sizeof(bool);
|
|
} paste_cstate_t;
|
|
|
|
typedef struct paste_client {
|
|
paste_cstate_t state;
|
|
bctx_t data;
|
|
} paste_client_t;
|