Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 353a6d7

Browse files
committed
Remove dead code.
1 parent 4fc8da2 commit 353a6d7

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

src/Firebase.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,3 @@ void FirebaseStream::startStreaming(const std::string& host, const std::string&
9797
status = http_->sendRequest("GET", std::string());
9898
}
9999
}
100-
101-
bool FirebaseStream::available() {
102-
auto client = http_->getStreamPtr();
103-
return (client == nullptr) ? false : client->available();
104-
}
105-
106-
FirebaseStream::Event FirebaseStream::read(std::string& event) {
107-
auto client = http_->getStreamPtr();
108-
if (client == nullptr) {
109-
return Event();
110-
}
111-
Event type;
112-
std::string typeStr = client->readStringUntil('\n').substring(7).c_str();
113-
if (typeStr == "put") {
114-
type = Event::PUT;
115-
} else if (typeStr == "patch") {
116-
type = Event::PATCH;
117-
} else {
118-
type = Event::UNKNOWN;
119-
}
120-
event = client->readStringUntil('\n').substring(6).c_str();
121-
client->readStringUntil('\n'); // consume separator
122-
return type;
123-
}

src/Firebase.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,32 +99,7 @@ class FirebaseStream : public FirebaseCall {
9999
FirebaseStream(const std::shared_ptr<FirebaseHttpClient> http = NULL) : FirebaseCall(http) { }
100100
virtual ~FirebaseStream() {}
101101

102-
// Return if there is any event available to read.
103-
bool available();
104102
void startStreaming(const std::string& host, const std::string& auth, const std::string& path);
105-
106-
// Event type.
107-
enum Event {
108-
UNKNOWN,
109-
PUT,
110-
PATCH
111-
};
112-
113-
static inline std::string EventToName(Event event) {
114-
switch(event) {
115-
case UNKNOWN:
116-
return "UNKNOWN";
117-
case PUT:
118-
return "PUT";
119-
case PATCH:
120-
return "PATCH";
121-
default:
122-
return "INVALID_EVENT_" + event;
123-
}
124-
}
125-
126-
// Read next json encoded `event` from stream.
127-
virtual Event read(std::string& event);
128103
};
129104

130105
#endif // firebase_h

0 commit comments

Comments
 (0)