Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,047 changes: 373 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

19 changes: 6 additions & 13 deletions src/Arduino_ConnectionHandler.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
/*
This file is part of ArduinoIoTCloud.
This file is part of the Arduino_ConnectionHandler library.

Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
Copyright (c) 2019 Arduino SA

This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html

You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to [email protected].
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#ifndef ARDUINO_CONNECTION_HANDLER_H_
#define ARDUINO_CONNECTION_HANDLER_H_

/******************************************************************************
INCLUDES
INCLUDES
******************************************************************************/

#if !defined(__AVR__)
Expand Down
25 changes: 9 additions & 16 deletions src/CatM1ConnectionHandler.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
/*
This file is part of ArduinoIoTCloud.
This file is part of the Arduino_ConnectionHandler library.

Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
Copyright (c) 2023 Arduino SA

This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html

You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to [email protected].
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

/******************************************************************************
INCLUDE
INCLUDE
******************************************************************************/

#include "ConnectionHandlerDefinitions.h"
Expand All @@ -25,7 +18,7 @@
#include "CatM1ConnectionHandler.h"

/******************************************************************************
CTOR/DTOR
CTOR/DTOR
******************************************************************************/

CatM1ConnectionHandler::CatM1ConnectionHandler()
Expand All @@ -49,7 +42,7 @@ CatM1ConnectionHandler::CatM1ConnectionHandler(
}

/******************************************************************************
PUBLIC MEMBER FUNCTIONS
PUBLIC MEMBER FUNCTIONS
******************************************************************************/

unsigned long CatM1ConnectionHandler::getTime()
Expand All @@ -61,7 +54,7 @@ unsigned long CatM1ConnectionHandler::getTime()
}

/******************************************************************************
PROTECTED MEMBER FUNCTIONS
PROTECTED MEMBER FUNCTIONS
******************************************************************************/

NetworkConnectionState CatM1ConnectionHandler::update_handleInit()
Expand Down
21 changes: 7 additions & 14 deletions src/CatM1ConnectionHandler.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
/*
This file is part of ArduinoIoTCloud.
This file is part of the Arduino_ConnectionHandler library.

Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
Copyright (c) 2023 Arduino SA

This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html

You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to [email protected].
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#ifndef ARDUINO_CATM1_CONNECTION_HANDLER_H_
#define ARDUINO_CATM1_CONNECTION_HANDLER_H_

/******************************************************************************
INCLUDE
INCLUDE
******************************************************************************/

#include "ConnectionHandlerInterface.h"
Expand All @@ -33,7 +26,7 @@
#endif

/******************************************************************************
CLASS DECLARATION
CLASS DECLARATION
******************************************************************************/

class CatM1ConnectionHandler : public ConnectionHandler
Expand Down
8 changes: 4 additions & 4 deletions src/CellularConnectionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


/******************************************************************************
INCLUDE
INCLUDE
******************************************************************************/

#include "ConnectionHandlerDefinitions.h"
Expand All @@ -19,7 +19,7 @@
#include "CellularConnectionHandler.h"

/******************************************************************************
CTOR/DTOR
CTOR/DTOR
******************************************************************************/
CellularConnectionHandler::CellularConnectionHandler()
: ConnectionHandler(true, NetworkAdapter::CELL) {}
Expand All @@ -36,7 +36,7 @@ CellularConnectionHandler::CellularConnectionHandler(const char * pin, const cha
}

/******************************************************************************
PUBLIC MEMBER FUNCTIONS
PUBLIC MEMBER FUNCTIONS
******************************************************************************/

unsigned long CellularConnectionHandler::getTime()
Expand All @@ -51,7 +51,7 @@ UDP & CellularConnectionHandler::getUDP()
}

/******************************************************************************
PROTECTED MEMBER FUNCTIONS
PROTECTED MEMBER FUNCTIONS
******************************************************************************/

NetworkConnectionState CellularConnectionHandler::update_handleInit()
Expand Down
4 changes: 2 additions & 2 deletions src/CellularConnectionHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define ARDUINO_CELLULAR_CONNECTION_HANDLER_H_

/******************************************************************************
INCLUDE
INCLUDE
******************************************************************************/

#include "ConnectionHandlerInterface.h"
Expand All @@ -27,7 +27,7 @@
#endif

/******************************************************************************
CLASS DECLARATION
CLASS DECLARATION
******************************************************************************/

class CellularConnectionHandler : public ConnectionHandler
Expand Down
23 changes: 8 additions & 15 deletions src/ConnectionHandlerDefinitions.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
/*
This file is part of ArduinoIoTCloud.
This file is part of the Arduino_ConnectionHandler library.
Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
Copyright (c) 2024 Arduino SA
This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html
You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to [email protected].
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#pragma once

/******************************************************************************
INCLUDES
INCLUDES
******************************************************************************/

#if defined __has_include
Expand Down Expand Up @@ -154,7 +147,7 @@
#endif // BOARD_HAS_NOTECARD

/******************************************************************************
TYPEDEFS
TYPEDEFS
******************************************************************************/

enum class NetworkConnectionState : unsigned int {
Expand Down Expand Up @@ -201,7 +194,7 @@ union TimeoutTable {
};

/******************************************************************************
CONSTANTS
CONSTANTS
******************************************************************************/

constexpr TimeoutTable DefaultTimeoutTable {
Expand Down
23 changes: 8 additions & 15 deletions src/ConnectionHandlerInterface.cpp
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
/*
This file is part of ArduinoIoTCloud.
This file is part of the Arduino_ConnectionHandler library.

Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
Copyright (c) 2024 Arduino SA

This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html

You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to [email protected].
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

/******************************************************************************
INCLUDE
INCLUDE
******************************************************************************/

#include "ConnectionHandlerInterface.h"

/******************************************************************************
CONSTRUCTOR/DESTRUCTOR
CONSTRUCTOR/DESTRUCTOR
******************************************************************************/

ConnectionHandler::ConnectionHandler(bool const keep_alive, NetworkAdapter interface)
Expand All @@ -37,7 +30,7 @@ ConnectionHandler::ConnectionHandler(bool const keep_alive, NetworkAdapter inter
}

/******************************************************************************
PUBLIC MEMBER FUNCTIONS
PUBLIC MEMBER FUNCTIONS
******************************************************************************/

NetworkConnectionState ConnectionHandler::check()
Expand Down
24 changes: 8 additions & 16 deletions src/ConnectionHandlerInterface.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
/*
This file is part of ArduinoIoTCloud.
This file is part of the Arduino_ConnectionHandler library.

Copyright 2019 ARDUINO SA (http://www.arduino.cc/)
Copyright (c) 2024 Arduino SA

This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html

You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to [email protected].
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#pragma once

/******************************************************************************
INCLUDES
INCLUDES
******************************************************************************/

#if !defined(__AVR__)
Expand All @@ -34,13 +27,13 @@
#include <utility>

/******************************************************************************
TYPEDEFS
TYPEDEFS
******************************************************************************/

typedef void (*OnNetworkEventCallback)();

/******************************************************************************
CLASS DECLARATION
CLASS DECLARATION
******************************************************************************/

// forward declaration FIXME
Expand Down Expand Up @@ -143,4 +136,3 @@ class ConnectionHandler {

friend GenericConnectionHandler;
};

24 changes: 10 additions & 14 deletions src/EthernetConnectionHandler.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
/*
This file is part of ArduinoIoTCloud.
Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
This software is released under the GNU General Public License version 3,
which covers the main part of arduino-cli.
The terms of this license can be found at:
https://www.gnu.org/licenses/gpl-3.0.en.html
You can be released from the requirements of the above licenses by purchasing
a commercial license. Buying such a license is mandatory if you want to modify or
otherwise use the software for commercial activities involving the Arduino
software without disclosing the source code of your own applications. To purchase
a commercial license, send an email to [email protected].
This file is part of the Arduino_ConnectionHandler library.

Copyright (c) 2020 Arduino SA

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

/******************************************************************************
INCLUDE
INCLUDE
******************************************************************************/

#include "ConnectionHandlerDefinitions.h"
Expand All @@ -22,7 +18,7 @@
#include "EthernetConnectionHandler.h"

/******************************************************************************
CTOR/DTOR
CTOR/DTOR
******************************************************************************/

static inline void fromIPAddress(const IPAddress src, models::ip_addr& dst) {
Expand Down Expand Up @@ -65,7 +61,7 @@ EthernetConnectionHandler::EthernetConnectionHandler(
}

/******************************************************************************
PROTECTED MEMBER FUNCTIONS
PROTECTED MEMBER FUNCTIONS
******************************************************************************/

NetworkConnectionState EthernetConnectionHandler::update_handleInit()
Expand Down
Loading