diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b63189 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +cmake-build-debug-remote/ +cmake-build-debug/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..416b4dc --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.23) +project(lovok) + +set(CMAKE_CXX_STANDARD 14) + +add_library(lovok src/lovok.cpp src/lovok_handle_internal.cpp src/box.cpp src/box.h src/file_type_box.cpp src/file_type_box.h) diff --git a/include/lovok.h b/include/lovok.h new file mode 100644 index 0000000..c63a62c --- /dev/null +++ b/include/lovok.h @@ -0,0 +1,10 @@ +#ifndef LOVOK_LOVOK_H +#define LOVOK_LOVOK_H + +typedef struct LovokHandleInternal *LOVOK_HANDLE; + +LOVOK_HANDLE Lovok_create(); + +void Lovok_destroy(LOVOK_HANDLE); + +#endif //LOVOK_LOVOK_H diff --git a/src/box.cpp b/src/box.cpp new file mode 100644 index 0000000..8674fcc --- /dev/null +++ b/src/box.cpp @@ -0,0 +1 @@ +#include "box.h" diff --git a/src/box.h b/src/box.h new file mode 100644 index 0000000..25f2169 --- /dev/null +++ b/src/box.h @@ -0,0 +1,15 @@ +// +// +#ifndef LOVOK_BOX_H +#define LOVOK_BOX_H + + +#include + +class box { +public: + int size; + std::string name; +}; + +#endif //LOVOK_BOX_H diff --git a/src/file_type_box.cpp b/src/file_type_box.cpp new file mode 100644 index 0000000..4b5f239 --- /dev/null +++ b/src/file_type_box.cpp @@ -0,0 +1 @@ +#include "file_type_box.h" diff --git a/src/file_type_box.h b/src/file_type_box.h new file mode 100644 index 0000000..2b2f04e --- /dev/null +++ b/src/file_type_box.h @@ -0,0 +1,22 @@ +#include "box.h" +#include + +#ifndef LOVOK_FILE_TYPE_BOX_H +#define LOVOK_FILE_TYPE_BOX_H + +class FileTypeBox : public box { +public: + uint32_t major_brand; + uint32_t minor_version; + std::vector compatible_brands; + + FileTypeBox(int s, std::string n, uint32_t mb, uint32_t mv, std::vector cb) { + size = s; + name = std::move(n); + major_brand = mb; + minor_version = mv; + compatible_brands = std::move(cb); + } +}; + +#endif //LOVOK_FILE_TYPE_BOX_H diff --git a/src/lovok.cpp b/src/lovok.cpp new file mode 100644 index 0000000..11ae4c5 --- /dev/null +++ b/src/lovok.cpp @@ -0,0 +1 @@ +#include "../include/lovok.h" diff --git a/src/lovok_handle_internal.cpp b/src/lovok_handle_internal.cpp new file mode 100644 index 0000000..dcbbf47 --- /dev/null +++ b/src/lovok_handle_internal.cpp @@ -0,0 +1,9 @@ +#include "../include/lovok.h" + +enum LovokStatusCode { + SUCCESS = 0, +}; + +typedef struct LovokHandleInternal { + // TODO add later +} *LOVOK_HANDLE;