switch to cmake for build system
This commit is contained in:
34
include/bottles.hpp
Normal file
34
include/bottles.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef __BOTTLES_HPP
|
||||
#define __BOTTLES_HPP
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "json.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace cellar {
|
||||
namespace bottles {
|
||||
enum bottle_type {
|
||||
bottle_error,
|
||||
bottle_anonymous,
|
||||
bottle_labelled,
|
||||
bottle_symlink
|
||||
};
|
||||
class Bottle {
|
||||
public:
|
||||
bottle_type type;
|
||||
json config;
|
||||
string path;
|
||||
string canonical_path;
|
||||
Bottle();
|
||||
};
|
||||
map<string, Bottle> get_bottles();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __BOTTLES_HPP
|
9
include/cellar.hpp
Normal file
9
include/cellar.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef __CELLAR_HPP
|
||||
#define __CELLAR_HPP
|
||||
#pragma once
|
||||
|
||||
namespace cellar {
|
||||
void print_header();
|
||||
}
|
||||
|
||||
#endif // __CELLAR_HPP
|
20
include/commands.hpp
Normal file
20
include/commands.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef __COMMANDS_HPP
|
||||
#define __COMMANDS_HPP
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
namespace cellar {
|
||||
namespace commands {
|
||||
typedef void (*CommandFunction)(int, char*[]);
|
||||
extern map<string, CommandFunction> command_map;
|
||||
|
||||
void add_command(string, CommandFunction);
|
||||
vector<string> list_commands();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __COMMANDS_HPP
|
16
include/fs.hpp
Normal file
16
include/fs.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef __FS_HPP
|
||||
#define __FS_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace cellar {
|
||||
namespace fs {
|
||||
extern vector<string> listdir(string path);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __FS_HPP
|
13003
include/json.hpp
Normal file
13003
include/json.hpp
Normal file
File diff suppressed because it is too large
Load Diff
15
include/version.hpp
Normal file
15
include/version.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef __VERSION_HPP
|
||||
#define __VERSION_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace cellar {
|
||||
namespace version {
|
||||
string short_version();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __VERSION_HPP
|
Reference in New Issue
Block a user