[base] introduce a command type that gets registered with the app
This commit is contained in:
@ -2,19 +2,75 @@
|
||||
#define THIN_PROVISIONING_COMMANDS_H
|
||||
|
||||
#include "base/application.h"
|
||||
#include "boost/optional.hpp"
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace thin_provisioning {
|
||||
extern base::command thin_check_cmd;
|
||||
extern base::command thin_delta_cmd;
|
||||
extern base::command thin_dump_cmd;
|
||||
extern base::command thin_metadata_size_cmd;
|
||||
extern base::command thin_restore_cmd;
|
||||
extern base::command thin_repair_cmd;
|
||||
extern base::command thin_rmap_cmd;
|
||||
extern base::command thin_trim_cmd;
|
||||
extern base::command thin_metadata_size_cmd;
|
||||
class thin_check_cmd : public base::command {
|
||||
public:
|
||||
thin_check_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
class thin_delta_cmd : public base::command {
|
||||
public:
|
||||
thin_delta_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
class thin_dump_cmd : public base::command {
|
||||
public:
|
||||
thin_dump_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
class thin_ls_cmd : public base::command {
|
||||
public:
|
||||
thin_ls_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
class thin_metadata_size_cmd : public base::command {
|
||||
public:
|
||||
thin_metadata_size_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
class thin_restore_cmd : public base::command {
|
||||
public:
|
||||
thin_restore_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
class thin_repair_cmd : public base::command {
|
||||
public:
|
||||
thin_repair_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
class thin_rmap_cmd : public base::command {
|
||||
public:
|
||||
thin_rmap_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
class thin_trim_cmd : public base::command {
|
||||
public:
|
||||
thin_trim_cmd();
|
||||
virtual void usage(std::ostream &out) const;
|
||||
virtual int run(int argc, char **argv);
|
||||
};
|
||||
|
||||
void register_thin_commands(base::application &app);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user