Skip to content

Commit

Permalink
Initial setup for project structure and classes (#8)
Browse files Browse the repository at this point in the history
* Initial setup

* Moved files around and added box classes

* Updated formatting
  • Loading branch information
a-molis committed Sep 27, 2022
1 parent c68fe74 commit 8ef115f
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
cmake-build-debug-remote/
cmake-build-debug/
6 changes: 6 additions & 0 deletions 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)
10 changes: 10 additions & 0 deletions 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
1 change: 1 addition & 0 deletions src/box.cpp
@@ -0,0 +1 @@
#include "box.h"
15 changes: 15 additions & 0 deletions src/box.h
@@ -0,0 +1,15 @@
//
//
#ifndef LOVOK_BOX_H
#define LOVOK_BOX_H


#include <string>

class box {
public:
int size;
std::string name;
};

#endif //LOVOK_BOX_H
1 change: 1 addition & 0 deletions src/file_type_box.cpp
@@ -0,0 +1 @@
#include "file_type_box.h"
22 changes: 22 additions & 0 deletions src/file_type_box.h
@@ -0,0 +1,22 @@
#include "box.h"
#include <vector>

#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 <uint32_t> compatible_brands;

FileTypeBox(int s, std::string n, uint32_t mb, uint32_t mv, std::vector <uint32_t> cb) {
size = s;
name = std::move(n);
major_brand = mb;
minor_version = mv;
compatible_brands = std::move(cb);
}
};

#endif //LOVOK_FILE_TYPE_BOX_H
1 change: 1 addition & 0 deletions src/lovok.cpp
@@ -0,0 +1 @@
#include "../include/lovok.h"
9 changes: 9 additions & 0 deletions 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;

0 comments on commit 8ef115f

Please sign in to comment.