diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2012-03-10 07:37:59 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2012-03-10 07:37:59 +0100 |
commit | b297de18e81872e9725867ba4da4a9481aedfcbf (patch) | |
tree | 80db5404f602577fdbf2d3e1bb34c36f850300d2 /main/src/cgeo/geocaching/go4cache | |
parent | 5daaa3d454ff680e74fdbf8f673674d0eb339817 (diff) | |
download | cgeo-b297de18e81872e9725867ba4da4a9481aedfcbf.zip cgeo-b297de18e81872e9725867ba4da4a9481aedfcbf.tar.gz cgeo-b297de18e81872e9725867ba4da4a9481aedfcbf.tar.bz2 |
refactoring: first part of removing cgBase
* extract network stuff (non GC related)
* extract GC login stuff
* move UI related pieces to activities
* to do: move parsing and searching to better places, remove cgBase
completely afterwards
Diffstat (limited to 'main/src/cgeo/geocaching/go4cache')
-rw-r--r-- | main/src/cgeo/geocaching/go4cache/Go4Cache.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/go4cache/Go4Cache.java b/main/src/cgeo/geocaching/go4cache/Go4Cache.java index 7243383..fb53c27 100644 --- a/main/src/cgeo/geocaching/go4cache/Go4Cache.java +++ b/main/src/cgeo/geocaching/go4cache/Go4Cache.java @@ -6,6 +6,7 @@ import cgeo.geocaching.cgeoapplication; import cgeo.geocaching.geopoint.Geopoint; import cgeo.geocaching.geopoint.GeopointFormatter.Format; import cgeo.geocaching.geopoint.Viewport; +import cgeo.geocaching.network.Network; import cgeo.geocaching.network.Parameters; import cgeo.geocaching.utils.CryptUtils; @@ -99,7 +100,7 @@ public final class Go4Cache extends Thread { params.put("v", cgBase.version); } - cgBase.postRequest("http://api.go4cache.com/", params); + Network.postRequest("http://api.go4cache.com/", params); // Update our coordinates even if the request was not successful, as not to hammer the server // with invalid requests for every new GPS position. @@ -134,7 +135,7 @@ public final class Go4Cache extends Thread { "lnm", viewport.bottomLeft.format(Format.LON_DECDEGREE_RAW), "lnx", viewport.topRight.format(Format.LON_DECDEGREE_RAW)); - final String data = cgBase.getResponseData(cgBase.postRequest("http://api.go4cache.com/get.php", params)); + final String data = Network.getResponseData(Network.postRequest("http://api.go4cache.com/get.php", params)); if (StringUtils.isBlank(data)) { Log.e(Settings.tag, "cgeoBase.getGeocachersInViewport: No data from server"); |