1 /*
2  * BuildServerOperations.java
3  *
4  * Copyright (C) 2021 by RStudio, PBC
5  *
6  * Unless you have received this program directly from RStudio pursuant
7  * to the terms of a commercial license agreement with RStudio, then
8  * this program is licensed to you under the terms of version 3 of the
9  * GNU Affero General Public License. This program is distributed WITHOUT
10  * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
12  * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
13  *
14  */
15 
16 package org.rstudio.studio.client.workbench.views.buildtools.model;
17 
18 import org.rstudio.studio.client.quarto.model.QuartoServerOperations;
19 import org.rstudio.studio.client.server.ServerRequestCallback;
20 import org.rstudio.studio.client.workbench.views.source.model.CppCapabilities;
21 
22 public interface BuildServerOperations extends QuartoServerOperations
23 {
24    // check if we can build C/C++ code
getCppCapabilities( ServerRequestCallback<CppCapabilities> requestCallback)25    void getCppCapabilities(
26                      ServerRequestCallback<CppCapabilities> requestCallback);
27 
28    // prompted install of build tools
installBuildTools( String action, ServerRequestCallback<Boolean> callback)29    void installBuildTools(
30                      String action,
31                      ServerRequestCallback<Boolean> callback);
32 
33    // returns true to indicate that the build has started, returns false
34    // to indicate that the build could not be started because another
35    // build is currently in progress
startBuild(String type, String subType, ServerRequestCallback<Boolean> requestCallback)36    void startBuild(String type,
37                    String subType,
38                    ServerRequestCallback<Boolean> requestCallback);
39 
40    // terminate any running build
terminateBuild(ServerRequestCallback<Boolean> requestCallback)41    void terminateBuild(ServerRequestCallback<Boolean> requestCallback);
42 
43 
44    // get the devtools::load_all path
devtoolsLoadAllPath(ServerRequestCallback<String> requestCallback)45    void devtoolsLoadAllPath(ServerRequestCallback<String> requestCallback);
46 
47    // get bookdown output formats
getBookdownFormats(ServerRequestCallback<BookdownFormats> requestCallback)48    void getBookdownFormats(ServerRequestCallback<BookdownFormats> requestCallback);
49 }
50