• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 
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  */
25 public interface InterpreterConstants {
26 
27   public static final String SDCARD_ROOT =
28       Environment.getExternalStorageDirectory().getAbsolutePath() + "/";
29 
30   public static final String SDCARD_SL4A_ROOT = SDCARD_ROOT + "sl4a/";
31 
32   public static final String SCRIPTS_ROOT = SDCARD_SL4A_ROOT + "scripts/";
33 
34   public static final String SDCARD_SL4A_DOC = SDCARD_SL4A_ROOT + "doc/";
35 
36   public static final String SL4A_DALVIK_CACHE_ROOT = "/dalvik-cache/";
37 
38   public static final String INTERPRETER_EXTRAS_ROOT = "/extras/";
39 
40   // Interpreters discovery mechanism.
41   public static final String ACTION_DISCOVER_INTERPRETERS =
42       "com.googlecode.android_scripting.DISCOVER_INTERPRETERS";
43 
44   // Interpreters broadcasts.
45   public static final String ACTION_INTERPRETER_ADDED =
46       "com.googlecode.android_scripting.INTERPRETER_ADDED";
47   public static final String ACTION_INTERPRETER_REMOVED =
48       "com.googlecode.android_scripting.INTERPRETER_REMOVED";
49 
50   // Interpreter content provider.
51   public static final String PROVIDER_PROPERTIES = "com.googlecode.android_scripting.base";
52   public static final String PROVIDER_ENVIRONMENT_VARIABLES =
53       "com.googlecode.android_scripting.env";
54   public static final String PROVIDER_ARGUMENTS = "com.googlecode.android_scripting.args";
55 
56   public static final String INSTALLED_PREFERENCE_KEY = "SL4A.interpreter.installed";
57 
58   public static final String MIME = "script/";
59 }
60