summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline
diff options
context:
space:
mode:
authorAntonio Zugaldia <antonio@mapbox.com>2016-03-15 10:48:28 -0400
committerAntonio Zugaldia <antonio@mapbox.com>2016-03-23 12:20:35 -0400
commita7fedcb604c45965d4172deb8c67f958f9877b12 (patch)
tree5a27cb3235067ef469c800192565c1d937a0fb1d /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline
parentb57f0fb987cde24643d5913bbcea83e3aa5ae04d (diff)
downloadqtlocation-mapboxgl-a7fedcb604c45965d4172deb8c67f958f9877b12.tar.gz
[android] Add Javadoc for offline package
Fixes #4295
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java31
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java35
2 files changed, 58 insertions, 8 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java
index 8ddc68c86f..85b3d619b8 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java
@@ -43,17 +43,42 @@ public class OfflineManager {
// This object is implemented as a singleton
private static OfflineManager instance;
- /*
- * Callbacks
+ /**
+ * This callback receives an asynchronous response containing a list of all
+ * {@link OfflineRegion} in the database, or an error message otherwise.
*/
-
public interface ListOfflineRegionsCallback {
+ /**
+ * Receives the list of offline regions
+ *
+ * @param offlineRegions
+ */
void onList(OfflineRegion[] offlineRegions);
+
+ /**
+ * Receives the error message
+ *
+ * @param error
+ */
void onError(String error);
}
+ /**
+ * This callback receives an asynchronous response containing the newly created
+ * {@link OfflineRegion} in the database, or an error message otherwise.
+ */
public interface CreateOfflineRegionCallback {
+ /**
+ * Receives the newly created offline region
+ * @param offlineRegion
+ */
void onCreate(OfflineRegion offlineRegion);
+
+ /**
+ * Receives the error message
+ *
+ * @param error
+ */
void onError(String error);
}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java
index 7714f9f368..7f066e74d1 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java
@@ -10,8 +10,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
- * To use offline maps on mobile, you will first have to create an offline region.
- * Use OfflineManager.createOfflineRegion() to create a new offline region.
+ * An offline region is the basic building block for offline mobile maps.
+ * Use {@link com.mapbox.mapboxsdk.offline.OfflineManager.CreateOfflineRegionCallback}
+ * to create a new offline region.
*/
public class OfflineRegion {
@@ -84,17 +85,41 @@ public class OfflineRegion {
void mapboxTileCountLimitExceeded(long limit);
}
- /*
- * Callbacks
+ /**
+ * This callback receives an asynchronous response containing the {@link OfflineRegionStatus}
+ * of the offline region, or a {@link String} error message otherwise.
*/
-
public interface OfflineRegionStatusCallback {
+ /**
+ * Receives the status
+ *
+ * @param status
+ */
void onStatus(OfflineRegionStatus status);
+
+ /**
+ * Receives the error message
+ *
+ * @param error
+ */
void onError(String error);
}
+ /**
+ * This callback receives an asynchronous response containing a notification when
+ * an offline region has been deleted, or a {@link String} error message otherwise.
+ */
public interface OfflineRegionDeleteCallback {
+ /**
+ * Receives the delete notification
+ */
void onDelete();
+
+ /**
+ * Receives the error message
+ *
+ * @param error
+ */
void onError(String error);
}