From 0f196f59c6a4cb76ab8409da62ff1f35505f94a8 Mon Sep 17 00:00:00 2001 From: Dico Karssiens Date: Sun, 11 Nov 2018 14:06:45 +0000 Subject: Changes I made before breaking my local repository. Hoping this works. --- .../kotlin/io/dico/parcels2/storage/Backing.kt | 138 ++++++++++----------- 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'src/main/kotlin/io/dico/parcels2/storage/Backing.kt') diff --git a/src/main/kotlin/io/dico/parcels2/storage/Backing.kt b/src/main/kotlin/io/dico/parcels2/storage/Backing.kt index 12d5bc7..63a5db6 100644 --- a/src/main/kotlin/io/dico/parcels2/storage/Backing.kt +++ b/src/main/kotlin/io/dico/parcels2/storage/Backing.kt @@ -1,69 +1,69 @@ -package io.dico.parcels2.storage - -import io.dico.parcels2.* -import kotlinx.coroutines.Deferred -import kotlinx.coroutines.Job -import kotlinx.coroutines.channels.ReceiveChannel -import kotlinx.coroutines.channels.SendChannel -import org.joda.time.DateTime -import java.util.UUID -import kotlin.coroutines.CoroutineContext - -interface Backing { - - val name: String - - val isConnected: Boolean - - val coroutineContext: CoroutineContext - - fun launchJob(job: Backing.() -> Unit): Job - - fun launchFuture(future: Backing.() -> T): Deferred - - fun openChannel(future: Backing.(SendChannel) -> Unit): ReceiveChannel - - fun openChannelForWriting(future: Backing.(T) -> Unit): SendChannel - - - fun init() - - fun shutdown() - - - fun getWorldCreationTime(worldId: ParcelWorldId): DateTime? - - fun setWorldCreationTime(worldId: ParcelWorldId, time: DateTime) - - fun getPlayerUuidForName(name: String): UUID? - - fun updatePlayerName(uuid: UUID, name: String) - - fun transmitParcelData(channel: SendChannel, parcels: Sequence) - - fun transmitAllParcelData(channel: SendChannel) - - fun readParcelData(parcel: ParcelId): ParcelDataHolder? - - fun getOwnedParcels(user: PlayerProfile): List - - fun getNumParcels(user: PlayerProfile): Int = getOwnedParcels(user).size - - - fun setParcelData(parcel: ParcelId, data: ParcelDataHolder?) - - fun setParcelOwner(parcel: ParcelId, owner: PlayerProfile?) - - fun setParcelOwnerSignOutdated(parcel: ParcelId, outdated: Boolean) - - fun setLocalPrivilege(parcel: ParcelId, player: PlayerProfile, privilege: Privilege) - - fun setParcelOptionsInteractConfig(parcel: ParcelId, config: InteractableConfiguration) - - - fun transmitAllGlobalPrivileges(channel: SendChannel>) - - fun readGlobalPrivileges(owner: PlayerProfile): PrivilegesHolder? - - fun setGlobalPrivilege(owner: PlayerProfile, player: PlayerProfile, privilege: Privilege) -} +package io.dico.parcels2.storage + +import io.dico.parcels2.* +import kotlinx.coroutines.Deferred +import kotlinx.coroutines.Job +import kotlinx.coroutines.channels.ReceiveChannel +import kotlinx.coroutines.channels.SendChannel +import org.joda.time.DateTime +import java.util.UUID +import kotlin.coroutines.CoroutineContext + +interface Backing { + + val name: String + + val isConnected: Boolean + + val coroutineContext: CoroutineContext + + fun launchJob(job: Backing.() -> Unit): Job + + fun launchFuture(future: Backing.() -> T): Deferred + + fun openChannel(future: Backing.(SendChannel) -> Unit): ReceiveChannel + + fun openChannelForWriting(future: Backing.(T) -> Unit): SendChannel + + + fun init() + + fun shutdown() + + + fun getWorldCreationTime(worldId: ParcelWorldId): DateTime? + + fun setWorldCreationTime(worldId: ParcelWorldId, time: DateTime) + + fun getPlayerUuidForName(name: String): UUID? + + fun updatePlayerName(uuid: UUID, name: String) + + fun transmitParcelData(channel: SendChannel, parcels: Sequence) + + fun transmitAllParcelData(channel: SendChannel) + + fun readParcelData(parcel: ParcelId): ParcelDataHolder? + + fun getOwnedParcels(user: PlayerProfile): List + + fun getNumParcels(user: PlayerProfile): Int = getOwnedParcels(user).size + + + fun setParcelData(parcel: ParcelId, data: ParcelDataHolder?) + + fun setParcelOwner(parcel: ParcelId, owner: PlayerProfile?) + + fun setParcelOwnerSignOutdated(parcel: ParcelId, outdated: Boolean) + + fun setLocalPrivilege(parcel: ParcelId, player: PlayerProfile, privilege: Privilege) + + fun setParcelOptionsInteractConfig(parcel: ParcelId, config: InteractableConfiguration) + + + fun transmitAllGlobalPrivileges(channel: SendChannel>) + + fun readGlobalPrivileges(owner: PlayerProfile): PrivilegesHolder? + + fun setGlobalPrivilege(owner: PlayerProfile, player: PlayerProfile, privilege: Privilege) +} -- cgit v1.2.3