10 #ifndef YARP_OS_IMPL_NAMECONFIG_H
11 #define YARP_OS_IMPL_NAMECONFIG_H
20 #define YARP_CONFIG_FILENAME "yarp.conf"
21 #define YARP_CONFIG_NAMESPACE_FILENAME "yarp_namespace.conf"
30 static std::string expandFilename(
const char* fname);
32 std::string getSafeString(
const std::string& txt);
34 std::string getConfigFileName(
const char* stem =
nullptr,
35 const char* ns =
nullptr);
37 std::string readConfig(
const std::string& fileName);
39 bool writeConfig(
const std::string& fileName,
const std::string& text);
41 bool fromFile(
const char* ns =
nullptr);
43 bool toFile(
bool clean =
false);
45 void setAddress(
const Contact& address);
47 static std::string getHostName(
bool prefer_loopback =
false,
48 const std::string& seed =
"");
50 static std::string getIps();
54 static bool isLocalName(
const std::string& name);
68 std::string getNamespace(
bool refresh =
false);
72 void setNamespace(
const std::string& ns);
80 bool fromString(
const std::string& txt);
87 #endif // YARP_OS_IMPL_NAMECONFIG_H