1/* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18option optimize_for = LITE_RUNTIME; 19 20package perfetto.protos; 21 22message ObservableEvents { 23 enum Type { 24 TYPE_UNSPECIFIED = 0; 25 // State changes of data source instances associated with the consumer's 26 // session. Note that not all data sources may support these notifications. 27 TYPE_DATA_SOURCES_INSTANCES = 1; 28 // TODO(eseckler): Extend this for producer & data source registrations. 29 } 30 31 enum DataSourceInstanceState { 32 // A data source is created in stopped state. 33 DATA_SOURCE_INSTANCE_STATE_STOPPED = 1; 34 DATA_SOURCE_INSTANCE_STATE_STARTED = 2; 35 } 36 37 message DataSourceInstanceStateChange { 38 optional string producer_name = 1; 39 optional string data_source_name = 2; 40 optional DataSourceInstanceState state = 3; 41 } 42 43 repeated DataSourceInstanceStateChange instance_state_changes = 1; 44} 45