Commit graph

41 commits

Author SHA1 Message Date
5342185370 Build fix for systems without libev in pkg-config 2020-08-29 19:32:18 +01:00
4e63e1b246 Make Api virtual.
I think this is a bit better than what I had before.
Still a mess, but that's conditional compilation for you.
2020-08-29 17:10:41 +01:00
80bfbc640a Add option to choose between restc-cpp and nap
I don't think this is very clean, but they might fix
the bug in restc-cpp that is currently holding this
project back, and I might want to go back to it.
I might refactor this into a virtual class.
2020-08-29 16:42:34 +01:00
74e98211a7 Start working on QuickRest 2020-08-29 14:28:47 +01:00
c4935ac70d Move rest stuff into nap subdir.
Nap is a quick REST. Silly joke really, but hey, 3 letters.
Great namespace name.
2020-08-29 12:34:55 +01:00
05c03c2daf Working on a replacement for restc-cpp 2020-08-29 01:54:52 +01:00
85f7ac321e Add simdjson wrap file and meson scripts 2020-08-28 01:07:12 +01:00
e856918963 Add curlcpp subproject 2020-08-27 23:55:15 +01:00
c5e0b01b06 Add OriginsDB base class and a make() function
This fixes the build. The make function for the moment
just takes a string since that's all that's ever needed.
This is supposed to change since the postgresql database
will need a port, an url, password etc. Maybe
connection strings are still a thing, but if not then
I'll probably need to find a way to accept arbitrary
parameters in OriginsDB::make().
2020-08-22 01:57:14 +01:00
217c844893 Move OriginsDB sqlite files
This breaks the build
2020-08-22 01:53:04 +01:00
2a407294e1 Add an option to enable/disable sqlite backend
Currently you can't disable it since sqlite is the only
supported backend and you must have at least one enabled
and available on the system. This will be needed for later.
2020-08-22 01:30:04 +01:00
1fcd7bd749 Append the version number to the name reported to the server 2020-08-16 15:42:45 +01:00
cef5060eb2 Add app name and reason to config header 2020-08-16 14:34:19 +01:00
b06456e4b0 Restore timeouts from previous run
This is quite a big update, the new feature is that when the
program starts it loads the next update time from the db if
present. If so it resumes the timers from there. Maximum wait
time is currently capped at 24h.

TimerOroApi is not templated on methods anymore, rather on
the new DBOperation enum. This is so that it has that enum
value to pass it to other functions. This could've been a
separate commit, but wth...

Magic enum allows me to iterate over an enum's values at
build time, it's useful for building the query in OriginsDB
for the SELECT in the access table
(see make_select_last_access_str()).
2020-08-16 06:28:58 +01:00
34040e5af1 Properly handle SIGINT to quit.
This puts ThreadPool::join() back to being private.
Eventia events now should inherit from Event, which will take
care of setting up the required callbacks so that events will
be notified about the main event loop stopping. Inheriting
from Event is currently not enforced.
2020-08-15 14:55:59 +01:00
7e48ee94c2 Organise files into a private subdir.
Move files that are not supposed to be used directly to
get oro functionalities into a private subdirectory.
2020-08-14 18:58:47 +01:00
33fe2bc8cd Add tiger. It depends on duckhandy, so add that too. 2020-08-14 00:46:36 +01:00
d1af39d2a7 Make sure NDEBUG is defined in release, plus variable rename 2020-08-14 00:44:20 +01:00
d0a41d916a Return some default db name if not present in the config file 2020-08-11 01:04:53 +01:00
5bf036f056 Replace timers with a templated one
They all do the same thing, the only difference
is the method they call on oro::Api, so
template on that
2020-08-10 21:52:56 +01:00
c1e21bb8d6 Add TimerShops 2020-08-10 21:52:56 +01:00
35118dbe4e Get db path from settings file instead of using a hardcoded value 2020-08-10 13:21:04 +01:00
c05213d576 Remove config_file option 2020-08-10 12:44:54 +01:00
2a4fe62427 Add ini file parser from kamokan and meson option for config path 2020-08-10 12:24:39 +01:00
5bc151a3ec Refactor timer code
No need to copy-paste that much stuff, especially since
there are going to be more timer types in the future.
2020-08-10 03:01:54 +01:00
53ba7febf4 This stuff doesn't need to be in oro 2020-08-10 02:47:55 +01:00
eeab1d5c5e Add base64 decoding function 2020-08-10 02:35:27 +01:00
6b9502ea3e Store items and icons into the db 2020-08-10 02:34:09 +01:00
f2b8abf82b Disable console output from restc-cpp 2020-08-09 22:55:25 +01:00
c0461f6b09 More refactoring 2020-08-09 20:47:04 +01:00
034020e152 Remove thread pool selection code for now 2020-08-09 20:04:22 +01:00
7fb055cd40 Refactor event code.
This splits the thread pool code from the event code, and
class names are now wrong (I will update them in the next
commit). Also, this disregards the roar11 vs tf library
thing, taskflow was not working anyways and I will probably
remove all the conditional compilation stuff about it for
now.
2020-08-09 19:26:18 +01:00
9f0fed98e2 Get the concept working
A bit hackish because see ThreadPool.hpp.
Also code is dirty and it can't be stopped once running.
Building up from here.
2020-08-09 17:29:37 +01:00
d44529871c Add event loop with thread pool
I think it works

Signed-off-by: King_DuckZ <king_duckz@gmx.com>
2020-08-01 07:02:54 +02:00
e94131ac32 Add SQLiteCpp subproject 2020-06-23 10:58:19 +02:00
5b480f3ae5 Add market_list() to Api. 2020-06-23 10:19:02 +02:00
fd147c4f2a Add items_list() to Api. 2020-06-22 20:53:56 +02:00
d6a27f814a Pass the base url as a build option
So with SoapUI I can pass -Dbase_url=http://localhost:8080
2020-06-22 19:37:56 +02:00
bab47fbd0b Parse the date from the responce header 2020-06-20 02:01:52 +02:00
96e35a5814 Giving code some initial structure 2020-06-20 01:27:47 +02:00
e0611ec6ff Create src subdir 2020-06-20 00:15:24 +02:00