aboutsummaryrefslogtreecommitdiff
path: root/tests/print-to.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-05-21 07:47:24 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-05-21 07:47:24 -0500
commit58efd72df90047765721c6e931da22abdb3a956a (patch)
tree8297e39dd08e4428636e8f4465eccadd182e43ff /tests/print-to.h
parent1b2b949e449ed961624828e7d13bbf53f56abda8 (diff)
downloadayatana-indicator-datetime-58efd72df90047765721c6e931da22abdb3a956a.tar.gz
ayatana-indicator-datetime-58efd72df90047765721c6e931da22abdb3a956a.tar.bz2
ayatana-indicator-datetime-58efd72df90047765721c6e931da22abdb3a956a.zip
in eds-engine, add a occur-in-time-range sexp to handle events that are interesting but don't require user notification alarms
Diffstat (limited to 'tests/print-to.h')
-rw-r--r--tests/print-to.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/print-to.h b/tests/print-to.h
index 78cf574..f4af2f7 100644
--- a/tests/print-to.h
+++ b/tests/print-to.h
@@ -33,9 +33,18 @@ namespace datetime {
***/
void
+PrintTo(const DateTime& datetime, std::ostream* os)
+{
+ *os << "{time:'" << datetime.format("%F %T %z") << '}';
+}
+
+void
PrintTo(const Alarm& alarm, std::ostream* os)
{
- *os << "{text:'" << alarm.text << "', audio_url:'" << alarm.audio_url << "', time:'"<<alarm.time.format("%F %T")<<"'}";
+ *os << '{';
+ *os << "{text:" << alarm.text << '}';
+ PrintTo(alarm.time, os);
+ *os << '}';
}
} // namespace datetime