Skip to content

Instantly share code, notes, and snippets.

@Abhityagi16
Created October 21, 2018 11:30
Show Gist options
  • Save Abhityagi16/275427197480e010b7d62d8d3aa5d628 to your computer and use it in GitHub Desktop.
Save Abhityagi16/275427197480e010b7d62d8d3aa5d628 to your computer and use it in GitHub Desktop.
import clean.architecture.example.data.model.Post
interface PostDataSource {
interface LoadPostsCallback {
fun onPostsLoaded(posts: List<Post>)
fun onError(t: Throwable)
}
interface SaveTaskCallback {
fun onSaveSuccess()
fun onError(t: Throwable)
}
fun getPosts(userId: Int, callback: LoadPostsCallback)
fun savePost(post: Post)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment