/// Gets the current time
/// </summary>
/// <returns>WatchTime</returns>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get current time because of invalid parameter.</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed to get current time because memory is not enough.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
throw new InvalidOperationException("Failed to get current time. err : " + err);
else if (err == Interop.Watch.ErrorCode.OutOfMemory)
throw new OutOfMemoryException("Failed to get current time. err : " + err);
+ else if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get current time. err : " + err);
}
return new WatchTime(handle);
}
/// Gets the type of periodic ambient tick.
/// </summary>
/// <returns>AmbientTickType</returns>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get ambient tick type.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if(err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to get ambient tick type. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get ambient tick type. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to get ambient tick type. err : " + err);
}
return ambientTickType;
/// If SetAmbientTickType is not called, OnAmbientTick will be called every minute.
/// </summary>
/// <param name="ambientTickType">the type of ambient tick</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to set ambient tick type.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if(err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to set ambient tick type. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to set ambient tick type. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to set ambient tick type. err : " + err);
}
}
/// </summary>
/// <param name="ticks">Ticks the number of ticks per given resolution type</param>
/// <param name="type">Type of the resolution type</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to set time tick frequency.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if (err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to set time tick frequency. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to set time tick frequency. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to set time tick frequency. err : " + err);
}
}
/// </summary>
/// <param name="ticks">Ticks the number of ticks per given resolution type</param>
/// <param name="type">Type of the resolution type</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get time tick frequency.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if (err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to get time tick frequency. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get time tick frequency. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to get time tick frequency. err : " + err);
}
}
}