File indexing completed on 2024-05-19 16:38:20

0001 /*
0002     SPDX-FileCopyrightText: 2015, 2016 Ivan Cukic <ivan.cukic(at)kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef CLEANING_H
0008 #define CLEANING_H
0009 
0010 #include "query.h"
0011 #include "terms.h"
0012 #include <QString>
0013 
0014 namespace KActivities
0015 {
0016 namespace Stats
0017 {
0018 /**
0019  * Forget the resource(s) for the specified activity and agent
0020  */
0021 void KACTIVITIESSTATS_EXPORT forgetResource(Terms::Activity activity, Terms::Agent agent, const QString &resource);
0022 
0023 enum KACTIVITIESSTATS_EXPORT TimeUnit {
0024     Hours,
0025     Days,
0026     Months,
0027 };
0028 
0029 /**
0030  * Forget recent stats for the specified activity and time
0031  */
0032 void KACTIVITIESSTATS_EXPORT forgetRecentStats(Terms::Activity activity, int count, TimeUnit what);
0033 
0034 /**
0035  * Forget events that are older than the specified number of months
0036  */
0037 void KACTIVITIESSTATS_EXPORT forgetEarlierStats(Terms::Activity activity, int months);
0038 
0039 /**
0040  * Forget resources that match the specified query
0041  */
0042 void KACTIVITIESSTATS_EXPORT forgetResources(const Query &query);
0043 
0044 } // namespace Stats
0045 } // namespace KActivities
0046 
0047 #endif // CLEANING_H