aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/datetime/timezone-timedated.h (renamed from include/datetime/timezone-file.h)16
-rw-r--r--include/datetime/timezones-live.h6
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/main.cpp4
-rw-r--r--src/timezone-timedated.cpp (renamed from src/timezone-file.cpp)12
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/test-timezone-timedated.cpp (renamed from tests/test-timezone-file.cpp)8
7 files changed, 25 insertions, 25 deletions
diff --git a/include/datetime/timezone-file.h b/include/datetime/timezone-timedated.h
index 05dc7b0..3df9a3e 100644
--- a/include/datetime/timezone-file.h
+++ b/include/datetime/timezone-timedated.h
@@ -17,8 +17,8 @@
* Charles Kerr <charles.kerr@canonical.com>
*/
-#ifndef INDICATOR_DATETIME_FILE_TIMEZONE_H
-#define INDICATOR_DATETIME_FILE_TIMEZONE_H
+#ifndef INDICATOR_DATETIME_TIMEDATED_TIMEZONE_H
+#define INDICATOR_DATETIME_TIMEDATED_TIMEZONE_H
#include <datetime/timezone.h> // base class
@@ -31,11 +31,11 @@ namespace datetime {
/**
* \brief A #Timezone that gets its information from monitoring a file, such as /etc/timezone
*/
-class FileTimezone: public Timezone
+class TimedatedTimezone: public Timezone
{
public:
- FileTimezone();
- ~FileTimezone();
+ TimedatedTimezone();
+ ~TimedatedTimezone();
private:
class Impl;
@@ -43,12 +43,12 @@ private:
std::unique_ptr<Impl> impl;
// we have pointers in here, so disable copying
- FileTimezone(const FileTimezone&) =delete;
- FileTimezone& operator=(const FileTimezone&) =delete;
+ TimedatedTimezone(const TimedatedTimezone&) =delete;
+ TimedatedTimezone& operator=(const TimedatedTimezone&) =delete;
};
} // namespace datetime
} // namespace indicator
} // namespace unity
-#endif // INDICATOR_DATETIME_FILE_TIMEZONE_H
+#endif // INDICATOR_DATETIME_TIMEDATED_TIMEZONE_H
diff --git a/include/datetime/timezones-live.h b/include/datetime/timezones-live.h
index 49d9120..b9d78a5 100644
--- a/include/datetime/timezones-live.h
+++ b/include/datetime/timezones-live.h
@@ -22,8 +22,8 @@
#include <datetime/settings.h>
#include <datetime/timezones.h>
-#include <datetime/timezone-file.h>
#include <datetime/timezone-geoclue.h>
+#include <datetime/timezone-timedated.h>
#include <memory> // shared_ptr<>
@@ -32,7 +32,7 @@ namespace indicator {
namespace datetime {
/**
- * \brief #Timezones object that uses a #FileTimezone and #GeoclueTimezone
+ * \brief #Timezones object that uses a #TimedatedTimezone and #GeoclueTimezone
* to detect what timezone we're in
*/
class LiveTimezones: public Timezones
@@ -44,7 +44,7 @@ private:
void update_geolocation();
void update_timezones();
- FileTimezone m_file;
+ TimedatedTimezone m_file;
std::shared_ptr<const Settings> m_settings;
std::shared_ptr<GeoclueTimezone> m_geo;
};
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6f27e99..f8d219a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -33,9 +33,9 @@ set (SERVICE_CXX_SOURCES
settings-live.cpp
snap.cpp
sound.cpp
- timezone-file.cpp
timezone-geoclue.cpp
timezones-live.cpp
+ timezone-timedated.cpp
utils.c
wakeup-timer-mainloop.cpp
wakeup-timer-powerd.cpp)
diff --git a/src/main.cpp b/src/main.cpp
index 460f98c..c7769c9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -31,8 +31,8 @@
#include <datetime/settings-live.h>
#include <datetime/snap.h>
#include <datetime/state.h>
-#include <datetime/timezone-file.h>
#include <datetime/timezones-live.h>
+#include <datetime/timezone-timedated.h>
#include <datetime/wakeup-timer-powerd.h>
#include <notifications/notifications.h>
@@ -128,7 +128,7 @@ main(int /*argc*/, char** /*argv*/)
textdomain(GETTEXT_PACKAGE);
auto engine = create_engine();
- auto timezone_ = std::make_shared<FileTimezone>();
+ auto timezone_ = std::make_shared<TimedatedTimezone>();
auto state = create_state(engine, timezone_);
auto actions = std::make_shared<LiveActions>(state);
MenuFactory factory(actions, state);
diff --git a/src/timezone-file.cpp b/src/timezone-timedated.cpp
index ef9d78a..778697a 100644
--- a/src/timezone-file.cpp
+++ b/src/timezone-timedated.cpp
@@ -17,7 +17,7 @@
* Charles Kerr <charles.kerr@canonical.com>
*/
-#include <datetime/timezone-file.h>
+#include <datetime/timezone-timedated.h>
#include <gio/gio.h>
@@ -32,11 +32,11 @@ namespace datetime {
****
***/
-class FileTimezone::Impl
+class TimedatedTimezone::Impl
{
public:
- Impl(FileTimezone& owner):
+ Impl(TimedatedTimezone& owner):
m_owner(owner),
m_loop(g_main_loop_new(nullptr, FALSE))
{
@@ -208,7 +208,7 @@ out:
****
***/
- FileTimezone & m_owner;
+ TimedatedTimezone & m_owner;
unsigned long m_properties_changed_id = 0;
unsigned long m_bus_watch_id = 0;
unsigned long m_timeout_id = 0;
@@ -220,12 +220,12 @@ out:
****
***/
-FileTimezone::FileTimezone():
+TimedatedTimezone::TimedatedTimezone():
impl(new Impl{*this})
{
}
-FileTimezone::~FileTimezone()
+TimedatedTimezone::~TimedatedTimezone()
{
}
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9d26484..032b84e 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -58,7 +58,7 @@ add_test_by_name(test-locations)
add_test_by_name(test-menus)
add_test_by_name(test-planner)
add_test_by_name(test-settings)
-add_test_by_name(test-timezone-file)
+add_test_by_name(test-timezone-timedated)
add_test_by_name(test-utils)
set (TEST_NAME manual-test-snap)
diff --git a/tests/test-timezone-file.cpp b/tests/test-timezone-timedated.cpp
index 0ec496d..7086e96 100644
--- a/tests/test-timezone-file.cpp
+++ b/tests/test-timezone-timedated.cpp
@@ -20,13 +20,13 @@
#include "timedated-fixture.h"
-#include <datetime/timezone-file.h>
+#include <datetime/timezone-timedated.h>
#include <cstdio> // fopen()
//#include <sys/stat.h> // chmod()
#include <unistd.h> // sync()
-using unity::indicator::datetime::FileTimezone;
+using unity::indicator::datetime::TimedatedTimezone;
/**
* Test that timezone-file picks up the initial value
@@ -35,7 +35,7 @@ TEST_F(TimedateFixture, InitialValue)
{
const std::string expected_timezone = "America/Chicago";
set_timezone(expected_timezone);
- FileTimezone tz;
+ TimedatedTimezone tz;
ASSERT_EQ(expected_timezone, tz.timezone.get());
}
@@ -50,7 +50,7 @@ TEST_F(TimedateFixture, ChangedValue)
set_timezone(initial_timezone);
- FileTimezone tz;
+ TimedatedTimezone tz;
ASSERT_EQ(initial_timezone, tz.timezone.get());
bool changed = false;