From 4ff5f1b52b27d7b86d77ce956d79a1453810385b Mon Sep 17 00:00:00 2001 From: methodus Date: Sun, 23 Sep 2012 21:26:49 +0200 Subject: Added setup menu and the possibility to use live-plugin instead of the internal presentation page --- common/config.cpp | 9 ++++++--- common/tools.cpp | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/config.cpp b/common/config.cpp index ff24976..1668369 100644 --- a/common/config.cpp +++ b/common/config.cpp @@ -15,17 +15,20 @@ using namespace upnp; upnp::cConfig::cConfig() : enabled(true) , expertSettings(false) -, useInternalWebserver(false) , webServerPort(0) , presentationURL("index.html") +, useLive(false) +, livePort(8008) , maxContentLength(KB(20)) , announceMaxAge(1800) , deviceUUID(tools::GenerateUUIDRandomly()) -, serviceURL("services/") -, staticContentURL("http/") , bindToAddress(true) , address("0.0.0.0") , port(0) , databaseFile("metadata.db") { } + +void upnp::cConfig::GenerateNewDeviceUUID(){ + deviceUUID = tools::GenerateUUIDRandomly(); +} diff --git a/common/tools.cpp b/common/tools.cpp index 1b725e6..7ddfc4f 100644 --- a/common/tools.cpp +++ b/common/tools.cpp @@ -55,8 +55,8 @@ string GetNetworkInterfaceByIndex(int Index, bool skipLoop){ return GetNetworkInterfaces(skipLoop)[Index]; } -vector GetNetworkInterfaces(bool skipLoop){ - vector interfaces; +StringVector GetNetworkInterfaces(bool skipLoop){ + StringVector interfaces; int fd; struct ifconf ifc; @@ -457,3 +457,4 @@ IXML_Element* IxmlReplaceProperty(IXML_Document* document, IXML_Element* node, c } // namespace ixml } // namespace upnp + -- cgit v1.2.3