Add parent class Api to OCdb

sql-rework
Tomasz Golinski 2019-10-04 00:43:39 +02:00
rodzic 36eaed4953
commit 1a2a096651
4 zmienionych plików z 13 dodań i 3 usunięć

2
gpx.h
Wyświetl plik

@ -10,7 +10,7 @@ class WPT;
class GPX;
} // namespace gpx
class GPX : Api {
class GPX : public Api {
private:
std::list<gpx::WPT*> items;
gpx::GPX* root;

Wyświetl plik

@ -278,3 +278,8 @@ bool OCdb::read_revision() {
return 1;
}
Caches OCdb::get_user_caches(std::string uuid, int count) {
Caches cc;
return cc;
}

7
ocdb.h
Wyświetl plik

@ -1,5 +1,8 @@
#pragma once
#include "cache.h"
#include "api.h"
#include <string>
#include <nlohmann/json_fwd.hpp>
@ -9,7 +12,7 @@ class Okapi;
using json = nlohmann::json;
class OCdb {
class OCdb : public Api {
private:
sqlite3* db;
sqlite3_stmt* stmt;
@ -28,4 +31,6 @@ public:
bool init(std::string json_file); // read db dump
bool update(Okapi& oc); // apply changelog
Caches get_user_caches(std::string uuid, int count = 0);
};

Wyświetl plik

@ -4,7 +4,7 @@
#include <string>
class Okapi : Api {
class Okapi : public Api {
private:
std::string url;
std::string key;