File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,8 @@ bool GenericConnectionHandler::updateSetting(const models::NetworkSetting& s) {
4949 }
5050}
5151
52- NetworkConnectionState GenericConnectionHandler::check ()
53- {
54- return _ch != nullptr ? _ch->check () : NetworkConnectionState::INIT;
52+ NetworkConnectionState GenericConnectionHandler::updateConnectionState () {
53+ return _ch != nullptr ? _ch->updateConnectionState () : NetworkConnectionState::INIT;
5554}
5655
5756NetworkConnectionState GenericConnectionHandler::update_handleInit () {
@@ -103,12 +102,6 @@ void GenericConnectionHandler::disconnect() {
103102 ConnectionHandler::disconnect ();
104103}
105104
106- void GenericConnectionHandler::addCallback (NetworkConnectionEvent const event, OnNetworkEventCallback callback) {
107- if (_ch!=nullptr ) {
108- _ch->addCallback (event, callback);
109- }
110- }
111-
112105void GenericConnectionHandler::setKeepAlive (bool keep_alive) {
113106 _keep_alive = keep_alive;
114107
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ class GenericConnectionHandler : public ConnectionHandler
3838
3939 GenericConnectionHandler (bool const keep_alive=true ): ConnectionHandler(keep_alive), _ch(nullptr ) {}
4040
41- NetworkConnectionState check () override ;
42-
41+ // NetworkConnectionState check() override;
42+
4343 #if defined(BOARD_HAS_NOTECARD) || defined(BOARD_HAS_LORA)
4444 virtual bool available () = 0;
4545 virtual int read () = 0;
@@ -61,12 +61,13 @@ class GenericConnectionHandler : public ConnectionHandler
6161
6262 void connect () override ;
6363 void disconnect () override ;
64- void addCallback (NetworkConnectionEvent const event, OnNetworkEventCallback callback) override ;
6564
6665 void setKeepAlive (bool keep_alive=true ) override ;
6766
6867 protected:
6968
69+ NetworkConnectionState updateConnectionState () override ;
70+
7071 NetworkConnectionState update_handleInit () override ;
7172 NetworkConnectionState update_handleConnecting () override ;
7273 NetworkConnectionState update_handleConnected () override ;
You can’t perform that action at this time.
0 commit comments