/// <summary>
/// Base class for application statistics.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public abstract class AppStatistics
{
internal const string AppStatsQueryResult = "QueryResult";
/// <summary>
/// Base class which contains application statistics query result.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public abstract class AppStatisticsData
{
internal AppStatisticsData()
/// <summary>
/// Gets the application id.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <value>The application id.</value>
public string AppId { get; protected set; }
}
/// <summary>
/// This class provides APIs to query battery consumption per application.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class BatteryStatistics : AppStatistics
{
private const string AppStatsConsumption = "TotalAmount";
/// <summary>
/// The default constructor of BatteryStatistics class.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <feature>http://tizen.org/feature/app_history</feature>
/// <feature>http://tizen.org/feature/battery</feature>
/// <exception cref="InvalidOperationException">Thrown when method fail due to internal error.</exception>
/// <summary>
/// The constructor of BatteryStatistics class.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="order">The criteria of the battery statistics sorted by.</param>
/// <feature>http://tizen.org/feature/app_history</feature>
/// <feature>http://tizen.org/feature/battery</feature>
/// <summary>
/// Retrieves a given type of battery statistics.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="startTime">The start time of the data to be aggregated.</param>
/// <param name="endTime">The end time of the data to be aggregated.</param>
/// <returns>Battery statistics data retrieved.</returns>
/// <summary>
/// Retrieves a given type of battery statistics.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="startTime">The start time of the data to be aggregated.</param>
/// <param name="endTime">The end time of the data to be aggregated.</param>
/// <param name="resultSize">The number of data records to be retrieved.</param>
/// <summary>
/// Gets the last time when the device was fully charged.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <returns>The last time when the device was fully charged.</returns>
/// <feature>http://tizen.org/feature/app_history</feature>
/// <feature>http://tizen.org/feature/battery</feature>
/// <summary>
/// Gets the criteria of battery statistics sorted by.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <value>The criteria of battery statistics sorted by.</value>
public SortOrderType SortOrder { get; private set; }
/// <summary>
/// Sort order type of battery statistics.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum SortOrderType
{
/// <summary>
/// <summary>
/// The class contains battery statistics information retrieved by BatteryStatistics.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class BatteryStatisticsData : AppStatisticsData
{
internal BatteryStatisticsData(string appId, double consumption)
/// Gets how many percentage of battery capacity was used by the application.
/// </summary>
/// <value>Battery consumption used by the application.</value>
+ /// <since_tizen> 4 </since_tizen>
public double Consumption { get; private set; }
}
}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/// <summary>
+/// The Tizen.Context.AppHistory namespace provides classes to retrieve the user's application usage patterns.
+/// </summary>
+/// <remarks>
+/// The Tizen.Context.AppHistory namespace provides classes to retrieve the user's application usage patterns.
+/// </remarks>
+/// <since_tizen> 4 </since_tizen>
+namespace Tizen.Context.AppHistory {}
/// <summary>
/// This class provides APIs to query application launch history.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class UsageStatistics : AppStatistics
{
private const string AppStatsDuration = "TotalDuration";
/// <summary>
/// The default constructor of UsageStatistics class.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <feature>http://tizen.org/feature/app_history</feature>
/// <exception cref="InvalidOperationException">Thrown when method fail due to internal error.</exception>
/// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
/// <summary>
/// The constructor of UsageStatistics class.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="order">The criteria of the usage statistics sorted by.</param>
/// <feature>http://tizen.org/feature/app_history</feature>
/// <exception cref="ArgumentException">Thrown when an invalid argument is used.</exception>
/// <summary>
/// Retrieves a given type of usage statistics.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="startTime">The start time of the data to be aggregated.</param>
/// <param name="endTime">The end time of the data to be aggregated.</param>
/// <returns>Usage statistics data retrieved.</returns>
/// <summary>
/// Retrieves a given type of usage statistics.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <param name="startTime">The start time of the data to be aggregated.</param>
/// <param name="endTime">The end time of the data to be aggregated.</param>
/// <param name="resultSize">The number of data records to be retrieved.</param>
/// <summary>
/// Gets the criteria of usage statistics sorted by.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <value>The criteria of usage statistics sorted by.</value>
public SortOrderType SortOrder { get; private set; }
/// <summary>
/// Sort order type of usage statistics
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public enum SortOrderType
{
/// <summary>
/// <summary>
/// The class contains application usage statistics information retrieved by UsageStatistics.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
public class UsageStatisticsData : AppStatisticsData
{
internal UsageStatisticsData(string appId, int duration, int launchCount, DateTime lastLaunchTime)
/// <summary>
/// Gets the time which the application is being displayed in the foreground in seconds.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <value>Duration which the application is used in the foreground in seconds.</value>
public int Duration { get; private set; }
/// <summary>
/// Gets how many times the application is used in the foreground.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <value>How many times the application is used in the foreground.</value>
public int LaunchCount { get; private set; }
/// <summary>
/// Gets the last time when the application has been used.
/// </summary>
+ /// <since_tizen> 4 </since_tizen>
/// <value>The last time when the application has been used.</value>
public DateTime LastLaunchTime { get; private set; }
}