diff options
Diffstat (limited to 'main/src/cgeo/geocaching/connector/IConnector.java')
| -rw-r--r-- | main/src/cgeo/geocaching/connector/IConnector.java | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/main/src/cgeo/geocaching/connector/IConnector.java b/main/src/cgeo/geocaching/connector/IConnector.java index a96ee10..34922f5 100644 --- a/main/src/cgeo/geocaching/connector/IConnector.java +++ b/main/src/cgeo/geocaching/connector/IConnector.java @@ -6,6 +6,9 @@ import cgeo.geocaching.LogCacheActivity; import cgeo.geocaching.enumerations.LogType; import cgeo.geocaching.geopoint.Geopoint; +import org.eclipse.jdt.annotation.NonNull; + +import java.util.Collection; import java.util.List; public interface IConnector { @@ -17,20 +20,21 @@ public interface IConnector { public String getName(); /** - * return true, if this connector is responsible for the given cache + * Check if this connector is responsible for the given geocode. * * @param geocode - * @return + * geocode of a cache + * @return return {@code true}, if this connector is responsible for the cache */ - public boolean canHandle(final String geocode); + public boolean canHandle(final @NonNull String geocode); /** - * get browser URL for the given cache + * Get the browser URL for the given cache. * * @param cache * @return */ - public String getCacheUrl(final Geocache cache); + public String getCacheUrl(final @NonNull Geocache cache); /** * get long browser URL for the given cache @@ -38,7 +42,7 @@ public interface IConnector { * @param cache * @return */ - public String getLongCacheUrl(final Geocache cache); + public String getLongCacheUrl(final @NonNull Geocache cache); /** * enable/disable watchlist controls in cache details @@ -92,19 +96,19 @@ public interface IConnector { public ILoggingManager getLoggingManager(final LogCacheActivity activity, final Geocache cache); /** - * get host name of the connector server for dynamic loading of data + * Get host name of the connector server for dynamic loading of data. * * @return */ public String getHost(); /** - * get cache data license text + * Get cache data license text. This is displayed somewhere near the cache details. * * @param cache * @return */ - public String getLicenseText(final Geocache cache); + public String getLicenseText(final @NonNull Geocache cache); /** * enable/disable user actions in cache details @@ -178,13 +182,13 @@ public interface IConnector { public boolean uploadModifiedCoordinates(Geocache cache, Geopoint wpt); /** - * Return true if this connector is activated for online - * interaction (download details, do searches, ...) + * Return {@code true} if this connector is active for online interaction (download details, do searches, ...). If + * this is {@code false}, the connector will still be used for already stored offline caches. * * @return */ - public boolean isActivated(); + public boolean isActive(); /** * Check if the current user is the owner of the given cache. @@ -213,7 +217,7 @@ public interface IConnector { public int getCacheMapMarkerId(boolean disabled); /** - * Get the list of <b>potentially</b> possible log types for a cache. Those may still be filter further during the + * Get the list of <b>potentially</b> possible log types for a cache. Those may still be filtered further during the * actual logging activity. * * @param geocache @@ -222,8 +226,8 @@ public interface IConnector { public List<LogType> getPossibleLogTypes(Geocache geocache); /** - * Get the gpx id for a waypoint when exporting. For some connectors there is an inherent name logic, - * for others its just the 'prefix' + * Get the GPX id for a waypoint when exporting. For some connectors there is an inherent name logic, + * for others its just the 'prefix'. * * @param prefix * @return @@ -231,10 +235,24 @@ public interface IConnector { public String getWaypointGpxId(String prefix, String geocode); /** - * Get the 'prefix' (key) for a waypoint from the 'name' in the gpx file - * + * Get the 'prefix' (key) for a waypoint from the 'name' in the GPX file + * * @param name * @return */ public String getWaypointPrefix(String name); + + /** + * Get the maximum value for Terrain + * + * @return + */ + public int getMaxTerrain(); + + /** + * Get a user readable collection of all online features of this connector. + * + * @return + */ + public Collection<String> getCapabilities(); } |
