]> mj.ucw.cz Git - moe.git/blobdiff - submit/submitd.h
Added the show-submits utility.
[moe.git] / submit / submitd.h
index 9f73326730460e904645c65ef7ea10c3310a39b9..e3ae41ed5dee0942f3a98a5a0e71c7c6d1c43ca6 100644 (file)
@@ -39,6 +39,8 @@ struct conn {
   struct mempool *pool;
   struct odes *request;
   struct odes *reply;
+  struct odes *task_status;
+  int task_lock_fd;
   byte *user;
 };
 
@@ -58,12 +60,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_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