Anki/proto/anki/frontend.proto
2025-10-30 17:56:19 +00:00

55 lines
No EOL
1.6 KiB
Protocol Buffer

// 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";
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 an audio tag at an index in a specific card
// If the index is blank, plays all audio on that side
rpc PlayAudio(PlayAudioRequest) 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 PlayAudioRequest {
bool answer_side = 1;
optional uint32 index = 2;
uint64 cid = 3;
}