Skip to content

Commit

Permalink
time sync rename utctimechanged to utctimeavailabilitychanged (projec…
Browse files Browse the repository at this point in the history
…t-chip#31549)

* renamed UTCTimeChanged to UTCTimeAvailabilityChanged

* update header usage
  • Loading branch information
fessehaeve authored Jan 19, 2024
1 parent d8ef6fc commit 4d33155
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/all-clusters-app/linux/ValveControlDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion examples/all-clusters-app/linux/ValveControlDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class DefaultTimeSyncDelegate : public Delegate
CHIP_ERROR UpdateTimeFromPlatformSource(chip::Callback::Callback<OnTimeSyncCompletion> * callback) override;
CHIP_ERROR UpdateTimeUsingNTPFallback(const CharSpan & fallbackNTP,
chip::Callback::Callback<OnFallbackNTPCompletion> * callback) override;
void UTCTimeChanged(uint64_t time) override;
void UTCTimeAvailabilityChanged(uint64_t time) override;
};

} // namespace TimeSynchronization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "time-synchronization-delegate.h"

#if TIME_SYNC_ENABLE_TSC_FEATURE
#include <app/ClusterStateCache.h>
#include <app/ReadClient.h>
#endif
#include <app/server/Server.h>
#include <app/util/af-types.h>
Expand Down

0 comments on commit 4d33155

Please sign in to comment.