]> code.citadel.org Git - citadel.git/blobdiff - citadel/context.h
* remember the total size a downloadable file has
[citadel.git] / citadel / context.h
index 98d5feb5567eb523b7ee72f4ec92245ca8450b6d..ff62295e708cfaf411e5f2c9033ebfdc94eb6004 100644 (file)
@@ -43,6 +43,7 @@ struct CitContext {
        unsigned cs_flags;      /* miscellaneous flags */
        void (*h_command_function) (void) ;     /* service command function */
        void (*h_async_function) (void) ;       /* do async msgs function */
+       void (*h_greeting_function) (void) ;    /* greeting function for session startup */
        int is_async;           /* Nonzero if client accepts async msgs */
        int async_waiting;      /* Nonzero if there are async msgs waiting */
        int input_waiting;      /* Nonzero if there is client input waiting */
@@ -63,6 +64,7 @@ struct CitContext {
        char cs_inet_fn[128];                   /* Friendly-name of outbound Internet mail */
 
        FILE *download_fp;      /* Fields relating to file transfer */
+       size_t download_fp_total;
        char download_desired_section[128];
        FILE *upload_fp;
        char upl_file[256];
@@ -125,6 +127,8 @@ typedef struct CitContext CitContext;
  */
 enum {
        CON_IDLE,               /* This context is doing nothing */
+       CON_GREETING,           /* This context needs to output its greeting */
+       CON_STARTING,           /* This context is outputting its greeting */
        CON_READY,              /* This context needs attention */
        CON_EXECUTING           /* This context is bound to a thread */
 };
@@ -149,5 +153,11 @@ void dead_session_purge(int force);
 /* Deprecated, user CtdlBumpNewMailCounter() instead */
 void BumpNewMailCounter(long) __attribute__ ((deprecated));
 
-
+void terminate_idle_sessions(void);
+int CtdlTerminateOtherSession (int session_num);
+/* bits returned by CtdlTerminateOtherSession */
+#define TERM_FOUND     0x01
+#define TERM_ALLOWED   0x02
+#define TERM_KILLED    0x03
+#define TERM_NOTALLOWED -1
 #endif /* CONTEXT_H */