kopia lustrzana https://gitlab.com/tomaszg/geostat
Add parent class Api to OCdb
rodzic
36eaed4953
commit
1a2a096651
2
gpx.h
2
gpx.h
|
@ -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;
|
||||
|
|
5
ocdb.cpp
5
ocdb.cpp
|
@ -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
7
ocdb.h
|
@ -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);
|
||||
};
|
||||
|
|
2
okapi.h
2
okapi.h
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
class Okapi : Api {
|
||||
class Okapi : public Api {
|
||||
private:
|
||||
std::string url;
|
||||
std::string key;
|
||||
|
|
Ładowanie…
Reference in New Issue