Home | History | Annotate | Download | only in api
      1 /*
      2  * Copyright (C) 2017 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License") throws RemoteException;
      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 
     17 package com.android.layout.remote.api;
     18 
     19 import com.android.ide.common.rendering.api.RenderResources;
     20 import com.android.ide.common.rendering.api.ResourceReference;
     21 import com.android.ide.common.rendering.api.ResourceValue;
     22 import com.android.ide.common.rendering.api.StyleResourceValue;
     23 import com.android.resources.ResourceType;
     24 
     25 import java.rmi.Remote;
     26 import java.rmi.RemoteException;
     27 import java.util.List;
     28 
     29 /**
     30  * Remote version of the {@link RenderResources} class
     31  */
     32 public interface RemoteRenderResources extends Remote {
     33     StyleResourceValue getDefaultTheme() throws RemoteException;
     34 
     35     void applyStyle(StyleResourceValue theme, boolean useAsPrimary) throws RemoteException;
     36 
     37     void clearStyles() throws RemoteException;
     38 
     39     List<StyleResourceValue> getAllThemes() throws RemoteException;
     40 
     41 
     42     StyleResourceValue getTheme(String name, boolean frameworkTheme) throws RemoteException;
     43 
     44 
     45     boolean themeIsParentOf(StyleResourceValue parentTheme, StyleResourceValue childTheme)
     46             throws RemoteException;
     47 
     48     ResourceValue getFrameworkResource(ResourceType resourceType, String resourceName)
     49             throws RemoteException;
     50 
     51     ResourceValue getProjectResource(ResourceType resourceType, String resourceName)
     52             throws RemoteException;
     53 
     54 
     55     ResourceValue findItemInTheme(ResourceReference attr) throws RemoteException;
     56 
     57     ResourceValue findItemInStyle(StyleResourceValue style, ResourceReference attr)
     58             throws RemoteException;
     59 
     60     ResourceValue resolveValue(ResourceValue value) throws RemoteException;
     61 
     62     ResourceValue resolveValue(ResourceType type, String name, String value,
     63             boolean isFrameworkValue) throws RemoteException;
     64 
     65     StyleResourceValue getParent(StyleResourceValue style) throws RemoteException;
     66 
     67     StyleResourceValue getStyle(String styleName, boolean isFramework) throws RemoteException;
     68 
     69     ResourceValue dereference(ResourceValue resourceValue) throws RemoteException;
     70 
     71     ResourceValue getUnresolvedResource(ResourceReference reference) throws RemoteException;
     72 }
     73