// Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html syntax = "proto3"; package anki.codegen; import "google/protobuf/descriptor.proto"; extend google.protobuf.MethodOptions { BackendMethod backend_method = 50000; } message MethodOptions { BackendMethod backend_method = 50000; } enum BackendMethod { /// Used for typical collection-based operations. We must implement the // method on Collection. The same method is automatically implemented on // Backend, which forwards to Collection. BACKEND_METHOD_DELEGATE = 0; /// Both the backend and collection need to implement the method; there /// is no auto-delegation. Can be used to provide a method on both, but /// skip the Collection mutex lock when a backend handle is available. /// In practice we only do this for the i18n methods; for the occasional /// method in other services that doesn't happen to need the collection, /// we just delegate to the collection method for convenience, and to make /// sure it's available even if the consumer is not using Backend. BACKEND_METHOD_IMPLEMENT = 1; }