1 /*
2  * Copyright (C) 2016 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * 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, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */
16 
17 package com.googlecode.android_scripting.interpreter;
18 
19 import android.os.Environment;
20 
21 /**
22  * A collection of constants required for installation/removal of an interpreter.
23  *
24  * @author Damon Kohler (damonkohler@gmail.com)
25  * @author Alexey Reznichenko (alexey.reznichenko@gmail.com)
26  */
27 public interface InterpreterConstants {
28 
29   public static final String SDCARD_ROOT =
30       Environment.getExternalStorageDirectory().getAbsolutePath() + "/";
31 
32   public static final String SDCARD_SL4A_ROOT = SDCARD_ROOT + "sl4a/";
33 
34   public static final String SCRIPTS_ROOT = SDCARD_SL4A_ROOT + "scripts/";
35 
36   public static final String SDCARD_SL4A_DOC = SDCARD_SL4A_ROOT + "doc/";
37 
38   public static final String SL4A_DALVIK_CACHE_ROOT = "/dalvik-cache/";
39 
40   public static final String INTERPRETER_EXTRAS_ROOT = "/extras/";
41 
42   // Interpreters discovery mechanism.
43   public static final String ACTION_DISCOVER_INTERPRETERS =
44       "com.googlecode.android_scripting.DISCOVER_INTERPRETERS";
45 
46   // Interpreters broadcasts.
47   public static final String ACTION_INTERPRETER_ADDED =
48       "com.googlecode.android_scripting.INTERPRETER_ADDED";
49   public static final String ACTION_INTERPRETER_REMOVED =
50       "com.googlecode.android_scripting.INTERPRETER_REMOVED";
51 
52   // Interpreter content provider.
53   public static final String PROVIDER_PROPERTIES = "com.googlecode.android_scripting.base";
54   public static final String PROVIDER_ENVIRONMENT_VARIABLES =
55       "com.googlecode.android_scripting.env";
56   public static final String PROVIDER_ARGUMENTS = "com.googlecode.android_scripting.args";
57 
58   public static final String INSTALLED_PREFERENCE_KEY = "SL4A.interpreter.installed";
59 
60   public static final String MIME = "script/";
61 }
62