-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathleaguefiles.h
31 lines (27 loc) · 1 KB
/
leaguefiles.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
#ifndef LEAGUEFILES_H
#define LEAGUEFILES_H
#pragma once
#include <sqlite3.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <thread>
#include <chrono>
class leagueDBfind {
std::string installlocation, XDG_DATA_HOME, databaselocation, lockfile, portnum, password;
sqlite3 *database;
public:
leagueDBfind(); // constructor tries to find the location of the lutris database with the XDG_DATA_HOME environmental variable. If it doesn't, it gets set to ~/.local/share/lutris/pga.db
int open();
static int callback(void *currentDB, int a, char **res, char **azColName);
int getinstalllocation();
const std::string& getlocklocation();
const std::string& getdatabaselocation();
const std::string& thepassword();
const std::string& theportnum();
void setpassword(const std::string& pw);
void setportnum(const std::string& port);
};
std::ifstream getfile(leagueDBfind& database);
std::vector<std::string> getdata(std::ifstream &lockfile);
#endif // LEAGUEFILES_H