X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserver.h;h=9c5fabd79faf971fbc4941f585b9510fc40b9ffd;hb=ff9480f7250d97d132a4f4e8623a11db48e07e4c;hp=01e5135548d20a6330e1bb52b01fd54434d25cab;hpb=91acd2248c9358e6150c66eeb624d479f24b3941;p=citadel.git diff --git a/citadel/server.h b/citadel/server.h index 01e513554..9c5fabd79 100644 --- a/citadel/server.h +++ b/citadel/server.h @@ -16,6 +16,17 @@ #include #endif +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + /* * New format for a message in memory */ @@ -78,6 +89,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) ; /* service startup function */ 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 */ @@ -143,6 +155,8 @@ struct CitContext { struct cit_ical *CIT_ICAL; /* calendaring data */ struct ma_info *ma; /* multipart/alternative data */ const char* ServiceName; /**< whats our actual purpose? */ + + struct timeval client_expires_at; /** When this client will expire */ }; typedef struct CitContext t_context; @@ -159,6 +173,7 @@ typedef struct CitContext t_context; */ enum { CON_IDLE, /* This context is doing nothing */ + CON_START, /* This context is starting up */ CON_READY, /* This context needs attention */ CON_EXECUTING /* This context is bound to a thread */ };