-
-
Save vishnusosale/ee2c6f60bfac3271856071db6131a176 to your computer and use it in GitHub Desktop.
Main entry point for accessing the Challenges data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.annotation.NonNull; | |
/** | |
* This is the main entry point for accessing the Challenges data | |
*/ | |
public interface ChallengesDataStore { | |
// Get all challenge data | |
void getChallenges(@NonNull GetChallengesCallback getChallengesCallback); | |
// Save all challenge data | |
void saveChallenges(@NonNull Challenge challenge); | |
// Clear persisted challenge data | |
void deleteAllChallenges(); | |
// Callback interface | |
interface GetChallengesCallback { | |
void onChallengesLoaded(List<Challenge> challenges); | |
void onError(Exception errorMessage); | |
void onDataNotAvailable(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment