2019-12-08 19:02:08 +01:00
|
|
|
package pl.edu.amu.wmi.socialaggregator.socialplatforms
|
|
|
|
|
|
|
|
import android.content.Context
|
2020-01-06 19:49:59 +01:00
|
|
|
import android.content.Intent
|
2019-12-08 19:02:08 +01:00
|
|
|
import android.graphics.Bitmap
|
2020-01-09 20:59:24 +01:00
|
|
|
import io.reactivex.Single
|
2020-01-06 19:49:59 +01:00
|
|
|
import io.reactivex.subjects.PublishSubject
|
|
|
|
import pl.edu.amu.wmi.socialaggregator.viewholders.SocialWithButtonRecycler
|
2019-12-08 19:02:08 +01:00
|
|
|
|
|
|
|
interface SocialPlatform {
|
|
|
|
|
|
|
|
fun getName(): String
|
|
|
|
fun login(context: Context)
|
|
|
|
fun logout(context: Context)
|
|
|
|
fun isLoggedIn(context: Context): Boolean
|
2020-01-11 18:18:34 +01:00
|
|
|
fun addPost(publishSubject: PublishSubject<Any>,
|
|
|
|
context: Context, text: String, images: List<Bitmap>,
|
|
|
|
imagePaths: List<String>)
|
|
|
|
|
2020-01-09 20:59:24 +01:00
|
|
|
fun getPosts(context: Context): Single<List<Post>>
|
2019-12-15 14:59:34 +01:00
|
|
|
fun getLogo(): Int
|
2020-01-06 19:49:59 +01:00
|
|
|
fun handleButtonView(context: Context): (SocialWithButtonRecycler.ViewHolder) -> Unit = {}
|
|
|
|
fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {}
|
2019-12-08 19:02:08 +01:00
|
|
|
}
|