Open Lighting Architecture  Latest Git
NetworkManagerInterface.h
Go to the documentation of this file.
1 /*
2  * This library is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU Lesser General Public
4  * License as published by the Free Software Foundation; either
5  * version 2.1 of the License, or (at your option) any later version.
6  *
7  * This library is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10  * Lesser General Public License for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public
13  * License along with this library; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15  *
16  * NetworkManagerInterface.h
17  * The glue between the ResponderHelper and the OLA network code.
18  * Copyright (C) 2013 Peter Newman
19  */
20 
29 #ifndef INCLUDE_OLA_RDM_NETWORKMANAGERINTERFACE_H_
30 #define INCLUDE_OLA_RDM_NETWORKMANAGERINTERFACE_H_
31 
33 #include <ola/network/Interface.h>
34 #include <ola/network/InterfacePicker.h>
35 #include <ola/rdm/RDMEnums.h>
36 
37 #include <string>
38 #include <vector>
39 
40 namespace ola {
41 namespace rdm {
42 
47  public:
49  virtual ~NetworkManagerInterface() {}
50 
54  virtual const ola::network::InterfacePicker *GetInterfacePicker() const = 0;
55 
62  virtual rdm_dhcp_status GetDHCPStatus(
63  const ola::network::Interface &iface) const = 0;
64 
76  virtual bool GetIPV4DefaultRoute(
77  int32_t *if_index,
78  ola::network::IPV4Address *default_route) const = 0;
79 
83  virtual const std::string GetHostname() const = 0;
84 
88  virtual const std::string GetDomainName() const = 0;
89 
93  virtual bool GetNameServers(
94  std::vector<ola::network::IPV4Address> *name_servers) const = 0;
95 };
96 } // namespace rdm
97 } // namespace ola
98 #endif // INCLUDE_OLA_RDM_NETWORKMANAGERINTERFACE_H_
virtual bool GetIPV4DefaultRoute(int32_t *if_index, ola::network::IPV4Address *default_route) const =0
Gets global network information.
Definition: NetworkManagerInterface.h:46
Given some initial parameters, find the best network interface to use.
Definition: InterfacePicker.h:48
Represents a IPv4 Address.
Definition: IPV4Address.h:55
Definition: Interface.h:35
virtual const ola::network::InterfacePicker * GetInterfacePicker() const =0
Represents an IPv4 Address.
virtual rdm_dhcp_status GetDHCPStatus(const ola::network::Interface &iface) const =0
Various constants used in RDM.
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
virtual const std::string GetHostname() const =0
virtual const std::string GetDomainName() const =0
virtual bool GetNameServers(std::vector< ola::network::IPV4Address > *name_servers) const =0