diff options
Diffstat (limited to 'main/src/cgeo/geocaching/connector/gc/GCConnector.java')
| -rw-r--r-- | main/src/cgeo/geocaching/connector/gc/GCConnector.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCConnector.java b/main/src/cgeo/geocaching/connector/gc/GCConnector.java index 5de170b..b196504 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCConnector.java +++ b/main/src/cgeo/geocaching/connector/gc/GCConnector.java @@ -149,6 +149,15 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode, return removed; } + /** + * Add a cache to the favorites list. + * + * This must not be called from the UI thread. + * + * @param cache the cache to add + * @return <code>true</code> if the cache was sucessfully added, <code>false</code> otherwise + */ + public static boolean addToFavorites(cgCache cache) { final boolean added = GCParser.addToFavorites(cache); if (added) { @@ -157,6 +166,15 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode, return added; } + /** + * Remove a cache from the favorites list. + * + * This must not be called from the UI thread. + * + * @param cache the cache to add + * @return <code>true</code> if the cache was sucessfully added, <code>false</code> otherwise + */ + public static boolean removeFromFavorites(cgCache cache) { final boolean removed = GCParser.removeFromFavorites(cache); if (removed) { |
