X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=submit%2Fsubmitd.h;h=6078eb995d7d95bb145d30a28275ad313515a188;hb=bc146dd87d43e294fd477f92f20e8dd43da83f21;hp=4030bc31e67f7c731490aa365a9f1df148775633;hpb=92811b1aa5a791bc776b58afb241a7d93e737604;p=moe.git diff --git a/submit/submitd.h b/submit/submitd.h index 4030bc3..6078eb9 100644 --- a/submit/submitd.h +++ b/submit/submitd.h @@ -14,9 +14,14 @@ #include #include -struct access_rule { +struct ip_node { cnode n; struct ip_addrmask addrmask; +}; + +struct access_rule { + cnode n; + clist ip_list; uns allow_admin; uns plain_text; uns max_conn; @@ -45,6 +50,8 @@ struct conn { }; extern uns max_request_size, max_attachment_size, trace_commands; +extern uns max_versions; +extern byte *history_format; /* submitd.c */ @@ -60,16 +67,28 @@ int process_command(struct conn *c); struct task { cnode n; byte *name; + uns open_data; // Number of parts for open-data tasks + uns max_size; // Maximum size (0=use global default) + clist parts; // List of parts of this task (simp_nodes) + clist *extensions; // List of allowed extensions for this task (simp_nodes) }; extern clist task_list; extern struct cf_section tasks_conf; struct task *task_find(byte *name); +int part_exists_p(struct task *t, byte *name); int user_exists_p(byte *user); +int ext_exists_p(struct task *t, byte *ext); + void task_lock_status(struct conn *c); void task_unlock_status(struct conn *c, uns write_back); -void task_submit(struct conn *c, struct task *t, struct fastbuf *fb, byte *filename); -struct odes *task_status_find_task(struct conn *c, struct task *t); +void task_load_status(struct conn *c); + +struct odes *task_status_find_task(struct conn *c, struct task *t, uns create); +struct odes *task_status_find_part(struct odes *t, byte *part, uns create); + +void task_submit_part(byte *user, byte *task, byte *part, byte *ext, uns version, struct fastbuf *fb); +void task_delete_part(byte *user, byte *task, byte *part, byte *ext, uns version); #endif