ud3tn/include/agents/sqlite_agent.h
Maximilian Nitsch bc54b1323c sqlite_agent: Add an agent to interact with the SQLiteCLA
The SQLiteAgent enables SQLiteCLA to read packages from the database and
return them to μD3TN. For this purpose, the SQLiteAgent writes commands
to the queue that SQLiteCLA is waiting for.

The SQLiteAgent itself can be controlled by protobuf messages that
describe which action is to be applied to which set of bundles.

Currently the operations "Push" and "Delete" are implemented and a
filter based on a destination EID pattern.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-04-15 11:05:20 +02:00

27 lines
588 B
C

// SPDX-License-Identifier: BSD-3-Clause OR Apache-2.0
#ifndef SQLITE_AGENT_H_INCLUDED
#define SQLITE_AGENT_H_INCLUDED
#include "platform/posix/hal_types.h"
#include "ud3tn/bundle_processor.h"
#include <stdint.h>
#include <sqlite3.h>
// Default Agent IDs.
#ifndef AGENT_ID_SQLITE_DTN
#define AGENT_ID_SQLITE_DTN "sqlite"
#endif // AGENT_ID_SQLITE_DTN
#ifndef AGENT_ID_SQLITE_IPN
#define AGENT_ID_SQLITE_IPN "9003"
#endif // AGENT_ID_SQLITE_IPN
int sqlite_agent_setup(
const struct bundle_agent_interface *const,
sqlite3 *,
QueueIdentifier_t
);
#endif // SQLITE_AGENT_H_INCLUDED