-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppTracker.h
45 lines (34 loc) · 1.06 KB
/
AppTracker.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef APPTRACKER_H
#define APPTRACKER_H
#include "DatabaseManager.h"
#include "IWindowInterface.h"
#include <memory>
/**
* @class AppTracker
* @brief Main interface - starts the window tracking and logging process.
* Only the Windows OS is supported.
* @author Syed Ali
*/
class AppTracker {
public:
// default ctor.
AppTracker();
// operator overload that prints results
friend std::ostream& operator<<(std::ostream& os, AppTracker& a);
// startTracking Method - throws error if OS is not windows. controlled by
// tracking boolean
void startTracking();
// sets tracking boolean to false
void stopTracking();
// return a vector of all the AppEntries from the AppUsage table
std::vector<AppEntry> getAppEntries();
// clear the tracking entries
void clearTracking();
// returns a reference dbManager
DatabaseManager& getDatabaseManager();
// gets tracking boolean
[[nodiscard]] bool getTrackingBool() const;
private:
std::unique_ptr<IWindowInterface> windowTracker;
};
#endif // APPTRACKER_H