Add internal keyword where it makes sense

This commit is contained in:
ganfra 2018-11-08 11:04:40 +01:00
parent 7b6092cee1
commit 240b4715fc
135 changed files with 170 additions and 225 deletions

View file

@ -1,4 +1,4 @@
package im.vector.matrix.android.internal.auth.data
package im.vector.matrix.android.api.auth.data
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

View file

@ -1,6 +1,4 @@
package im.vector.matrix.android.internal.auth.data
import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig
package im.vector.matrix.android.api.auth.data
data class SessionParams(
val credentials: Credentials,

View file

@ -3,7 +3,7 @@ package im.vector.matrix.android.api.session
import android.support.annotation.MainThread
import im.vector.matrix.android.api.session.group.GroupService
import im.vector.matrix.android.api.session.room.RoomService
import im.vector.matrix.android.internal.auth.data.SessionParams
import im.vector.matrix.android.api.auth.data.SessionParams
interface Session : RoomService, GroupService {

View file

@ -1,6 +1,6 @@
package im.vector.matrix.android.internal.auth
import im.vector.matrix.android.internal.auth.data.Credentials
import im.vector.matrix.android.api.auth.data.Credentials
import im.vector.matrix.android.internal.auth.data.PasswordLoginParams
import im.vector.matrix.android.internal.network.NetworkConstants
import retrofit2.Call
@ -10,7 +10,7 @@ import retrofit2.http.POST
/**
* The login REST API.
*/
interface AuthAPI {
internal interface AuthAPI {
/**
* Pass params to the server for the current login phase.

View file

@ -6,9 +6,9 @@ import im.vector.matrix.android.api.auth.Authenticator
import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.util.Cancelable
import im.vector.matrix.android.internal.auth.data.Credentials
import im.vector.matrix.android.api.auth.data.Credentials
import im.vector.matrix.android.internal.auth.data.PasswordLoginParams
import im.vector.matrix.android.internal.auth.data.SessionParams
import im.vector.matrix.android.api.auth.data.SessionParams
import im.vector.matrix.android.internal.auth.data.ThreePidMedium
import im.vector.matrix.android.internal.network.executeRequest
import im.vector.matrix.android.internal.session.DefaultSession
@ -19,7 +19,7 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import retrofit2.Retrofit
class DefaultAuthenticator(private val retrofitBuilder: Retrofit.Builder,
internal class DefaultAuthenticator(private val retrofitBuilder: Retrofit.Builder,
private val coroutineDispatchers: MatrixCoroutineDispatchers,
private val sessionParamsStore: SessionParamsStore) : Authenticator {

View file

@ -1,9 +1,9 @@
package im.vector.matrix.android.internal.auth
import arrow.core.Try
import im.vector.matrix.android.internal.auth.data.SessionParams
import im.vector.matrix.android.api.auth.data.SessionParams
interface SessionParamsStore {
internal interface SessionParamsStore {
fun get(): SessionParams?

View file

@ -3,5 +3,5 @@ package im.vector.matrix.android.internal.auth.data
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class LoginFlow(val type: String,
internal data class LoginFlow(val type: String,
val stages: List<String>)

View file

@ -3,4 +3,4 @@ package im.vector.matrix.android.internal.auth.data
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class LoginFlowResponse(val flows: List<LoginFlow>)
internal data class LoginFlowResponse(val flows: List<LoginFlow>)

View file

@ -1,6 +1,6 @@
package im.vector.matrix.android.internal.auth.data
object LoginFlowTypes {
internal object LoginFlowTypes {
const val PASSWORD = "m.login.password"
const val OAUTH2 = "m.login.oauth2"
const val EMAIL_CODE = "m.login.email.code"

View file

@ -1,5 +1,5 @@
package im.vector.matrix.android.internal.auth.data
interface LoginParams {
internal interface LoginParams {
val type: String
}

View file

@ -4,7 +4,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class PasswordLoginParams(@Json(name = "identifier") val identifier: Map<String, String>,
internal data class PasswordLoginParams(@Json(name = "identifier") val identifier: Map<String, String>,
@Json(name = "password") val password: String,
@Json(name = "type") override val type: String,
@Json(name = "initial_device_display_name") val deviceDisplayName: String?,

View file

@ -1,6 +1,6 @@
package im.vector.matrix.android.internal.auth.data
object ThreePidMedium {
internal object ThreePidMedium {
const val EMAIL = "email"
const val MSISDN = "msisdn"
}

View file

@ -2,11 +2,11 @@ package im.vector.matrix.android.internal.auth.db
import arrow.core.Try
import im.vector.matrix.android.internal.auth.SessionParamsStore
import im.vector.matrix.android.internal.auth.data.SessionParams
import im.vector.matrix.android.api.auth.data.SessionParams
import io.realm.Realm
import io.realm.RealmConfiguration
class RealmSessionParamsStore(private val mapper: SessionParamsMapper,
internal class RealmSessionParamsStore(private val mapper: SessionParamsMapper,
private val realmConfiguration: RealmConfiguration) : SessionParamsStore {
override fun save(sessionParams: SessionParams): Try<SessionParams> {

View file

@ -2,7 +2,7 @@ package im.vector.matrix.android.internal.auth.db
import io.realm.RealmObject
open class SessionParamsEntity(
internal open class SessionParamsEntity(
var credentialsJson: String = "",
var homeServerConnectionConfigJson: String = ""
) : RealmObject()

View file

@ -2,10 +2,10 @@ package im.vector.matrix.android.internal.auth.db
import com.squareup.moshi.Moshi
import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig
import im.vector.matrix.android.internal.auth.data.Credentials
import im.vector.matrix.android.internal.auth.data.SessionParams
import im.vector.matrix.android.api.auth.data.Credentials
import im.vector.matrix.android.api.auth.data.SessionParams
class SessionParamsMapper(moshi: Moshi) {
internal class SessionParamsMapper(moshi: Moshi) {
private val credentialsAdapter = moshi.adapter(Credentials::class.java)
private val homeServerConnectionConfigAdapter = moshi.adapter(HomeServerConnectionConfig::class.java)

View file

@ -1,6 +1,6 @@
package im.vector.matrix.android.internal.database
object DBConstants {
internal object DBConstants {
const val STATE_EVENTS_CHUNK_TOKEN = "STATE_EVENTS_CHUNK_TOKEN"

View file

@ -1,22 +0,0 @@
package im.vector.matrix.android.internal.database
import android.arch.lifecycle.LiveData
import io.realm.RealmChangeListener
import io.realm.RealmModel
import io.realm.RealmResults
class RealmLiveData<T : RealmModel, U>(private val realmResults: RealmResults<T>,
private val mapper: (T) -> U) : LiveData<List<U>>() {
private val listener = RealmChangeListener<RealmResults<T>> { results ->
value = results.map { mapper.invoke(it) }
}
override fun onActive() {
realmResults.addChangeListener(listener)
}
override fun onInactive() {
realmResults.removeChangeListener(listener)
}
}

View file

@ -1,31 +0,0 @@
package im.vector.matrix.android.internal.database
import android.support.annotation.MainThread
import io.realm.Realm
import io.realm.RealmConfiguration
import java.util.concurrent.atomic.AtomicBoolean
class SessionRealmHolder(private val realmConfiguration: RealmConfiguration
) {
lateinit var instance: Realm
private val isOpen = AtomicBoolean(false)
@MainThread
fun open() {
if (isOpen.compareAndSet(false, true)) {
instance = Realm.getInstance(realmConfiguration)
}
}
@MainThread
fun close() {
if (isOpen.compareAndSet(true, false)) {
instance.close()
Realm.compactRealm(realmConfiguration)
}
}
}

View file

@ -5,7 +5,7 @@ import im.vector.matrix.android.internal.database.mapper.asEntity
import im.vector.matrix.android.internal.database.model.ChunkEntity
import im.vector.matrix.android.internal.database.query.fastContains
fun List<Event>.addManagedToChunk(chunkEntity: ChunkEntity) {
internal fun List<Event>.addManagedToChunk(chunkEntity: ChunkEntity) {
if (!chunkEntity.isManaged) {
throw IllegalStateException("Chunk entity should be managed to use fast contains")
}

View file

@ -7,13 +7,13 @@ import im.vector.matrix.android.internal.database.model.EventEntity
import im.vector.matrix.android.internal.di.MoshiProvider
object EventMapper {
internal object EventMapper {
private val moshi = MoshiProvider.providesMoshi()
private val type = Types.newParameterizedType(Map::class.java, String::class.java, Any::class.java)
private val adapter = moshi.adapter<Map<String, Any>>(type)
internal fun map(event: Event): EventEntity {
fun map(event: Event): EventEntity {
val eventEntity = EventEntity()
eventEntity.eventId = event.eventId ?: ""
eventEntity.content = adapter.toJson(event.content)
@ -28,7 +28,7 @@ object EventMapper {
return eventEntity
}
internal fun map(eventEntity: EventEntity): Event {
fun map(eventEntity: EventEntity): Event {
return Event(
type = eventEntity.type,
eventId = eventEntity.eventId,
@ -44,10 +44,10 @@ object EventMapper {
}
}
fun EventEntity.asDomain(): Event {
internal fun EventEntity.asDomain(): Event {
return EventMapper.map(this)
}
fun Event.asEntity(): EventEntity {
internal fun Event.asEntity(): EventEntity {
return EventMapper.map(this)
}

View file

@ -5,15 +5,15 @@ import im.vector.matrix.android.internal.database.model.GroupEntity
import im.vector.matrix.android.internal.session.group.DefaultGroup
object GroupMapper {
internal object GroupMapper {
internal fun map(groupEntity: GroupEntity): Group {
fun map(groupEntity: GroupEntity): Group {
return DefaultGroup(
groupEntity.groupId
)
}
}
fun GroupEntity.asDomain(): Group {
internal fun GroupEntity.asDomain(): Group {
return GroupMapper.map(this)
}

View file

@ -4,9 +4,9 @@ import im.vector.matrix.android.api.session.group.model.GroupSummary
import im.vector.matrix.android.internal.database.model.GroupSummaryEntity
object GroupSummaryMapper {
internal object GroupSummaryMapper {
internal fun map(roomSummaryEntity: GroupSummaryEntity): GroupSummary {
fun map(roomSummaryEntity: GroupSummaryEntity): GroupSummary {
return GroupSummary(
roomSummaryEntity.groupId,
roomSummaryEntity.displayName,
@ -18,6 +18,6 @@ object GroupSummaryMapper {
}
}
fun GroupSummaryEntity.asDomain(): GroupSummary {
internal fun GroupSummaryEntity.asDomain(): GroupSummary {
return GroupSummaryMapper.map(this)
}

View file

@ -5,10 +5,10 @@ import im.vector.matrix.android.internal.database.model.RoomEntity
import im.vector.matrix.android.internal.session.room.DefaultRoom
object RoomMapper {
internal object RoomMapper {
internal fun map(roomEntity: RoomEntity): Room {
fun map(roomEntity: RoomEntity): Room {
return DefaultRoom(
roomEntity.roomId,
roomEntity.membership
@ -16,6 +16,6 @@ object RoomMapper {
}
}
fun RoomEntity.asDomain(): Room {
internal fun RoomEntity.asDomain(): Room {
return RoomMapper.map(this)
}

View file

@ -4,9 +4,9 @@ import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.matrix.android.internal.database.model.RoomSummaryEntity
object RoomSummaryMapper {
internal object RoomSummaryMapper {
internal fun map(roomSummaryEntity: RoomSummaryEntity): RoomSummary {
fun map(roomSummaryEntity: RoomSummaryEntity): RoomSummary {
return RoomSummary(
roomSummaryEntity.roomId,
roomSummaryEntity.displayName ?: "",
@ -18,6 +18,6 @@ object RoomSummaryMapper {
}
}
fun RoomSummaryEntity.asDomain(): RoomSummary {
internal fun RoomSummaryEntity.asDomain(): RoomSummary {
return RoomSummaryMapper.map(this)
}

View file

@ -5,7 +5,7 @@ import io.realm.RealmObject
import io.realm.RealmResults
import io.realm.annotations.LinkingObjects
open class ChunkEntity(var prevToken: String? = null,
internal open class ChunkEntity(var prevToken: String? = null,
var nextToken: String? = null,
var events: RealmList<EventEntity> = RealmList()
) : RealmObject() {

View file

@ -5,7 +5,7 @@ import io.realm.RealmResults
import io.realm.annotations.LinkingObjects
import io.realm.annotations.PrimaryKey
open class EventEntity(@PrimaryKey var eventId: String = "",
internal open class EventEntity(@PrimaryKey var eventId: String = "",
var type: String = "",
var content: String = "",
var prevContent: String? = null,

View file

@ -6,7 +6,7 @@ import io.realm.annotations.Ignore
import io.realm.annotations.PrimaryKey
import kotlin.properties.Delegates
open class GroupEntity(@PrimaryKey var groupId: String = ""
internal open class GroupEntity(@PrimaryKey var groupId: String = ""
) : RealmObject() {

View file

@ -4,7 +4,7 @@ import io.realm.RealmList
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
open class GroupSummaryEntity(@PrimaryKey var groupId: String = "",
internal open class GroupSummaryEntity(@PrimaryKey var groupId: String = "",
var displayName: String = "",
var shortDescription: String = "",
var avatarUrl: String = "",

View file

@ -3,7 +3,7 @@ package im.vector.matrix.android.internal.database.model
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
open class ReadReceiptEntity(@PrimaryKey var primaryKey: String = "",
internal open class ReadReceiptEntity(@PrimaryKey var primaryKey: String = "",
var userId: String = "",
var eventId: String = "",
var roomId: String = "",

View file

@ -7,7 +7,7 @@ import io.realm.annotations.Ignore
import io.realm.annotations.PrimaryKey
import kotlin.properties.Delegates
open class RoomEntity(@PrimaryKey var roomId: String = "",
internal open class RoomEntity(@PrimaryKey var roomId: String = "",
var chunks: RealmList<ChunkEntity> = RealmList(),
var areAllMembersLoaded: Boolean = false
) : RealmObject() {

View file

@ -4,7 +4,7 @@ import io.realm.RealmList
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
open class RoomSummaryEntity(@PrimaryKey var roomId: String = "",
internal open class RoomSummaryEntity(@PrimaryKey var roomId: String = "",
var displayName: String? = "",
var avatarUrl: String? = "",
var topic: String? = "",

View file

@ -3,6 +3,6 @@ package im.vector.matrix.android.internal.database.model
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
open class SyncEntity(var nextBatch: String? = null,
internal open class SyncEntity(var nextBatch: String? = null,
@PrimaryKey var id: Long = 0
) : RealmObject()

View file

@ -9,14 +9,14 @@ import io.realm.RealmQuery
import io.realm.RealmResults
import io.realm.kotlin.where
fun ChunkEntity.Companion.where(realm: Realm, roomId: String): RealmQuery<ChunkEntity> {
internal fun ChunkEntity.Companion.where(realm: Realm, roomId: String): RealmQuery<ChunkEntity> {
return realm.where<ChunkEntity>()
.equalTo("${ChunkEntityFields.ROOM}.${RoomEntityFields.ROOM_ID}", roomId)
.notEqualTo(ChunkEntityFields.PREV_TOKEN, DBConstants.STATE_EVENTS_CHUNK_TOKEN)
.notEqualTo(ChunkEntityFields.NEXT_TOKEN, DBConstants.STATE_EVENTS_CHUNK_TOKEN)
}
fun ChunkEntity.Companion.findWithPrevToken(realm: Realm, roomId: String, prevToken: String?): ChunkEntity? {
internal fun ChunkEntity.Companion.findWithPrevToken(realm: Realm, roomId: String, prevToken: String?): ChunkEntity? {
if (prevToken == null) {
return null
}
@ -26,7 +26,7 @@ fun ChunkEntity.Companion.findWithPrevToken(realm: Realm, roomId: String, prevTo
.findFirst()
}
fun ChunkEntity.Companion.findWithNextToken(realm: Realm, roomId: String, nextToken: String?): ChunkEntity? {
internal fun ChunkEntity.Companion.findWithNextToken(realm: Realm, roomId: String, nextToken: String?): ChunkEntity? {
if (nextToken == null) {
return null
}
@ -36,7 +36,7 @@ fun ChunkEntity.Companion.findWithNextToken(realm: Realm, roomId: String, nextTo
.findFirst()
}
fun ChunkEntity.Companion.findLastLiveChunkFromRoom(realm: Realm, roomId: String): ChunkEntity? {
internal fun ChunkEntity.Companion.findLastLiveChunkFromRoom(realm: Realm, roomId: String): ChunkEntity? {
return where(realm, roomId)
.and()
.isNull(ChunkEntityFields.NEXT_TOKEN)
@ -44,7 +44,7 @@ fun ChunkEntity.Companion.findLastLiveChunkFromRoom(realm: Realm, roomId: String
.last(null)
}
fun ChunkEntity.Companion.findAllIncludingEvents(realm: Realm, eventIds: List<String>): RealmResults<ChunkEntity> {
internal fun ChunkEntity.Companion.findAllIncludingEvents(realm: Realm, eventIds: List<String>): RealmResults<ChunkEntity> {
return realm.where<ChunkEntity>()
.`in`(ChunkEntityFields.EVENTS.EVENT_ID, eventIds.toTypedArray())
.notEqualTo(ChunkEntityFields.PREV_TOKEN, DBConstants.STATE_EVENTS_CHUNK_TOKEN)

View file

@ -10,12 +10,12 @@ import io.realm.RealmQuery
import io.realm.Sort
import io.realm.kotlin.where
fun EventEntity.Companion.where(realm: Realm, eventId: String): RealmQuery<EventEntity> {
internal fun EventEntity.Companion.where(realm: Realm, eventId: String): RealmQuery<EventEntity> {
return realm.where<EventEntity>()
.equalTo(EventEntityFields.EVENT_ID, eventId)
}
fun EventEntity.Companion.where(realm: Realm, roomId: String? = null, type: String? = null): RealmQuery<EventEntity> {
internal fun EventEntity.Companion.where(realm: Realm, roomId: String? = null, type: String? = null): RealmQuery<EventEntity> {
val query = realm.where<EventEntity>()
if (roomId != null) {
query.equalTo("${EventEntityFields.CHUNK}.${ChunkEntityFields.ROOM}.${RoomEntityFields.ROOM_ID}", roomId)
@ -26,13 +26,13 @@ fun EventEntity.Companion.where(realm: Realm, roomId: String? = null, type: Stri
return query
}
fun EventEntity.Companion.stateEvents(realm: Realm, roomId: String): RealmQuery<EventEntity> {
internal fun EventEntity.Companion.stateEvents(realm: Realm, roomId: String): RealmQuery<EventEntity> {
return realm.where<EventEntity>()
.equalTo("${EventEntityFields.CHUNK}.${ChunkEntityFields.ROOM}.${RoomEntityFields.ROOM_ID}", roomId)
.isNotNull(EventEntityFields.STATE_KEY)
}
fun RealmQuery<EventEntity>.last(from: Long? = null): EventEntity? {
internal fun RealmQuery<EventEntity>.last(from: Long? = null): EventEntity? {
if (from != null) {
this.lessThan(EventEntityFields.ORIGIN_SERVER_TS, from)
}
@ -41,6 +41,6 @@ fun RealmQuery<EventEntity>.last(from: Long? = null): EventEntity? {
.findFirst()
}
fun RealmList<EventEntity>.fastContains(eventEntity: EventEntity): Boolean {
internal fun RealmList<EventEntity>.fastContains(eventEntity: EventEntity): Boolean {
return this.where().equalTo(EventEntityFields.EVENT_ID, eventEntity.eventId).findFirst() != null
}

View file

@ -7,11 +7,11 @@ import io.realm.Realm
import io.realm.RealmQuery
import io.realm.kotlin.where
fun GroupEntity.Companion.where(realm: Realm, roomId: String): RealmQuery<GroupEntity> {
internal fun GroupEntity.Companion.where(realm: Realm, roomId: String): RealmQuery<GroupEntity> {
return realm.where<GroupEntity>().equalTo(GroupEntityFields.GROUP_ID, roomId)
}
fun GroupEntity.Companion.where(realm: Realm, membership: MyMembership? = null): RealmQuery<GroupEntity> {
internal fun GroupEntity.Companion.where(realm: Realm, membership: MyMembership? = null): RealmQuery<GroupEntity> {
val query = realm.where<GroupEntity>()
if (membership != null) {
query.equalTo(GroupEntityFields.MEMBERSHIP_STR, membership.name)

View file

@ -6,7 +6,7 @@ import io.realm.Realm
import io.realm.RealmQuery
import io.realm.kotlin.where
fun GroupSummaryEntity.Companion.where(realm: Realm, groupId: String? = null): RealmQuery<GroupSummaryEntity> {
internal fun GroupSummaryEntity.Companion.where(realm: Realm, groupId: String? = null): RealmQuery<GroupSummaryEntity> {
val query = realm.where<GroupSummaryEntity>()
if (groupId != null) {
query.equalTo(GroupSummaryEntityFields.GROUP_ID, groupId)

View file

@ -6,7 +6,7 @@ import io.realm.Realm
import io.realm.RealmQuery
import io.realm.kotlin.where
fun ReadReceiptEntity.Companion.where(realm: Realm, roomId: String, userId: String): RealmQuery<ReadReceiptEntity> {
internal fun ReadReceiptEntity.Companion.where(realm: Realm, roomId: String, userId: String): RealmQuery<ReadReceiptEntity> {
return realm.where<ReadReceiptEntity>()
.equalTo(ReadReceiptEntityFields.ROOM_ID, roomId)
.equalTo(ReadReceiptEntityFields.USER_ID, userId)

View file

@ -7,11 +7,11 @@ import io.realm.Realm
import io.realm.RealmQuery
import io.realm.kotlin.where
fun RoomEntity.Companion.where(realm: Realm, roomId: String): RealmQuery<RoomEntity> {
internal fun RoomEntity.Companion.where(realm: Realm, roomId: String): RealmQuery<RoomEntity> {
return realm.where<RoomEntity>().equalTo(RoomEntityFields.ROOM_ID, roomId)
}
fun RoomEntity.Companion.where(realm: Realm, membership: MyMembership? = null): RealmQuery<RoomEntity> {
internal fun RoomEntity.Companion.where(realm: Realm, membership: MyMembership? = null): RealmQuery<RoomEntity> {
val query = realm.where<RoomEntity>()
if (membership != null) {
query.equalTo(RoomEntityFields.MEMBERSHIP_STR, membership.name)

View file

@ -6,7 +6,7 @@ import io.realm.Realm
import io.realm.RealmQuery
import io.realm.kotlin.where
fun RoomSummaryEntity.Companion.where(realm: Realm, roomId: String? = null): RealmQuery<RoomSummaryEntity> {
internal fun RoomSummaryEntity.Companion.where(realm: Realm, roomId: String? = null): RealmQuery<RoomSummaryEntity> {
val query = realm.where<RoomSummaryEntity>()
if (roomId != null) {
query.equalTo(RoomSummaryEntityFields.ROOM_ID, roomId)
@ -14,7 +14,7 @@ fun RoomSummaryEntity.Companion.where(realm: Realm, roomId: String? = null): Rea
return query
}
fun RoomSummaryEntity.Companion.lastSelected(realm: Realm): RoomSummaryEntity? {
internal fun RoomSummaryEntity.Companion.lastSelected(realm: Realm): RoomSummaryEntity? {
return realm.where<RoomSummaryEntity>()
.equalTo(RoomSummaryEntityFields.IS_LATEST_SELECTED, true)
.findFirst()

View file

@ -25,7 +25,7 @@ import android.text.TextUtils;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.internal.legacy.call.MXCallsManager;
import im.vector.matrix.android.internal.legacy.crypto.MXCrypto;
import im.vector.matrix.android.internal.legacy.crypto.MXCryptoError;

View file

@ -46,8 +46,8 @@ import java.util.Map;
import java.util.Set;
import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.call.MXCallsManager;
import im.vector.matrix.android.internal.legacy.crypto.MXCrypto;
import im.vector.matrix.android.internal.legacy.crypto.MXCryptoConfig;

View file

@ -37,8 +37,8 @@ import javax.net.ssl.X509TrustManager;
import im.vector.matrix.android.BuildConfig;
import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.listeners.IMXNetworkEventListener;
import im.vector.matrix.android.internal.legacy.network.NetworkConnectivityReceiver;
import im.vector.matrix.android.internal.legacy.rest.client.MXRestExecutorService;

View file

@ -18,7 +18,7 @@ package im.vector.matrix.android.internal.legacy.data.cryptostore;
import android.content.Context;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.internal.legacy.crypto.IncomingRoomKeyRequest;
import im.vector.matrix.android.internal.legacy.crypto.OutgoingRoomKeyRequest;
import im.vector.matrix.android.internal.legacy.crypto.data.MXDeviceInfo;

View file

@ -41,7 +41,7 @@ import java.util.Set;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.internal.legacy.crypto.IncomingRoomKeyRequest;
import im.vector.matrix.android.internal.legacy.crypto.OutgoingRoomKeyRequest;
import im.vector.matrix.android.internal.legacy.crypto.data.MXDeviceInfo;

View file

@ -41,7 +41,7 @@ import java.util.Set;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.internal.legacy.data.Room;
import im.vector.matrix.android.internal.legacy.data.RoomAccountData;
import im.vector.matrix.android.internal.legacy.data.RoomState;

View file

@ -24,7 +24,7 @@ import android.os.Looper;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.internal.legacy.MXDataHandler;
import im.vector.matrix.android.internal.legacy.data.Room;
import im.vector.matrix.android.internal.legacy.data.RoomAccountData;

View file

@ -19,7 +19,7 @@ package im.vector.matrix.android.internal.legacy.rest.client;
import java.util.HashMap;
import java.util.Map;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.AccountDataApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -17,7 +17,7 @@ package im.vector.matrix.android.internal.legacy.rest.client;
import com.google.gson.JsonObject;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.CallRulesApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -24,7 +24,7 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.crypto.data.MXKey;
import im.vector.matrix.android.internal.legacy.crypto.data.MXUsersDevicesMap;

View file

@ -19,7 +19,7 @@ package im.vector.matrix.android.internal.legacy.rest.client;
import android.text.TextUtils;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.EventsApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -16,7 +16,7 @@
*/
package im.vector.matrix.android.internal.legacy.rest.client;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.FilterApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -23,7 +23,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.GroupsApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -26,8 +26,8 @@ import com.google.gson.JsonObject;
import java.util.List;
import java.util.UUID;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.LoginApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -22,7 +22,7 @@ import org.matrix.olm.OlmException;
import org.matrix.olm.OlmPkEncryption;
import org.matrix.olm.OlmPkMessage;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.data.store.IMXStore;
import im.vector.matrix.android.internal.legacy.rest.api.MediaScanApi;

View file

@ -16,7 +16,7 @@
*/
package im.vector.matrix.android.internal.legacy.rest.client;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.PresenceApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -21,7 +21,7 @@ import android.text.TextUtils;
import java.util.List;
import java.util.Map;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.ProfileApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -16,7 +16,7 @@
*/
package im.vector.matrix.android.internal.legacy.rest.client;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.PushRulesApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -19,7 +19,7 @@ package im.vector.matrix.android.internal.legacy.rest.client;
import java.util.HashMap;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.data.Pusher;
import im.vector.matrix.android.internal.legacy.rest.api.PushersApi;

View file

@ -27,7 +27,7 @@ import com.google.gson.JsonObject;
import java.util.HashMap;
import java.util.Map;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.data.RoomState;
import im.vector.matrix.android.internal.legacy.data.timeline.EventTimeline;

View file

@ -24,7 +24,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import im.vector.matrix.android.internal.auth.data.SessionParams;
import im.vector.matrix.android.api.auth.data.SessionParams;
import im.vector.matrix.android.internal.legacy.RestClient;
import im.vector.matrix.android.internal.legacy.rest.api.ThirdPidApi;
import im.vector.matrix.android.internal.legacy.rest.callback.ApiCallback;

View file

@ -29,7 +29,7 @@ import java.util.List;
import java.util.Map;
import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.internal.legacy.MXPatterns;
import im.vector.matrix.android.internal.legacy.data.RoomState;
import im.vector.matrix.android.internal.legacy.rest.model.pid.Invite3Pid;

View file

@ -20,7 +20,7 @@ package im.vector.matrix.android.internal.legacy.util;
import android.support.annotation.Nullable;
import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig;
import im.vector.matrix.android.internal.auth.data.Credentials;
import im.vector.matrix.android.api.auth.data.Credentials;
import im.vector.matrix.android.internal.legacy.RestClient;
/**

View file

@ -4,7 +4,7 @@ import im.vector.matrix.android.internal.auth.SessionParamsStore
import okhttp3.Interceptor
import okhttp3.Response
class AccessTokenInterceptor(private val sessionParamsStore: SessionParamsStore) : Interceptor {
internal class AccessTokenInterceptor(private val sessionParamsStore: SessionParamsStore) : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
var request = chain.request()

View file

@ -5,7 +5,7 @@ import com.novoda.merlin.Merlin
import com.novoda.merlin.MerlinsBeard
import com.novoda.merlin.registerable.connection.Connectable
class NetworkConnectivityChecker(context: Context) {
internal class NetworkConnectivityChecker(context: Context) {
private val merlin = Merlin.Builder().withConnectableCallbacks().build(context)
private val merlinsBeard = MerlinsBeard.from(context)

View file

@ -1,6 +1,6 @@
package im.vector.matrix.android.internal.network
object NetworkConstants {
internal object NetworkConstants {
const val URI_API_PREFIX_PATH = "_matrix/client/"
const val URI_API_PREFIX_PATH_R0 = "_matrix/client/r0/"

View file

@ -15,9 +15,9 @@ import okhttp3.ResponseBody
import retrofit2.Call
import java.io.IOException
inline fun <DATA> executeRequest(block: Request<DATA>.() -> Unit) = Request<DATA>().apply(block).execute()
internal inline fun <DATA> executeRequest(block: Request<DATA>.() -> Unit) = Request<DATA>().apply(block).execute()
class Request<DATA> {
internal class Request<DATA> {
var moshi: Moshi = MoshiProvider.providesMoshi()
lateinit var apiCall: Call<DATA>

View file

@ -4,7 +4,7 @@ import android.net.Uri
import com.squareup.moshi.FromJson
import com.squareup.moshi.ToJson
class UriMoshiAdapter {
internal class UriMoshiAdapter {
@ToJson
fun toJson(uri: Uri): String {

View file

@ -31,7 +31,7 @@ import kotlin.experimental.and
/**
* Various utility classes for dealing with X509Certificates
*/
object CertUtil {
internal object CertUtil {
private val hexArray = "0123456789ABCDEF".toCharArray()

View file

@ -31,7 +31,7 @@ import javax.net.ssl.X509TrustManager
* @param defaultTrustManager Optional trust manager to fall back on if cert does not match
* any of the fingerprints. Can be null.
*/
class PinnedTrustManager(private val mFingerprints: List<Fingerprint>?,
internal class PinnedTrustManager(private val mFingerprints: List<Fingerprint>?,
private val mDefaultTrustManager: X509TrustManager?) : X509TrustManager {
@Throws(CertificateException::class)

View file

@ -23,7 +23,7 @@ import java.security.cert.X509Certificate
* Thrown when we are given a certificate that does match the certificate we were told to
* expect.
*/
data class UnrecognizedCertificateException(
internal data class UnrecognizedCertificateException(
val certificate: X509Certificate,
val fingerprint: Fingerprint,
override val cause: Throwable?

View file

@ -10,7 +10,7 @@ import im.vector.matrix.android.api.session.group.model.GroupSummary
import im.vector.matrix.android.api.session.room.Room
import im.vector.matrix.android.api.session.room.RoomService
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.matrix.android.internal.auth.data.SessionParams
import im.vector.matrix.android.api.auth.data.SessionParams
import im.vector.matrix.android.internal.database.LiveEntityObserver
import im.vector.matrix.android.internal.session.group.GroupModule
import im.vector.matrix.android.internal.session.room.RoomModule
@ -23,7 +23,7 @@ import org.koin.standalone.getKoin
import org.koin.standalone.inject
class DefaultSession(override val sessionParams: SessionParams) : Session, KoinComponent, RoomService {
internal class DefaultSession(override val sessionParams: SessionParams) : Session, KoinComponent, RoomService {
companion object {
const val SCOPE: String = "session"

View file

@ -3,7 +3,7 @@ package im.vector.matrix.android.internal.session
import com.zhuinden.monarchy.Monarchy
import im.vector.matrix.android.api.session.group.GroupService
import im.vector.matrix.android.api.session.room.RoomService
import im.vector.matrix.android.internal.auth.data.SessionParams
import im.vector.matrix.android.api.auth.data.SessionParams
import im.vector.matrix.android.internal.database.LiveEntityObserver
import im.vector.matrix.android.internal.session.events.prune.EventsPruner
import im.vector.matrix.android.internal.session.group.DefaultGroupService
@ -19,7 +19,7 @@ import org.koin.dsl.module.Module
import org.koin.dsl.module.module
import retrofit2.Retrofit
class SessionModule(private val sessionParams: SessionParams) : Module {
internal class SessionModule(private val sessionParams: SessionParams) : Module {
override fun invoke(): ModuleDefinition = module(override = true) {

View file

@ -11,7 +11,7 @@ import im.vector.matrix.android.internal.database.query.last
import im.vector.matrix.android.internal.database.query.where
class MessageEventInterceptor(val monarchy: Monarchy) : EnrichedEventInterceptor {
internal class MessageEventInterceptor(val monarchy: Monarchy) : EnrichedEventInterceptor {
override fun canEnrich(event: EnrichedEvent): Boolean {
return event.root.type == EventType.MESSAGE

View file

@ -2,6 +2,6 @@ package im.vector.matrix.android.internal.session.group
import im.vector.matrix.android.api.session.group.Group
class DefaultGroup(override val groupId: String) : Group {
internal class DefaultGroup(override val groupId: String) : Group {
}

View file

@ -10,7 +10,7 @@ import im.vector.matrix.android.internal.database.model.GroupSummaryEntity
import im.vector.matrix.android.internal.database.model.GroupSummaryEntityFields
import im.vector.matrix.android.internal.database.query.where
class DefaultGroupService(private val monarchy: Monarchy) : GroupService {
internal class DefaultGroupService(private val monarchy: Monarchy) : GroupService {
override fun getGroup(groupId: String): Group? {
return null

View file

@ -21,7 +21,7 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
class GetGroupDataRequest(
internal class GetGroupDataRequest(
private val groupAPI: GroupAPI,
private val monarchy: Monarchy,
private val coroutineDispatchers: MatrixCoroutineDispatchers

View file

@ -8,7 +8,7 @@ import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Path
interface GroupAPI {
internal interface GroupAPI {
/**
* Request a group summary

View file

@ -7,7 +7,7 @@ import com.squareup.moshi.JsonClass
* This class represents a community profile in the server responses.
*/
@JsonClass(generateAdapter = true)
data class GroupProfile(
internal data class GroupProfile(
@Json(name = "short_description") val shortDescription: String? = null,

View file

@ -4,7 +4,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class GroupRoom(
internal data class GroupRoom(
@Json(name = "aliases") val aliases: List<String> = emptyList(),
@Json(name = "canonical_alias") val canonicalAlias: String? = null,

View file

@ -4,7 +4,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class GroupRooms(
internal data class GroupRooms(
@Json(name = "total_room_count_estimate") val totalRoomCountEstimate: Int? = null,
@Json(name = "chunk") val rooms: List<GroupRoom> = emptyList()

View file

@ -7,7 +7,7 @@ import com.squareup.moshi.JsonClass
* This class represents the summary of a community in the server response.
*/
@JsonClass(generateAdapter = true)
data class GroupSummaryResponse(
internal data class GroupSummaryResponse(
/**
* The group profile.
*/

View file

@ -7,7 +7,7 @@ import com.squareup.moshi.JsonClass
* This class represents the community rooms in a group summary response.
*/
@JsonClass(generateAdapter = true)
data class GroupSummaryRoomsSection(
internal data class GroupSummaryRoomsSection(
@Json(name = "total_room_count_estimate") val totalRoomCountEstimate: Int? = null,

View file

@ -7,7 +7,7 @@ import com.squareup.moshi.JsonClass
* This class represents the current user status in a group summary response.
*/
@JsonClass(generateAdapter = true)
data class GroupSummaryUser(
internal data class GroupSummaryUser(
/**
* The current user membership in this community.

View file

@ -9,7 +9,7 @@ import com.squareup.moshi.JsonClass
*/
@JsonClass(generateAdapter = true)
data class GroupSummaryUsersSection(
internal data class GroupSummaryUsersSection(
@Json(name = "total_user_count_estimate") val totalUserCountEstimate: Int,

View file

@ -4,7 +4,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class GroupUser(
internal data class GroupUser(
@Json(name = "display_name") val displayName: String = "",
@Json(name = "user_id") val userId: String,
@Json(name = "is_privileged") val isPrivileged: Boolean = false,

View file

@ -4,7 +4,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class GroupUsers(
internal data class GroupUsers(
@Json(name = "total_user_count_estimate") val totalUserCountEstimate: Int,
@Json(name = "chunk") val users: List<GroupUser> = emptyList()
)

View file

@ -23,7 +23,7 @@ import org.koin.core.parameter.parametersOf
import org.koin.standalone.KoinComponent
import org.koin.standalone.inject
data class DefaultRoom(
internal data class DefaultRoom(
override val roomId: String,
override val myMembership: MyMembership
) : Room, KoinComponent {

View file

@ -12,7 +12,7 @@ import im.vector.matrix.android.internal.database.model.RoomSummaryEntityFields
import im.vector.matrix.android.internal.database.query.lastSelected
import im.vector.matrix.android.internal.database.query.where
class DefaultRoomService(private val monarchy: Monarchy) : RoomService {
internal class DefaultRoomService(private val monarchy: Monarchy) : RoomService {
override fun getAllRooms(): List<Room> {
var rooms: List<Room> = emptyList()

View file

@ -10,7 +10,7 @@ import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
interface RoomAPI {
internal interface RoomAPI {
/**
* Get a list of messages starting from a reference.

View file

@ -5,7 +5,7 @@ import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.room.Room
import im.vector.matrix.android.api.session.room.model.MyMembership
import im.vector.matrix.android.api.session.room.model.RoomAvatarContent
import im.vector.matrix.android.internal.auth.data.Credentials
import im.vector.matrix.android.api.auth.data.Credentials
import im.vector.matrix.android.internal.database.mapper.asDomain
import im.vector.matrix.android.internal.database.model.EventEntity
import im.vector.matrix.android.internal.database.query.last

View file

@ -5,7 +5,7 @@ import com.zhuinden.monarchy.Monarchy
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.room.Room
import im.vector.matrix.android.api.session.room.model.RoomTopicContent
import im.vector.matrix.android.internal.auth.data.Credentials
import im.vector.matrix.android.api.auth.data.Credentials
import im.vector.matrix.android.internal.database.RealmLiveEntityObserver
import im.vector.matrix.android.internal.database.mapper.asDomain
import im.vector.matrix.android.internal.database.model.EventEntity

View file

@ -25,7 +25,7 @@ import im.vector.matrix.android.api.session.room.model.MyMembership
import im.vector.matrix.android.api.session.room.model.RoomAliasesContent
import im.vector.matrix.android.api.session.room.model.RoomCanonicalAliasContent
import im.vector.matrix.android.api.session.room.model.RoomNameContent
import im.vector.matrix.android.internal.auth.data.Credentials
import im.vector.matrix.android.api.auth.data.Credentials
import im.vector.matrix.android.internal.database.mapper.asDomain
import im.vector.matrix.android.internal.database.model.EventEntity
import im.vector.matrix.android.internal.database.model.RoomSummaryEntity

View file

@ -2,7 +2,7 @@ package im.vector.matrix.android.internal.session.room.members
import im.vector.matrix.android.api.session.room.model.RoomMember
class RoomMemberDisplayNameResolver {
internal class RoomMemberDisplayNameResolver {
fun resolve(userId: String, members: Map<String, RoomMember>): String? {
val currentMember = members[userId]

View file

@ -5,6 +5,6 @@ import com.squareup.moshi.JsonClass
import im.vector.matrix.android.api.session.events.model.Event
@JsonClass(generateAdapter = true)
data class RoomMembersResponse(
internal data class RoomMembersResponse(
@Json(name = "chunk") val roomMemberEvents: List<Event>
)

View file

@ -16,7 +16,7 @@ import io.realm.Sort
private const val PAGE_SIZE = 30
class DefaultTimelineHolder(private val roomId: String,
internal class DefaultTimelineHolder(private val roomId: String,
private val monarchy: Monarchy,
private val boundaryCallback: TimelineBoundaryCallback
) : TimelineHolder {

View file

@ -1,6 +1,6 @@
package im.vector.matrix.android.internal.session.room.timeline
enum class PaginationDirection(val value: String) {
internal enum class PaginationDirection(val value: String) {
/**
* Forwards when the event is added to the end of the timeline.
* These events come from the /sync stream or from forwards pagination.

View file

@ -25,7 +25,7 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
class PaginationRequest(private val roomAPI: RoomAPI,
internal class PaginationRequest(private val roomAPI: RoomAPI,
private val monarchy: Monarchy,
private val coroutineDispatchers: MatrixCoroutineDispatchers,
private val stateEventsChunkHandler: StateEventsChunkHandler) {

View file

@ -10,7 +10,7 @@ import im.vector.matrix.android.internal.util.PagingRequestHelper
import java.util.*
import java.util.concurrent.Executor
class TimelineBoundaryCallback(private val roomId: String,
internal class TimelineBoundaryCallback(private val roomId: String,
private val paginationRequest: PaginationRequest,
private val monarchy: Monarchy,
ioExecutor: Executor

View file

@ -5,7 +5,7 @@ import com.squareup.moshi.JsonClass
import im.vector.matrix.android.api.session.events.model.Event
@JsonClass(generateAdapter = true)
data class TokenChunkEvent(
internal data class TokenChunkEvent(
@Json(name = "start") val nextToken: String? = null,
@Json(name = "end") val prevToken: String? = null,
@Json(name = "chunk") val events: List<Event> = emptyList(),

View file

@ -11,7 +11,7 @@ import io.realm.Realm
// dict value ts value
typealias ReadReceiptContent = Map<String, Map<String, Map<String, Map<String, Double>>>>
class ReadReceiptHandler {
internal class ReadReceiptHandler {
fun handle(realm: Realm, roomId: String, content: ReadReceiptContent?): List<ReadReceiptEntity> {
if (content == null) {

Some files were not shown because too many files have changed in this diff Show more