// Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html syntax = "proto3"; option java_multiple_files = true; package anki.frontend; import "anki/scheduler.proto"; import "anki/generic.proto"; import "anki/search.proto"; import "anki/card_rendering.proto"; service FrontendService { // Returns values from the reviewer rpc GetSchedulingStatesWithContext(generic.Empty) returns (SchedulingStatesWithContext); // Updates reviewer state rpc SetSchedulingStates(SetSchedulingStatesRequest) returns (generic.Empty); // Notify Qt layer so window modality can be updated. rpc ImportDone(generic.Empty) returns (generic.Empty); rpc SearchInBrowser(search.SearchNode) returns (generic.Empty); // Force closing the deck options. rpc deckOptionsRequireClose(generic.Empty) returns (generic.Empty); // Warns python that the deck option web view is ready to receive requests. rpc deckOptionsReady(generic.Empty) returns (generic.Empty); // Save colour picker's custom colour palette rpc SaveCustomColours(generic.Empty) returns (generic.Empty); // Plays the listed AV tags rpc PlayAVTags(PlayAVTagsRequest) returns (generic.Empty); rpc ReviewerAction(ReviewerActionRequest) returns (generic.Empty); } service BackendFrontendService {} message SchedulingStatesWithContext { scheduler.SchedulingStates states = 1; scheduler.SchedulingContext context = 2; } message SetSchedulingStatesRequest { string key = 1; scheduler.SchedulingStates states = 2; } message PlayAVTagsRequest { repeated card_rendering.AVTag tags = 1; } message ReviewerActionRequest { enum ReviewerAction { // Menus EditCurrent = 0; SetDueDate = 1; CardInfo = 2; PreviousCardInfo = 3; CreateCopy = 4; // Reset Forget = 5; // Preset Options Options = 6; // "Congratulations" Overview = 7; // Audio PauseAudio = 9; SeekBackward = 10; SeekForward = 11; RecordVoice = 12; ReplayRecorded = 13; }; ReviewerAction menu = 1; // In case the card isn't set in a next_card_data intercept function optional int64 current_card_id = 2; }