1 /*
2  * Copyright (C) 2024 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 package com.android.internal.widget.remotecompose.core;
17 
18 /**
19  * Interface for operators that interact with variables
20  * Threw this they register to listen to particular variables
21  * and are notified when they change
22  */
23 public interface VariableSupport {
24     /**
25      * Call to allow an operator to register interest in variables.
26      * Typically they call context.listensTo(id, this)
27      * @param context
28      */
registerListening(RemoteContext context)29     void registerListening(RemoteContext context);
30 
31     /**
32      * Called to be notified that the variables you are interested have changed.
33      * @param context
34      */
updateVariables(RemoteContext context)35     void updateVariables(RemoteContext context);
36 }
37