| 1 | /* |
| 2 | TargetPlatform - Represents a hardware platform |
| 3 | Part of the Arduino project - http://www.arduino.cc/ |
| 4 | |
| 5 | Copyright (c) 2014 Arduino |
| 6 | |
| 7 | This program is free software; you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation; either version 2 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
| 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with this program; if not, write to the Free Software Foundation, |
| 19 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 20 | */ |
| 21 | package processing.app.debug; |
| 22 | |
| 23 | import java.io.File; |
| 24 | import java.util.Map; |
| 25 | import java.util.Set; |
| 26 | |
| 27 | import processing.app.helpers.PreferencesMap; |
| 28 | |
| 29 | public interface TargetPlatform { |
| 30 | |
| 31 | public String getId(); |
| 32 | |
| 33 | public File getFolder(); |
| 34 | |
| 35 | /** |
| 36 | * Get TargetBoards under this TargetPlatform into a Map that maps the board |
| 37 | * id with the corresponding TargetBoard |
| 38 | * |
| 39 | * @return a Map<String, TargetBoard> |
| 40 | */ |
| 41 | public Map<String, TargetBoard> getBoards(); |
| 42 | |
| 43 | public PreferencesMap getCustomMenus(); |
| 44 | |
| 45 | /** |
| 46 | * Return ids for top level menus |
| 47 | * |
| 48 | * @return a Set<String> with the ids of the top level custom menus |
| 49 | */ |
| 50 | public Set<String> getCustomMenuIds(); |
| 51 | |
| 52 | /** |
| 53 | * Get preferences for all programmers |
| 54 | * |
| 55 | * @return |
| 56 | */ |
| 57 | public Map<String, PreferencesMap> getProgrammers(); |
| 58 | |
| 59 | /** |
| 60 | * Get preferences for a specific programmer |
| 61 | * |
| 62 | * @param programmer |
| 63 | * @return |
| 64 | */ |
| 65 | public PreferencesMap getProgrammer(String programmer); |
| 66 | |
| 67 | /** |
| 68 | * Get preferences for a specific tool |
| 69 | * |
| 70 | * @param tool |
| 71 | * @return |
| 72 | */ |
| 73 | public PreferencesMap getTool(String tool); |
| 74 | |
| 75 | /** |
| 76 | * Return TargetPlatform preferences |
| 77 | * |
| 78 | * @return |
| 79 | */ |
| 80 | public PreferencesMap getPreferences(); |
| 81 | |
| 82 | /** |
| 83 | * Get a target board |
| 84 | * |
| 85 | * @param boardId |
| 86 | * @return |
| 87 | */ |
| 88 | public TargetBoard getBoard(String boardId); |
| 89 | |
| 90 | /** |
| 91 | * Get the TargetPackage that contains this TargetPlatform |
| 92 | * |
| 93 | * @return |
| 94 | */ |
| 95 | public TargetPackage getContainerPackage(); |
| 96 | |
| 97 | /** |
| 98 | * Returns true if the platform is installed in a subfolder of the sketchbook |
| 99 | * |
| 100 | * @return |
| 101 | */ |
| 102 | public boolean isInSketchbook(); |
| 103 | } |