Voffcon Esp32 device server
|
A list to store IP addresses More...
Public Member Functions | |
bool | add (uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet) |
Add an ip address by providing four numbers of the IP addres each in the range of 0 - 255 More... | |
bool | add (IPAddress address) |
Add an ip address to the list by providing a IP address More... | |
bool | add (const char *strIpAddress) |
Add an ip address to the list by providing a string with a valid IP address More... | |
bool | exists (IPAddress address) |
Checks if a ip address exists in the list More... | |
bool | exists (String strIpaddress) |
Checks if a ip address exists in the list More... | |
int | indexOf (IPAddress address) |
Searches for the index of a ip address in the list. More... | |
bool | isEmpty () |
Checks if there are any ip addresses in the list More... | |
bool | remove (const char *strIpAddress) |
Removes a given IPAddress from the list More... | |
bool | remove (IPAddress address) |
Removes a given IPAddress from the list More... | |
String | toJson () |
Bundles all Ip addresses into a JSON array string More... | |
~IPAddressList () | |
The deconstructor, which cleans up when the list is no longer needed. More... | |
Public Member Functions inherited from LinkedList< IPAddress * > | |
LinkedList () | |
The list constructor More... | |
virtual int | size () |
Returns current size of LinkedList More... | |
virtual bool | add (int index, IPAddress *) |
Adds a T object in the specified index; Unlinkand link the LinkedList correcly; Increment _size More... | |
virtual bool | add (IPAddress *) |
Adds a T object in the end of the LinkedList; Increment _size; More... | |
virtual bool | unshift (IPAddress *) |
Adds a T object in the start of the LinkedList; Increment _size; More... | |
virtual bool | set (int index, IPAddress *) |
Set the object at index, with T; Increment _size; More... | |
virtual IPAddress * | remove (int index) |
Remove object at index; If index is not reachable, returns false; else, decrement _size More... | |
virtual IPAddress * | pop () |
Remove last object; More... | |
virtual IPAddress * | shift () |
Remove first object; More... | |
virtual IPAddress * | get (int index) |
Get the index'th element on the list; Return Element if accessible, else, return false; More... | |
virtual void | clear () |
Clear the entire array That is remove all objects from the list and delete them from memory More... | |
Additional Inherited Members | |
Protected Member Functions inherited from LinkedList< IPAddress * > | |
ListNode< IPAddress * > * | getNode (int index) |
Protected Attributes inherited from LinkedList< IPAddress * > | |
int | _size |
ListNode< IPAddress * > * | root |
ListNode< IPAddress * > * | last |
ListNode< IPAddress * > * | lastNodeGot |
int | lastIndexGot |
bool | isCached |
A list to store IP addresses
IPAddressList::~IPAddressList | ( | ) |
The deconstructor, which cleans up when the list is no longer needed.
bool IPAddressList::add | ( | uint8_t | first_octet, |
uint8_t | second_octet, | ||
uint8_t | third_octet, | ||
uint8_t | fourth_octet | ||
) |
Add an ip address by providing four numbers of the IP addres each in the range of 0 - 255
first_octet | First number of the ip address |
second_octet | Second number of the ip address |
third_octet | Third number of the ip address |
fourth_octet | Fourth number of the ip address |
bool IPAddressList::add | ( | IPAddress | ipAddress | ) |
Add an ip address to the list by providing a IP address
ipAddress | The IPAddress object to be added to the list |
bool IPAddressList::add | ( | const char * | strIpAddress | ) |
Add an ip address to the list by providing a string with a valid IP address
strIpAddress | a string with a valid IP address. The ip address "0.0.0.0" will be considered as an invalid ipaddress |
bool IPAddressList::exists | ( | IPAddress | address | ) |
Checks if a ip address exists in the list
address | The ip address to search for |
bool IPAddressList::exists | ( | String | strIpAddress | ) |
Checks if a ip address exists in the list
strIpAddress | The ip address to search for |
int IPAddressList::indexOf | ( | IPAddress | ipAddress | ) |
Searches for the index of a ip address in the list.
address | The ip address to search for. |
bool IPAddressList::isEmpty | ( | ) |
Checks if there are any ip addresses in the list
bool IPAddressList::remove | ( | const char * | strIpAddress | ) |
Removes a given IPAddress from the list
strIpAddress | A string containing the ipAddress to be removed. |
bool IPAddressList::remove | ( | IPAddress | ipAddress | ) |
Removes a given IPAddress from the list
ipAddress | The ipAddress to be removed. |
String IPAddressList::toJson | ( | ) |
Bundles all Ip addresses into a JSON array string