This repository was archived by the owner on Mar 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 492
/
Copy pathcommands.h
63 lines (45 loc) · 1.47 KB
/
commands.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef MODEM_DB_COMMANDS_H
#define MODEM_DB_COMMANDS_H
#include "FirebaseArduino.h"
#include "modem/command.h"
#include "modem/output-stream.h"
#include "modem/input-stream.h"
namespace firebase {
namespace modem {
class GetCommand : public Command {
public:
GetCommand(FirebaseArduino* fbase) : Command(fbase) {}
bool execute(const String& command, InputStream* in, OutputStream* out);
};
class SetCommand : public Command {
public:
SetCommand(FirebaseArduino* fbase) : Command(fbase) {}
bool execute(const String& command, InputStream* in, OutputStream* out);
};
class RemoveCommand : public Command {
public:
RemoveCommand(FirebaseArduino* fbase) : Command(fbase) {}
bool execute(const String& command, InputStream* in, OutputStream* out);
};
class PushCommand : public Command {
public:
PushCommand(FirebaseArduino* fbase) : Command(fbase) {}
bool execute(const String& command, InputStream* in, OutputStream* out);
};
class BeginCommand : public Command {
public:
BeginCommand() : Command(nullptr) {}
bool execute(const String& command, InputStream* in, OutputStream* out);
// This can only be called once.
std::unique_ptr<FirebaseArduino> firebase();
private:
std::unique_ptr<FirebaseArduino> new_firebase_;
};
class StreamCommand : public Command {
public:
StreamCommand(FirebaseArduino* fbase) : Command(fbase) {}
bool execute(const String& command, InputStream* in, OutputStream* out);
};
} // modem
} // firebase
#endif //MODEM_DB_COMMANDS_H