diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-09-26 20:44:41 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-09-26 20:45:27 (GMT) |
commit | 4b61e7363dbc0e8bf595da06840db4175e3b86c3 (patch) | |
tree | d33f51dec98251cf581da4ced909d07ebb2ecd24 /Swiften/Network/UnixNetworkEnvironment.h | |
parent | df957dbaaa42330ff888e42fe6f2d31c01d8129d (diff) | |
download | swift-contrib-4b61e7363dbc0e8bf595da06840db4175e3b86c3.zip swift-contrib-4b61e7363dbc0e8bf595da06840db4175e3b86c3.tar.bz2 |
Refactoring NetworkEnvironments.
Diffstat (limited to 'Swiften/Network/UnixNetworkEnvironment.h')
-rw-r--r-- | Swiften/Network/UnixNetworkEnvironment.h | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/Swiften/Network/UnixNetworkEnvironment.h b/Swiften/Network/UnixNetworkEnvironment.h index e4b2f37..8b51cae 100644 --- a/Swiften/Network/UnixNetworkEnvironment.h +++ b/Swiften/Network/UnixNetworkEnvironment.h @@ -16,44 +16,8 @@ namespace Swift { class UnixNetworkEnvironment : public NetworkEnvironment { - class UnixNetworkInterface : public NetworkInterface { public: - typedef boost::shared_ptr<UnixNetworkInterface> ref; - - public: - UnixNetworkInterface(std::string name) : name(name), loopback(false) { } - - std::vector<HostAddress> getAddresses() { - return addresses; - } - - std::string getName() { - return name; - } - - bool isLoopback() { - return loopback; - } - - private: - void addHostAddress(HostAddress address) { - addresses.push_back(address); - } - - void setLoopback(bool loopback) { - this->loopback = loopback; - } - - private: - friend class UnixNetworkEnvironment; - std::vector<HostAddress> addresses; - std::string name; - InterfaceType type; - bool loopback; - }; - -public: - std::vector<NetworkInterface::ref> getNetworkInterfaces(); + std::vector<NetworkInterface> getNetworkInterfaces() const; }; } |