mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
86 lines
2.4 KiB
Protocol Buffer
86 lines
2.4 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";
|
|
import "anki/notes.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);
|
|
|
|
// Editor
|
|
rpc editorUpdateNote(notes.UpdateNotesRequest) returns (generic.Empty);
|
|
rpc convertPastedImage(ConvertPastedImageRequest)
|
|
returns (ConvertPastedImageResponse);
|
|
rpc retrieveUrl(generic.String) returns (RetrieveUrlResponse);
|
|
rpc openFilePicker(openFilePickerRequest) returns (generic.String);
|
|
rpc openMedia(generic.String) returns (generic.Empty);
|
|
rpc showInMediaFolder(generic.String) returns (generic.Empty);
|
|
|
|
// Profile config
|
|
rpc GetProfileConfigJson(generic.String) returns (generic.Json);
|
|
rpc SetProfileConfigJson(SetSettingJsonRequest) returns (generic.Empty);
|
|
|
|
// Metadata
|
|
rpc GetMetaJson(generic.String) returns (generic.Json);
|
|
rpc SetMetaJson(SetSettingJsonRequest) 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 ConvertPastedImageRequest {
|
|
bytes data = 1;
|
|
string ext = 2;
|
|
}
|
|
|
|
message ConvertPastedImageResponse {
|
|
bytes data = 1;
|
|
}
|
|
|
|
message RetrieveUrlResponse {
|
|
string filename = 1;
|
|
string error = 2;
|
|
}
|
|
|
|
message SetSettingJsonRequest {
|
|
string key = 1;
|
|
bytes value_json = 2;
|
|
}
|
|
|
|
message openFilePickerRequest {
|
|
string title = 1;
|
|
string key = 2;
|
|
string filter_description = 3;
|
|
repeated string extensions = 4;
|
|
}
|