about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorComradeCrow <comradecrow@vivaldi.net>2023-05-09 19:03:53 -0700
committerComradeCrow <comradecrow@vivaldi.net>2023-05-09 19:03:53 -0700
commit0bde4573e5301f682d438856c4622209549718c9 (patch)
tree8b293d0ae2721f585e817240b819392cda480ddf /src
parent0638f3cc60d5e76b3f562aa54258bbc8641af141 (diff)
downloadytcpp-0bde4573e5301f682d438856c4622209549718c9.tar.gz
slight update
try to get cmake to recognise python again
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
-rw-r--r--src/sqliteinterface.cpp14
-rw-r--r--src/sqliteinterface.hpp4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ec86677..2f75391 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -133,6 +133,6 @@ void parseSysArgs(int argc, char **argv) {
 int main(int argc, char **argv) {
 
     parseSysArgs(argc, argv);
-    
+    SqliteInterface sqldb;
 
 }
\ No newline at end of file
diff --git a/src/sqliteinterface.cpp b/src/sqliteinterface.cpp
index ec1a978..39bdb3b 100644
--- a/src/sqliteinterface.cpp
+++ b/src/sqliteinterface.cpp
@@ -57,8 +57,7 @@ static int callback(void *NotUsed, int argc, char **argv, char **azColName) {
     return 0;
 }
 
-void SqliteInterface::createTables()
-{
+void SqliteInterface::createTables() {
 
     char *errmsg = 0;
     int rc = sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS INSTANCES (url TEXT PRIMARY KEY, health, location);", callback, 0, &errmsg);
@@ -71,19 +70,18 @@ void SqliteInterface::createTables()
 
 }
 
-void SqliteInterface::saveVideo() {
-
+void SqliteInterface::saveVideo(const Video::video& vid) {
 
+    
 }
 
-SqliteInterface::SqliteInterface()
-{
+SqliteInterface::SqliteInterface() {
 
     openDB();
+    createTables();
 }
 
-SqliteInterface::~SqliteInterface()
-{
+SqliteInterface::~SqliteInterface() {
 
     closeDB();
 }
\ No newline at end of file
diff --git a/src/sqliteinterface.hpp b/src/sqliteinterface.hpp
index 617ebd3..8d7f016 100644
--- a/src/sqliteinterface.hpp
+++ b/src/sqliteinterface.hpp
@@ -2,6 +2,8 @@
 #define SQLITEINTERFACE_H
 #include <string>
 #include <sqlite3.h>
+#include "video.hpp"
+
 class SqliteInterface {
 
     public:
@@ -10,7 +12,7 @@ class SqliteInterface {
         void openDB();
         void closeDB();
         void createTables();
-        void saveVideo();
+        void saveVideo(const Video::video&);
     private:
         sqlite3* db;
 };