blob: 9a26042842cc5087aab8a212ee19cc94cc26b227 [file]
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
package perfetto.ipc;
message Frame {
// Client -> Host.
message BindService { string service_name = 1; }
// Host -> Client.
message BindServiceReply {
message MethodInfo {
int32 id = 1;
string name = 2;
}
bool success = 1;
int32 service_id = 2;
repeated MethodInfo methods = 3;
}
// Client -> Host.
message InvokeMethod {
int32 service_id = 1; // As returned by BindServiceReply.id.
int32 method_id = 2; // As returned by BindServiceReply.method.id.
bytes args_proto = 3; // Proto-encoded request argument.
}
// Host -> Client.
message InvokeMethodReply {
bool success = 1;
bool has_more = 2; // only for streaming RPCs.
bytes reply_proto = 3; // proto-encoded response value.
}
// Host -> Client.
message RequestError { string error = 1; }
// The client is expected to send requests with monotonically increasing
// request_id. The host will match the request_id sent from the client.
// In the case of a Streaming response (has_more = true) the host will send
// several InvokeMethodReply with the same request_id.
uint64 request_id = 2;
oneof msg {
BindService msg_bind_service = 3;
BindServiceReply msg_bind_service_reply = 4;
InvokeMethod msg_invoke_method = 5;
InvokeMethodReply msg_invoke_method_reply = 6;
RequestError msg_request_error = 7;
}
// Used only in unittests to generate a parsable message of arbitrary size.
repeated bytes data_for_testing = 1;
};