mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00

* Relax chrono specification for AnkiDroid
https://github.com/ankidroid/Anki-Android-Backend/pull/251
* Add AnkiDroid service and AnkiDroid customizations
Most of the work here was done by David in the Backend repo; integrating
it into this repo for ease of future maintenance.
Based on 5d9f262f4c
with some tweaks:
- Protobuf imports have been fixed to match the recent refactor
- FatalError has been renamed to AnkidroidPanicError
- Tweaks to the desktop code to deal with the extra arg to open_collection,
and exclude AnkiDroid service methods from our Python code.
* Refactor AnkiDroid's DB code to avoid uses of unsafe
31 lines
934 B
Rust
31 lines
934 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
macro_rules! protobuf {
|
|
($ident:ident, $name:literal) => {
|
|
pub mod $ident {
|
|
include!(concat!(env!("OUT_DIR"), "/anki.", $name, ".rs"));
|
|
}
|
|
};
|
|
}
|
|
|
|
protobuf!(ankidroid, "ankidroid");
|
|
protobuf!(backend, "backend");
|
|
protobuf!(card_rendering, "card_rendering");
|
|
protobuf!(cards, "cards");
|
|
protobuf!(collection, "collection");
|
|
protobuf!(config, "config");
|
|
protobuf!(deckconfig, "deckconfig");
|
|
protobuf!(decks, "decks");
|
|
protobuf!(generic, "generic");
|
|
protobuf!(i18n, "i18n");
|
|
protobuf!(import_export, "import_export");
|
|
protobuf!(links, "links");
|
|
protobuf!(media, "media");
|
|
protobuf!(notes, "notes");
|
|
protobuf!(notetypes, "notetypes");
|
|
protobuf!(scheduler, "scheduler");
|
|
protobuf!(search, "search");
|
|
protobuf!(stats, "stats");
|
|
protobuf!(sync, "sync");
|
|
protobuf!(tags, "tags");
|