blob: 2816da3fd5774e83de8415fb7c36ed2730f534f1 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.app.discover;
using fuchsia.modular;
using Query = string;
using SuggestionId = string;
[Discoverable]
protocol Suggestions {
/// Sends a query to get suggestions and an iterator with which the client
/// can fetch suggestions coming as response.
GetSuggestions(Query query, request<SuggestionsIterator> iterator);
/// Requests the execution of a suggestion's intent.
NotifyInteraction(SuggestionId suggestion_id, InteractionType interaction);
};
/// Supported types of interaction with a suggestion.
enum InteractionType {
/// Set when the suggestion was accepted by the user.
SELECTED = 0;
};
protocol SuggestionsIterator {
/// Fetches the next set of suggestions being iterated on. When there's no
/// more suggestions an empty vector will be sent and the connection will be
/// closed from the server.
Next() -> (vector<Suggestion> suggestions);
};
table Suggestion {
/// The id of the suggestion. This id is used when notifying an interaction.
1: SuggestionId id;
/// Display information about the suggestion.
2: fuchsia.modular.DisplayInfo display_info;
};