19 lines
887 B
C++
19 lines
887 B
C++
// SPDX-License-Identifier: LGPL-3.0-only
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
|
|
|
export module Nostro:Connector;
|
|
|
|
import std;
|
|
|
|
namespace Nostro {
|
|
// Both take an exclusive lock on connectors.lock in the config directory and hold it until the process ends, so
|
|
// a second nostro process waits (saying so through Note) instead of overwriting the first one's changes.
|
|
export struct Connector {
|
|
// Writes every bank's connectors to connectors.json in the config directory: synced to the disk, then
|
|
// renamed over the old file.
|
|
static void SaveConnectors();
|
|
// Reads connectors.json (a missing file is no connectors yet) and refreshes each connector's accounts. A
|
|
// connector whose refresh fails keeps no accounts and is reported through Note, so the others stay usable.
|
|
static void LoadConnectors();
|
|
};
|
|
}
|