aboutsummaryrefslogtreecommitdiff
path: root/tests/planner-mock.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-22 10:15:56 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-22 10:15:56 -0600
commit08b1cfd6bc97cae18b916d97a03781986e7421fe (patch)
treec776258f7a9a8a589fa07774ed753bfdfe9736eb /tests/planner-mock.h
parent063ff0ef0a7761e713b7b36e220e0e2bfa442326 (diff)
downloadayatana-indicator-datetime-08b1cfd6bc97cae18b916d97a03781986e7421fe.tar.gz
ayatana-indicator-datetime-08b1cfd6bc97cae18b916d97a03781986e7421fe.tar.bz2
ayatana-indicator-datetime-08b1cfd6bc97cae18b916d97a03781986e7421fe.zip
move planner-mock.h from include/datetime/ to tests/ because it's only needed by the tests.
Diffstat (limited to 'tests/planner-mock.h')
-rw-r--r--tests/planner-mock.h52
1 files changed, 19 insertions, 33 deletions
diff --git a/tests/planner-mock.h b/tests/planner-mock.h
index 8d7d7c2..44d30c7 100644
--- a/tests/planner-mock.h
+++ b/tests/planner-mock.h
@@ -1,9 +1,6 @@
/*
* Copyright 2013 Canonical Ltd.
*
- * Authors:
- * Charles Kerr <charles.kerr@canonical.com>
- *
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
* by the Free Software Foundation.
@@ -15,44 +12,33 @@
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Charles Kerr <charles.kerr@canonical.com>
*/
-#ifndef __INDICATOR_DATETIME_PLANNER_MOCK__H__
-#define __INDICATOR_DATETIME_PLANNER_MOCK__H__
-
-#include "planner.h" /* parent class */
+#ifndef INDICATOR_DATETIME_PLANNER_MOCK_H
+#define INDICATOR_DATETIME_PLANNER_MOCK_H
-G_BEGIN_DECLS
+#include <datetime/planner.h>
-#define INDICATOR_TYPE_DATETIME_PLANNER_MOCK (indicator_datetime_planner_mock_get_type())
-#define INDICATOR_DATETIME_PLANNER_MOCK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), INDICATOR_TYPE_DATETIME_PLANNER_MOCK, IndicatorDatetimePlannerMock))
-#define INDICATOR_DATETIME_PLANNER_MOCK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), INDICATOR_TYPE_DATETIME_PLANNER_MOCK, IndicatorDatetimePlannerMockClass))
-#define INDICATOR_IS_DATETIME_PLANNER_MOCK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), INDICATOR_TYPE_DATETIME_PLANNER_MOCK))
-
-typedef struct _IndicatorDatetimePlannerMock IndicatorDatetimePlannerMock;
-typedef struct _IndicatorDatetimePlannerMockPriv IndicatorDatetimePlannerMockPriv;
-typedef struct _IndicatorDatetimePlannerMockClass IndicatorDatetimePlannerMockClass;
-
-GType indicator_datetime_planner_mock_get_type (void);
+namespace unity {
+namespace indicator {
+namespace datetime {
/**
- * An IndicatorDatetimePlanner which uses Evolution Data Server
- * to get its list of appointments.
+ * \brief Planner which does nothing on its own.
+ * It requires its client must set its appointments property.
*/
-struct _IndicatorDatetimePlannerMock
-{
- /*< private >*/
- IndicatorDatetimePlanner parent;
- IndicatorDatetimePlannerMockPriv * priv;
-};
-
-struct _IndicatorDatetimePlannerMockClass
+class MockPlanner: public Planner
{
- IndicatorDatetimePlannerClass parent_class;
+public:
+ MockPlanner() =default;
+ virtual ~MockPlanner() =default;
};
-IndicatorDatetimePlanner * indicator_datetime_planner_mock_new (void);
-
-G_END_DECLS
+} // namespace datetime
+} // namespace indicator
+} // namespace unity
-#endif /* __INDICATOR_DATETIME_PLANNER_MOCK__H__ */
+#endif // INDICATOR_DATETIME_PLANNER_MOCK_H