summaryrefslogtreecommitdiff
path: root/tools.cpp
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-03-23 01:01:32 +0100
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-03-23 01:01:32 +0100
commit78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b (patch)
tree76f900ca7235290c88a2fce69b451714de734bbf /tools.cpp
parent0f276e51c7dbf0e36baf35823f8b17163d094b39 (diff)
downloadvdr-plugin-live-78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b.tar.gz
vdr-plugin-live-78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b.tar.bz2
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.
Diffstat (limited to 'tools.cpp')
-rw-r--r--tools.cpp18
1 files changed, 18 insertions, 0 deletions
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