Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit353a6d7

Browse files
committed
Remove dead code.
1 parent4fc8da2 commit353a6d7

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-
boolFirebaseStream::available() {
102-
auto client = http_->getStreamPtr();
103-
return (client ==nullptr) ?false : client->available();
104-
}
105-
106-
FirebaseStream::EventFirebaseStream::read(std::string& event) {
107-
auto client = http_->getStreamPtr();
108-
if (client ==nullptr) {
109-
returnEvent();
110-
}
111-
Event type;
112-
std::string typeStr = client->readStringUntil('\n').substring(7).c_str();
113-
if (typeStr =="put") {
114-
type = Event::PUT;
115-
}elseif (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-
boolavailable();
104102
voidstartStreaming(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-
staticinline std::stringEventToName(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 Eventread(std::string& event);
128103
};
129104

130105
#endif// firebase_h

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp