diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-09 21:08:47 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-03-09 21:08:47 -0500 |
commit | 3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1 (patch) | |
tree | ab1f4ba4e7635b3ea2cb600cc8de9b3e52a6c9d1 /include/datetime/planner-eds.h | |
parent | 375277fa6b2c8eaac2e2a824bd1e43bbd54b75e3 (diff) | |
download | ayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.tar.gz ayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.tar.bz2 ayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.zip |
decouple the planner's states; need three separate sets: upcoming-now (for alarms in the current time), upcoming-calendar (to show events coming from the selected calendar date), and calendar-month (all the appointments in the month displayed in the menu).
Diffstat (limited to 'include/datetime/planner-eds.h')
-rw-r--r-- | include/datetime/planner-eds.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/datetime/planner-eds.h b/include/datetime/planner-eds.h index 3d558df..95b5d79 100644 --- a/include/datetime/planner-eds.h +++ b/include/datetime/planner-eds.h @@ -20,8 +20,9 @@ #ifndef INDICATOR_DATETIME_PLANNER_EDS_H #define INDICATOR_DATETIME_PLANNER_EDS_H -#include <datetime/clock.h> -#include <datetime/planner.h> +#include <datetime/planner-range.h> + +#include <datetime/engine-eds.h> #include <datetime/timezone.h> #include <memory> // shared_ptr, unique_ptr @@ -31,18 +32,24 @@ namespace indicator { namespace datetime { /** - * \brief Planner which uses EDS as its backend + * \brief An EDS-based #RangePlanner */ -class PlannerEds: public Planner +class EdsPlanner: public RangePlanner { public: - PlannerEds(const std::shared_ptr<Clock>& clock, + EdsPlanner(const std::shared_ptr<EdsEngine>& eds_engine, const std::shared_ptr<Timezone>& timezone); - virtual ~PlannerEds(); + virtual ~EdsPlanner(); + + core::Property<std::vector<Appointment>>& appointments(); + +protected: + void rebuild_now(); private: - class Impl; - std::unique_ptr<Impl> p; + std::shared_ptr<EdsEngine> m_engine; + std::shared_ptr<Timezone> m_timezone; + core::Property<std::vector<Appointment>> m_appointments; }; } // namespace datetime |