mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 13:14:29 -08:00
Refactor commandline handling
- instead of having the list of commandline arguments, their handlers and their help strings in different places, unify them in a single array - this allows to only change one piece of code when adding new arguments
This commit is contained in:
31
command.h
31
command.h
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Bryan Christ <bryan.christ@mediafire.com>
|
||||
* 2014 Johannes Schauer <j.schauer@email.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2, as published by
|
||||
@@ -22,32 +23,34 @@
|
||||
|
||||
#include "mfshell.h"
|
||||
|
||||
void mfshell_cmd_help(void);
|
||||
int mfshell_cmd_help(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_debug(mfshell_t *mfshell);
|
||||
int mfshell_cmd_debug(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_host(mfshell_t *mfshell,const char *host);
|
||||
int mfshell_cmd_host(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_auth(mfshell_t *mfshell);
|
||||
int mfshell_cmd_auth(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_whomai(mfshell_t *mfshell);
|
||||
int mfshell_cmd_whomai(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_list(mfshell_t *mfshell);
|
||||
int mfshell_cmd_list(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_chdir(mfshell_t *mfshell,const char *folderkey);
|
||||
int mfshell_cmd_chdir(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_pwd(mfshell_t *mfshell);
|
||||
int mfshell_cmd_pwd(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_lpwd(mfshell_t *mfshell);
|
||||
int mfshell_cmd_lpwd(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_lcd(mfshell_t *mfshell,const char *dir);
|
||||
int mfshell_cmd_lcd(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_file(mfshell_t *mfshell,const char *quickkey);
|
||||
int mfshell_cmd_file(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_links(mfshell_t *mfshell,const char *quickkey);
|
||||
int mfshell_cmd_links(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_mkdir(mfshell_t *mfshell,const char *name);
|
||||
int mfshell_cmd_mkdir(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_get(mfshell_t *mfshell,const char *quickkey);
|
||||
int mfshell_cmd_get(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
int mfshell_cmd_whoami(mfshell_t *mfshell, int argc, char **argv);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user