/* $Cambridge: hermes/src/prayer/cmd/cmd.h,v 1.3 2008/09/16 09:59:55 dpc22 Exp $ */
/************************************************
 *    Prayer - a Webmail Interface              *
 ************************************************/

/* Copyright (c) University of Cambridge 2000 - 2008 */
/* See the file NOTICE for conditions of use and distribution. */

/* Prototypes for cmd_* functions */

void cmd_abook_add(struct session *session);
void cmd_abook_compose(struct session *session);
void cmd_abook_compose2(struct session *session);
void cmd_abook_export(struct session *session);
void cmd_abook_import(struct session *session);
void cmd_abook_list(struct session *session);
void cmd_abook_lookup(struct session *session);
void cmd_abook_lookup_add(struct session *session);
void cmd_abook_save(struct session *session);
void cmd_abook_search(struct session *session);
void cmd_abook_sort(struct session *session);
void cmd_abook_take(struct session *session);
void cmd_abook_update(struct session *session);
void cmd_abook_xfer(struct session *session);
void cmd_action_stub(struct session *session);
void cmd_add_address(struct session *session);
void cmd_aggregate(struct session *session);
void cmd_aggregate_tmp(struct session *session);
void cmd_attachments(struct session *session);
void cmd_block(struct session *session);
void cmd_change(struct session *session);
void cmd_check_cookie(struct session *session);
void cmd_checkpoint(struct session *session);
void cmd_compose(struct session *session);
void cmd_compose1(struct session *session);
void cmd_copy(struct session *session);
void cmd_copy_msg(struct session *session);
void cmd_create(struct session *session);
void cmd_delete(struct session *session);
void cmd_detach(struct session *session);
void cmd_dir_check(struct session *session);
void cmd_disp_delete(struct session *session);
void cmd_disp_mark(struct session *session);
void cmd_disp_undelete(struct session *session);
void cmd_disp_unmark(struct session *session);
void cmd_dictionary(struct session *session);
void cmd_display(struct session *session);
void cmd_download(struct session *session);
void cmd_download_xfer(struct session *session);
void cmd_error(struct session *session);
void cmd_exit(struct session *session);
void cmd_expunge(struct session *session);
void cmd_expunge1(struct session *session);
void cmd_favourites(struct session *session);
void cmd_filter(struct session *session);
void cmd_filter_mbox(struct session *session);
void cmd_filter_select(struct session *session);
void cmd_folders(struct session *session);
void cmd_forward(struct session *session);
void cmd_forward1(struct session *session);
void cmd_fullname(struct session *session);
void cmd_help(struct session *session);
void cmd_hdrs(struct session *session);
void cmd_init(struct session *session);
void cmd_include(struct session *session);
void cmd_list(struct session *session);
void cmd_list_sort(struct session *session);
void cmd_logout(struct session *session);
void cmd_mark(struct session *session);
void cmd_manage(struct session *session);
void cmd_passwd(struct session *session);
void cmd_preferred(struct session *session);
void cmd_prefs(struct session *session);
void cmd_printable(struct session *session);
void cmd_quota(struct session *session);
void cmd_rawdisplay(struct session *session);
void cmd_redirect(struct session *session);
void cmd_reply(struct session *session);
void cmd_reply1(struct session *session);
void cmd_reply2(struct session *session);
void cmd_rm(struct session *session);
void cmd_rm1(struct session *session);
void cmd_rename(struct session *session);
void cmd_rename_item(struct session *session);
void cmd_restart(struct session *session);
void cmd_resume(struct session *session);
void cmd_roles_entry(struct session *session);
void cmd_roles_list(struct session *session);
void cmd_search(struct session *session);
void cmd_send(struct session *session);
void cmd_sieve(struct session *session);
void cmd_sizes(struct session *session);
void cmd_spam(struct session *session);
void cmd_spell(struct session *session);
void cmd_subscribe(struct session *session);
void cmd_transfer(struct session *session);
void cmd_undelete(struct session *session);
void cmd_unmark(struct session *session);
void cmd_unsubscribe(struct session *session);
void cmd_upload_exit(struct session *session);
void cmd_upload_select(struct session *session);
void cmd_upload_xfer(struct session *session);
void cmd_user_agent(struct session *session);
void cmd_user_level(struct session *session);
void cmd_vacation(struct session *session);
void cmd_vaclog(struct session *session);
void cmd_welcome(struct session *session);
void cmd_zoom(struct session *session);

struct cmd {
    char *cmd;
    void (*fn) (struct session * session);
};

/* cmd.c defines dispatch tables used by prayer frontend and session */

void cmd_dispatch_init(void);
BOOL cmd_dispatch(struct session *session, char *text);
