From 4d33155746258d9576620376632507c5b9566044 Mon Sep 17 00:00:00 2001 From: fesseha-eve <88329315+fessehaeve@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:39:20 +0100 Subject: [PATCH] time sync rename utctimechanged to utctimeavailabilitychanged (#31549) * renamed UTCTimeChanged to UTCTimeAvailabilityChanged * update header usage --- examples/all-clusters-app/linux/ValveControlDelegate.cpp | 2 +- examples/all-clusters-app/linux/ValveControlDelegate.h | 2 +- .../time-synchronization-server/DefaultTimeSyncDelegate.cpp | 2 +- .../time-synchronization-server/DefaultTimeSyncDelegate.h | 2 +- .../time-synchronization-server/time-synchronization-delegate.h | 2 +- .../time-synchronization-server/time-synchronization-server.cpp | 2 +- .../time-synchronization-server/time-synchronization-server.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/all-clusters-app/linux/ValveControlDelegate.cpp b/examples/all-clusters-app/linux/ValveControlDelegate.cpp index 9c51aff63101f5..d0ce1b4ab3a980 100644 --- a/examples/all-clusters-app/linux/ValveControlDelegate.cpp +++ b/examples/all-clusters-app/linux/ValveControlDelegate.cpp @@ -70,7 +70,7 @@ void ValveControlDelegate::HandleRemainingDurationTick(uint32_t duration) sLastOpenDuration = duration; } -void ExtendedTimeSyncDelegate::UTCTimeChanged(uint64_t time) +void ExtendedTimeSyncDelegate::UTCTimeAvailabilityChanged(uint64_t time) { ValveConfigurationAndControl::UpdateAutoCloseTime(time); } diff --git a/examples/all-clusters-app/linux/ValveControlDelegate.h b/examples/all-clusters-app/linux/ValveControlDelegate.h index 76f0f17a8fdfd1..8781137af299f5 100644 --- a/examples/all-clusters-app/linux/ValveControlDelegate.h +++ b/examples/all-clusters-app/linux/ValveControlDelegate.h @@ -40,7 +40,7 @@ namespace TimeSynchronization { class ExtendedTimeSyncDelegate : public DefaultTimeSyncDelegate { public: - void UTCTimeChanged(uint64_t time) override; + void UTCTimeAvailabilityChanged(uint64_t time) override; }; } // namespace TimeSynchronization diff --git a/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.cpp b/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.cpp index 3f97c57a7171fe..e436d19f6d6136 100644 --- a/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.cpp +++ b/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.cpp @@ -74,7 +74,7 @@ CHIP_ERROR DefaultTimeSyncDelegate::UpdateTimeUsingNTPFallback(const CharSpan & return CHIP_ERROR_NOT_IMPLEMENTED; } -void DefaultTimeSyncDelegate::UTCTimeChanged(uint64_t time) +void DefaultTimeSyncDelegate::UTCTimeAvailabilityChanged(uint64_t time) { // placeholder implementation } diff --git a/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.h b/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.h index 826f1d22d82707..01f156e4ea2ccb 100644 --- a/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.h +++ b/src/app/clusters/time-synchronization-server/DefaultTimeSyncDelegate.h @@ -36,7 +36,7 @@ class DefaultTimeSyncDelegate : public Delegate CHIP_ERROR UpdateTimeFromPlatformSource(chip::Callback::Callback * callback) override; CHIP_ERROR UpdateTimeUsingNTPFallback(const CharSpan & fallbackNTP, chip::Callback::Callback * callback) override; - void UTCTimeChanged(uint64_t time) override; + void UTCTimeAvailabilityChanged(uint64_t time) override; }; } // namespace TimeSynchronization diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-delegate.h b/src/app/clusters/time-synchronization-server/time-synchronization-delegate.h index 1f424e31798c44..6ef37f2403927d 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-delegate.h +++ b/src/app/clusters/time-synchronization-server/time-synchronization-delegate.h @@ -108,7 +108,7 @@ class Delegate /** * @brief Signals application that UTCTime has changed through the timesync cluster. */ - virtual void UTCTimeChanged(uint64_t time) = 0; + virtual void UTCTimeAvailabilityChanged(uint64_t time) = 0; virtual ~Delegate() = default; diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp index fae9565ef21599..217f44a3c61df2 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp +++ b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp @@ -776,7 +776,7 @@ CHIP_ERROR TimeSynchronizationServer::SetUTCTime(EndpointId ep, uint64_t utcTime ChipLogError(Zcl, "Error setting UTC time on the device"); return err; } - GetDelegate()->UTCTimeChanged(utcTime); + GetDelegate()->UTCTimeAvailabilityChanged(utcTime); mGranularity = granularity; EmberAfStatus status = TimeSource::Set(ep, source); if (!(status == EMBER_ZCL_STATUS_SUCCESS || status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE)) diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-server.h b/src/app/clusters/time-synchronization-server/time-synchronization-server.h index 5eee8e52b000b8..c6012b19bb0836 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-server.h +++ b/src/app/clusters/time-synchronization-server/time-synchronization-server.h @@ -29,7 +29,7 @@ #include "time-synchronization-delegate.h" #if TIME_SYNC_ENABLE_TSC_FEATURE -#include +#include #endif #include #include