| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2008, 2011 Will Stephenson <[email protected]> |
| 3 | SPDX-FileCopyrightText: 2013 Daniel Nicoletti <[email protected]> |
| 4 | |
| 5 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 6 | */ |
| 7 | |
| 8 | #ifndef NETWORKMANAGERQT_IPADDRESS_H |
| 9 | #define NETWORKMANAGERQT_IPADDRESS_H |
| 10 | |
| 11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
| 12 | |
| 13 | #include <QNetworkAddressEntry> |
| 14 | |
| 15 | namespace NetworkManager |
| 16 | { |
| 17 | /*! |
| 18 | * \class NetworkManager::IpAddress |
| 19 | * \inheaderfile NetworkManagerQt/IpAddress |
| 20 | * \inmodule NetworkManagerQt |
| 21 | * |
| 22 | * \brief This class represents IP address. |
| 23 | */ |
| 24 | class NETWORKMANAGERQT_EXPORT IpAddress : public QNetworkAddressEntry |
| 25 | { |
| 26 | public: |
| 27 | /*! |
| 28 | * Constructs an empty IpAddress object. |
| 29 | */ |
| 30 | IpAddress(); |
| 31 | |
| 32 | /*! |
| 33 | * Constructs an IpAddress object that is a copy of the object other. |
| 34 | */ |
| 35 | IpAddress(const IpAddress &other); |
| 36 | |
| 37 | /*! |
| 38 | * Destroys this IpAddress object. |
| 39 | */ |
| 40 | ~IpAddress(); |
| 41 | |
| 42 | /*! |
| 43 | * Return if the IP address is defined. |
| 44 | */ |
| 45 | bool isValid() const; |
| 46 | |
| 47 | /*! |
| 48 | * Defines the default \a gateway of this object. |
| 49 | */ |
| 50 | void setGateway(const QHostAddress &gateway); |
| 51 | |
| 52 | /*! |
| 53 | * Returns the default gateway of this object. |
| 54 | */ |
| 55 | QHostAddress gateway() const; |
| 56 | |
| 57 | /*! |
| 58 | * Makes a copy of the IpAddress object \a other. |
| 59 | */ |
| 60 | IpAddress &operator=(const IpAddress &other); |
| 61 | |
| 62 | private: |
| 63 | class Private; |
| 64 | Private *const d; |
| 65 | }; |
| 66 | /*! |
| 67 | * \typedef NetworkManager::IpAddresses |
| 68 | */ |
| 69 | typedef QList<IpAddress> IpAddresses; |
| 70 | |
| 71 | } // namespace NetworkManager |
| 72 | |
| 73 | #endif // NETWORKMANAGERQT_IPADDRESS_H |
| 74 | |