diff options
Diffstat (limited to 'main/src/cgeo/geocaching/connector/IConnector.java')
| -rw-r--r-- | main/src/cgeo/geocaching/connector/IConnector.java | 77 |
1 files changed, 62 insertions, 15 deletions
diff --git a/main/src/cgeo/geocaching/connector/IConnector.java b/main/src/cgeo/geocaching/connector/IConnector.java index d6ac2ff..9169b4a 100644 --- a/main/src/cgeo/geocaching/connector/IConnector.java +++ b/main/src/cgeo/geocaching/connector/IConnector.java @@ -1,8 +1,9 @@ package cgeo.geocaching.connector; -import cgeo.geocaching.SearchResult; -import cgeo.geocaching.cgCache; -import cgeo.geocaching.geopoint.Viewport; +import cgeo.geocaching.Geocache; +import cgeo.geocaching.ICache; +import cgeo.geocaching.enumerations.CacheRealm; +import cgeo.geocaching.geopoint.Geopoint; public interface IConnector { /** @@ -26,7 +27,15 @@ public interface IConnector { * @param cache * @return */ - public String getCacheUrl(final cgCache cache); + public String getCacheUrl(final Geocache cache); + + /** + * get long browser URL for the given cache + * + * @param cache + * @return + */ + public String getLongCacheUrl(final Geocache cache); /** * enable/disable watchlist controls in cache details @@ -62,7 +71,7 @@ public interface IConnector { * @param cache * @return */ - public String getLicenseText(final cgCache cache); + public String getLicenseText(final Geocache cache); /** * enable/disable user actions in cache details @@ -72,15 +81,6 @@ public interface IConnector { public boolean supportsUserActions(); /** - * Search caches by viewport. - * - * @param viewport - * @param tokens - * @return - */ - public SearchResult searchByViewport(final Viewport viewport, final String[] tokens); - - /** * return true if this is a ZIP file containing a GPX file * * @param fileName @@ -106,10 +106,57 @@ public interface IConnector { /** * extract a geocode from the given URL, if this connector can handle that URL somehow - * + * * @param url * @return */ public String getGeocodeFromUrl(final String url); + /** + * enable/disable uploading modified coordinates to website + * + * @return true, when uploading is possible + */ + public boolean supportsOwnCoordinates(); + + /** + * Uploading modified coordinates to website + * + * @param cache + * @param wpt + * @return success + */ + public boolean uploadModifiedCoordinates(Geocache cache, Geopoint wpt); + + /** + * Reseting of modified coordinates on website to details + * + * @param cache + * @return success + */ + public boolean deleteModifiedCoordinates(Geocache cache); + + /** + * The CacheRealm this cache belongs to + * + * @return + */ + public CacheRealm getCacheRealm(); + + /** + * Return true if this connector is activated for online + * interaction (download details, do searches, ...) + * + * @return + */ + + public boolean isActivated(); + + /** + * Check if the current user is the owner of the given cache. + * + * @param cache a cache that this connector must be able to handle + * @return <code>true</code> if the current user is the cache owner, <code>false</code> otherwise + */ + public boolean isOwner(final ICache cache); } |
