summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/commands.h
diff options
context:
space:
mode:
Diffstat (limited to 'server-tools/instance-manager/commands.h')
-rw-r--r--server-tools/instance-manager/commands.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/server-tools/instance-manager/commands.h b/server-tools/instance-manager/commands.h
index 09df4fc9260..8b53b21bbac 100644
--- a/server-tools/instance-manager/commands.h
+++ b/server-tools/instance-manager/commands.h
@@ -27,9 +27,10 @@
class Show_instances : public Command
{
public:
- Show_instances(Command_factory *factory): Command(factory)
+ Show_instances(Instance_map *imap_arg): Command(imap_arg)
{}
+ int do_command(struct st_net *net);
int execute(struct st_net *net, ulong connection_id);
};
@@ -42,7 +43,7 @@ public:
class Flush_instances : public Command
{
public:
- Flush_instances(Command_factory *factory): Command(factory)
+ Flush_instances(Instance_map *imap_arg): Command(imap_arg)
{}
int execute(struct st_net *net, ulong connection_id);
@@ -58,8 +59,8 @@ class Show_instance_status : public Command
{
public:
- Show_instance_status(Command_factory *factory, const char *name, uint len);
-
+ Show_instance_status(Instance_map *imap_arg, const char *name, uint len);
+ int do_command(struct st_net *net, const char *instance_name);
int execute(struct st_net *net, ulong connection_id);
const char *instance_name;
};
@@ -74,9 +75,10 @@ class Show_instance_options : public Command
{
public:
- Show_instance_options(Command_factory *factory, const char *name, uint len);
+ Show_instance_options(Instance_map *imap_arg, const char *name, uint len);
int execute(struct st_net *net, ulong connection_id);
+ int do_command(struct st_net *net, const char *instance_name);
const char *instance_name;
};
@@ -89,11 +91,11 @@ public:
class Start_instance : public Command
{
public:
- Start_instance(Command_factory *factory, const char *name, uint len);
+ Start_instance(Instance_map *imap_arg, const char *name, uint len);
- Instance *instance;
int execute(struct st_net *net, ulong connection_id);
const char *instance_name;
+ Instance *instance;
};
@@ -105,7 +107,7 @@ public:
class Stop_instance : public Command
{
public:
- Stop_instance(Command_factory *factory, const char *name, uint len);
+ Stop_instance(Instance_map *imap_arg, const char *name, uint len);
Instance *instance;
int execute(struct st_net *net, ulong connection_id);
@@ -114,7 +116,10 @@ public:
/*
- Syntax error command.
+ Syntax error command. This command is issued if parser reported a syntax error.
+ We need it to distinguish the parse error and the situation when parser internal
+ error occured. E.g. parsing failed because we hadn't had enought memory. In the
+ latter case parse_command() should return an error.
*/
class Syntax_error : public Command