cpp
This commit is contained in:
17
jtlsrv-cpp/src/order_log.hpp
Normal file
17
jtlsrv-cpp/src/order_log.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
class OrderLog {
|
||||
public:
|
||||
void open(const std::string& path);
|
||||
void close();
|
||||
int log_order(const std::string& order_json);
|
||||
std::string get_max_external_id() const;
|
||||
private:
|
||||
FILE* fp_ = nullptr;
|
||||
std::mutex mutex_;
|
||||
int sequence_ = 0;
|
||||
int max_external_id_ = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user