From 902c8c38d261b1e73329ab4b9fefcfe11995c8b7 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 20 Nov 2013 14:10:33 -0500 Subject: UI basically works, almost ready for testing and packaging... --- node/Node.cpp | 5 +++++ node/Node.hpp | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'node') diff --git a/node/Node.cpp b/node/Node.cpp index fe8cfb18..c88741a6 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -182,6 +182,11 @@ unsigned long Node::LocalClient::send(const char *command) } } +std::vector Node::LocalClient::splitLine(const char *line) +{ + return Utils::split(line," ","\\","\""); +} + struct _NodeImpl { RuntimeEnvironment renv; diff --git a/node/Node.hpp b/node/Node.hpp index 238b5fce..2f7d43ed 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -71,6 +71,15 @@ public: unsigned long send(const char *command) throw(); + /** + * Split a line of results by space + * + * @param line Line to split + * @return Vector of fields + */ + static std::vector splitLine(const char *line); + static inline std::vector splitLine(const std::string &line) { return splitLine(line.c_str()); } + private: // LocalClient is not copyable LocalClient(const LocalClient&); @@ -140,7 +149,7 @@ public: /** * Get the ZeroTier version in major.minor.revision string format - * + * * @return Version in string form */ static const char *versionString() -- cgit v1.2.3