2#include <NDEVR/ServerActions.h>
4#include <NDEVR/String.h>
5#include <NDEVR/PasswordString.h>
6#include <NDEVR/DynamicPointer.h>
7#include <NDEVR/NDEVRFileServer.h>
8#include <NDEVR/ApplicationOption.h>
12 class PreparedStatement;
27 DirectServerAction(
LogPtr log);
29 void close()
override;
30 void setResourceDirectory(
const File&
file);
52 sint04 resolveUserViaPhoneNumber(
const StringView& phone_number,
bool active =
true);
63 virtual bool needsReconnect()
const;
64 virtual bool reconnect()
const;
67 sql::PreparedStatement* statement(
const StringView& statement)
const;
79 sql::mysql::MySQL_Driver* m_driver;
80 sql::Connection* m_connection;
81 File m_resource_location;
The default object to store data of any type that should persist through sessions of the application.
The equivelent of std::vector but with a bit more control.
A hash-based key-value store, useful for quick associative lookups.
Dictionary< uint08, sql::PreparedStatement * > m_cached_statements
Cache of prepared SQL statements.
static ApplicationOption< String > username
Database login username.
static ApplicationOption< uint04 > max_login_failure_count
Max failed logins before lockout.
static ApplicationOption< sint04 > login_check_interval_minutes
Interval in minutes for rate limiting checks.
static ApplicationOption< uint04 > port
Database server port.
Dictionary< sint04, sint04 > resource_ownership_lookup
Cache of resource ID to owner ID mappings.
static ApplicationOption< String > address
Database server address.
static ApplicationOption< PasswordString > password
Database login password.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
A light-weight base class for Log that allows processes to update, without the need for additional in...
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Abstract interface for all server-side CRUD operations on users, resources, and permissions.
The core String View class for the NDEVR API.
Stores a time span, or difference between two times, with an optional start time.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
@ file
The source file path associated with this object.
Represents an encoded message associated with a resource version, including header and body.
Contains the address, credentials, and security flag needed to connect to an NDEVR server.
Identifies a resource on the server by name, ID, owner, and version.
Encapsulates a server command's return status, including a code and optional message.
Stores user credentials for server authentication, including username, password hash,...
Defines permissions for a user to access a specific resource, including encryption data.
Metadata for a server-hosted resource including type, timestamps, size, and cached data.
Extended user information including contact details and encryption keys.