Skip to content

Commit 321b434

Browse files
committed
Add support network features disabling
1 parent ead297c commit 321b434

File tree

462 files changed

+1069
-778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

462 files changed

+1069
-778
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/mobizt/FirebaseClient/.github%2Fworkflows%2Fcompile_library.yml?logo=github&label=compile) [![Github Stars](https://img.shields.io/github/stars/mobizt/FirebaseClient?logo=github)](https://github.com/mobizt/FirebaseClient/stargazers) ![Github Issues](https://img.shields.io/github/issues/mobizt/FirebaseClient?logo=github)
44

5-
![GitHub Release](https://img.shields.io/github/v/release/mobizt/FirebaseClient) ![Arduino](https://img.shields.io/badge/Arduino-v2.0.4-57C207?logo=arduino) ![PlatformIO](https://badges.registry.platformio.org/packages/mobizt/library/FirebaseClient.svg) ![GitHub Release Date](https://img.shields.io/github/release-date/mobizt/FirebaseClient)
5+
![GitHub Release](https://img.shields.io/github/v/release/mobizt/FirebaseClient) ![Arduino](https://img.shields.io/badge/Arduino-v2.0.5-57C207?logo=arduino) ![PlatformIO](https://badges.registry.platformio.org/packages/mobizt/library/FirebaseClient.svg) ![GitHub Release Date](https://img.shields.io/github/release-date/mobizt/FirebaseClient)
66

7-
Revision `2025-05-20`
7+
Revision `2025-05-22`
88

99
## Introduction
1010

@@ -151,6 +151,8 @@ If the network config/identifier was not assigned, library will assumed that you
151151

152152
The status of WiFi, Ethernet and PPP network connection will be checked by default in this case.
153153

154+
You can disable all network features of library by assigning the macro `DISABLE_NERWORK` e.g. `#define DISABLE_NERWORK` before including the library header file `FirebaseClient.h`.
155+
154156
The result of a async task can be obtained from the `AsyncResult` class object. This object provides the debug, authentication process event, error information and the response payload of the request.
155157

156158
If no async callback function assigned with the function, the `AsyncResult` class object should be assigned otherwise it will work in sync mode.
@@ -747,6 +749,8 @@ ENABLE_ASYNC_TCP_CLIENT // For Async TCP Client usage.
747749
FIREBASE_ASYNC_QUEUE_LIMIT // For maximum async queue limit (number) setting for an async client.
748750
FIREBASE_PRINTF_PORT // For Firebase.printf debug port class object.
749751
FIREBASE_PRINTF_BUFFER // Firebase.printf buffer size. The default printf buffer size is 1024 for ESP8266 and SAMD otherwise 4096. Some debug message may be truncated for larger text.
752+
753+
DISABLE_NERWORK // For network features disabling.
750754
```
751755

752756
The library code size is varied from 80k - 110k (WiFi and WiFiClientSecure excluded) depends on the build options.

examples/App/AppInitialization/CustomAuth/CustomAuth.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
#define ENABLE_USER_CONFIG
8484
#define ENABLE_CUSTOM_AUTH
8585

86+
// For network independent usage (disable all network features).
87+
// #define DISABLE_NERWORKS
88+
8689
#include <FirebaseClient.h>
8790
#include "ExampleFunctions.h" // Provides the functions used in the examples.
8891

examples/App/AppInitialization/CustomAuthFile/CustomAuthFile.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484
#define ENABLE_CUSTOM_AUTH
8585
#define ENABLE_FS
8686

87+
// For network independent usage (disable all network features).
88+
// #define DISABLE_NERWORKS
89+
8790
#include <FirebaseClient.h>
8891
#include "ExampleFunctions.h" // Provides the functions used in the examples.
8992

examples/App/AppInitialization/NoAuth/NoAuth.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
// adding the following macros before FirebaseClient.h
5555
#define ENABLE_USER_CONFIG
5656

57+
// For network independent usage (disable all network features).
58+
// #define DISABLE_NERWORKS
59+
5760
#include <FirebaseClient.h>
5861
#include "ExampleFunctions.h" // Provides the functions used in the examples.
5962

examples/App/AppInitialization/ReAuthenticate/ReAuthenticate.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
#define ENABLE_USER_CONFIG
2626
#define ENABLE_USER_AUTH
2727

28+
// For network independent usage (disable all network features).
29+
// #define DISABLE_NERWORKS
30+
2831
#include <FirebaseClient.h>
2932
#include "ExampleFunctions.h" // Provides the functions used in the examples.
3033

examples/App/AppInitialization/SaveAndLoad/SaveAndLoad.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#define ENABLE_USER_AUTH
1313
#define ENABLE_FS
1414

15+
// For network independent usage (disable all network features).
16+
// #define DISABLE_NERWORKS
17+
1518
#include <FirebaseClient.h>
1619
#include "ExampleFunctions.h" // Provides the functions used in the examples.
1720

examples/App/AppInitialization/ServiceAuth/ServiceAuth.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
#define ENABLE_USER_CONFIG
7474
#define ENABLE_SERVICE_AUTH
7575

76+
// For network independent usage (disable all network features).
77+
// #define DISABLE_NERWORKS
78+
7679
#include <FirebaseClient.h>
7780
#include "ExampleFunctions.h" // Provides the functions used in the examples.
7881

examples/App/AppInitialization/ServiceAuthFile/ServiceAuthFile.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
#define ENABLE_SERVICE_AUTH
7474
#define ENABLE_FS
7575

76+
// For network independent usage (disable all network features).
77+
// #define DISABLE_NERWORKS
78+
7679
#include <FirebaseClient.h>
7780
#include "ExampleFunctions.h" // Provides the functions used in the examples.
7881

examples/App/AppInitialization/TokenAuth/AccessToken/AccessToken.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
#define ENABLE_USER_CONFIG
6464
#define ENABLE_ACCESS_TOKEN
6565

66+
// For network independent usage (disable all network features).
67+
// #define DISABLE_NERWORKS
68+
6669
#include <FirebaseClient.h>
6770
#include "ExampleFunctions.h" // Provides the functions used in the examples.
6871

examples/App/AppInitialization/TokenAuth/CustomToken/CustomToken.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
#define ENABLE_USER_CONFIG
6262
#define ENABLE_CUSTOM_TOKEN
6363

64+
// For network independent usage (disable all network features).
65+
// #define DISABLE_NERWORKS
66+
6467
#include <FirebaseClient.h>
6568
#include "ExampleFunctions.h" // Provides the functions used in the examples.
6669

0 commit comments

Comments
 (0)