Changeset 19416 in josm
- Timestamp:
- 2025-06-24T14:05:53+02:00 (4 days ago)
- Location:
- trunk/src/org/openstreetmap/josm/io/remotecontrol
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControl.java
r16825 r19416 32 32 */ 33 33 static final int protocolMajorVersion = 1; 34 static final int protocolMinorVersion = 1 2;34 static final int protocolMinorVersion = 13; 35 35 36 36 /** -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r19200 r19416 29 29 30 30 import org.openstreetmap.josm.data.Version; 31 import org.openstreetmap.josm.data.preferences.JosmUrls; 31 32 import org.openstreetmap.josm.gui.help.HelpUtil; 33 import org.openstreetmap.josm.io.OsmApi; 32 34 import org.openstreetmap.josm.io.remotecontrol.handler.AddNodeHandler; 33 35 import org.openstreetmap.josm.io.remotecontrol.handler.AddWayHandler; … … 72 74 * changes. 73 75 */ 74 public static final String PROTOCOLVERSION = Json.createObjectBuilder() 75 .add("protocolversion", Json.createObjectBuilder() 76 .add("major", RemoteControl.protocolMajorVersion) 77 .add("minor", RemoteControl.protocolMinorVersion)) 78 .add("application", JOSM_REMOTE_CONTROL) 79 .add("version", Version.getInstance().getVersion()) 80 .build().toString(); 76 public static String getProtocolVersion() { 77 String OsmServerUrl = OsmApi.getOsmApi().getServerUrl(); 78 String defaultOsmApiUrl = JosmUrls.getInstance().getDefaultOsmApiUrl(); 79 return Json.createObjectBuilder() 80 .add("protocolversion", Json.createObjectBuilder() 81 .add("major", RemoteControl.protocolMajorVersion) 82 .add("minor", RemoteControl.protocolMinorVersion)) 83 .add("application", JOSM_REMOTE_CONTROL) 84 .add("version", Version.getInstance().getVersion()) 85 .add("osm_server", OsmServerUrl.equals(defaultOsmApiUrl) ? "default" : "custom") 86 .build().toString(); 87 } 81 88 82 89 /** The socket this processor listens on */ -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/VersionHandler.java
r11567 r19416 20 20 protected void handleRequest() throws RequestHandlerErrorException, 21 21 RequestHandlerBadRequestException { 22 content = RequestProcessor. PROTOCOLVERSION;22 content = RequestProcessor.getProtocolVersion(); 23 23 contentType = "application/json"; 24 24 if (args.containsKey("jsonp")) {
Note:
See TracChangeset
for help on using the changeset viewer.