API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

AEECLSID_SECURESYSCLOCK

Brew Release
Brew MP 1.0.2
Description
This SecureSysClock class implements a secure clock that has an ISysClock interface. It is intended to be secure enough for checking time-based licenses for content and such. It is also good for logging and protocol implementations because it is the most accurate clock and doesn't vary by time zone. The user of the device cannot set it. It is usually set by some server in the wireless network which is controlled by the operator of the wireless network.
All time values given or returned regardless of resolution are represented as leap second compensated offsets to the epoch of Midnight Jan 6, 1980 UTC.
The secure clock maintains a notion of validity. The clock is considered invalid when it has not been set from a secure source. Calls to retrieve the time when the clock is invalid will return an error code. Also, a caller may register with the secure clock to be notified when the validity state of the clock changes or whenever time itself changes. This could be either becoming valid or invalid. On most devices the secure clock will remain valid once set. On devices with battery backed clocks it may remain valid even if the device is power cycled.
The secure clock is defined to return a time even when it is invalid. This is for backwards compatibility and convenience. Specifically the secure clock must return a value from a ticking clock that started with the epoch when the device was booted or the battery backed clock was first started. This is a requirement for all secure clock implementations.
For example if a call is made to the secure clock one hour after the device was powered on and it has not connected to any time source, it should return a time value of 1AM, Jan 6 1980 and a return code indicating the time is invalid (AEE_EBADSTATE).
If possible a caller of the secure clock should rely on the validity return code from GetTime rather than checking that the time value is far in the past (e.g., checking that the year is previous to 2000 or such).
On some devices the secure clock can be set by calling the SetTime method. In all cases the caller must have privileges AEECLSID_SecureSysClock and AEEPRIVID_SecureSysClockSet. For devices on networks that have an intrinsic time service (such as CDMA networks) the clock is generally always set automatically and the SetTime method will return an error if it is called. On networks that do not have an intrinsic time service (such as UMTS networks) the clock is not usually set automatically and must be set by some privilege application that connects to a secure time source.
Default Interface Name