From 78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sun, 23 Mar 2008 01:01:32 +0100 Subject: Some clean up in the timer editing call. Prepeared timer edititing to be a popup like the epg-data. This is not finished yet and seems to have some problems with the form and the popup. So the overall functionality is disabled. Never the less some of the changes for this are of general interrest, so current work was commited. Changes in the styles for this. --- tools.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tools.cpp') diff --git a/tools.cpp b/tools.cpp index 5fee00b..8b6006e 100644 --- a/tools.cpp +++ b/tools.cpp @@ -293,5 +293,23 @@ namespace vdrlive { return FormatDateTime(cformat.c_str(), date); } + std::string EncodeDomId(std::string const & toEncode, char const * from, char const * to) + { + std::string encoded = toEncode; + for (; *from && *to; from++, to++) { + replace(encoded.begin(), encoded.end(), *from, *to); + } + return encoded; + } + + std::string DecodeDomId(std::string const & toDecode, char const * from, char const * to) + { + std::string decoded = toDecode; + for (; *from && *to; from++, to++) { + replace(decoded.begin(), decoded.end(), *from, *to); + } + return decoded; + } + } // namespace vdrlive -- cgit v1.2.3