forked from FirebaseExtended/firebase-arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFirebaseHttpClient_dummy.cpp
57 lines (42 loc) · 1.26 KB
/
FirebaseHttpClient_dummy.cpp
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
#ifdef __GNUC__
# define UNUSED_ARG(x) UNUSED_ ## x __attribute__((__unused__))
#else
# define UNUSED_ARG(x) UNUSED_ ## x
#endif
#include "FirebaseHttpClient.h"
class FirebaseHttpClientDummy : public FirebaseHttpClient {
public:
void setReuseConnection(bool UNUSED_ARG(reuse)) override {
}
void begin(const std::string& UNUSED_ARG(url)) override {
}
void begin(const std::string& UNUSED_ARG(host), const std::string& UNUSED_ARG(path)) override {
}
void end() override {
}
void addHeader(const std::string& UNUSED_ARG(name), const std::string& UNUSED_ARG(value)) override {
}
bool connected() override {
return true;
}
void collectHeaders(const char* UNUSED_ARG(header_keys[]), const int UNUSED_ARG(count)) override {
}
std::string header(const std::string& UNUSED_ARG(name)) override {
return "";
}
int sendRequest(const std::string& UNUSED_ARG(method), const std::string& UNUSED_ARG(data)) override {
return 0;
}
std::string getString() override {
return "";
}
Stream* getStreamPtr() override {
return nullptr;
}
std::string errorToString(int UNUSED_ARG(error_code)) override {
return std::string();
}
};
FirebaseHttpClient* FirebaseHttpClient::create() {
return new FirebaseHttpClientDummy();
}