Domain
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.dagger.hilt)
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
@@ -35,10 +34,6 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Hilt
|
||||
implementation(libs.dagger.hilt)
|
||||
ksp(libs.dagger.hilt.compiler)
|
||||
|
||||
// Room
|
||||
implementation(libs.room.ktx)
|
||||
implementation(libs.room.runtime)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.github.nullptroma.wallenc.data
|
||||
|
||||
import com.github.nullptroma.wallenc.domain.models.IMetaInfo
|
||||
import java.net.URI
|
||||
import java.time.LocalDateTime
|
||||
|
||||
class TestImpl : IMetaInfo {
|
||||
override val name: String
|
||||
get() = "Hello225"
|
||||
override val size: Int
|
||||
get() = 10
|
||||
override val isDeleted: Boolean
|
||||
get() = true
|
||||
override val isHidden: Boolean
|
||||
get() = true
|
||||
override val lastModified: LocalDateTime
|
||||
get() = TODO("Not yet implemented")
|
||||
override val path: URI
|
||||
get() = URI("/Hello/path")
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.github.nullptroma.wallenc.data.di
|
||||
|
||||
import com.github.nullptroma.wallenc.data.TestImpl
|
||||
import com.github.nullptroma.wallenc.domain.models.IMetaInfo
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
class SingletonModule {
|
||||
|
||||
@Provides
|
||||
fun provideIMeta() : IMetaInfo {
|
||||
return TestImpl()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.github.nullptroma.wallenc.data.vaults
|
||||
|
||||
import android.content.Context
|
||||
import com.github.nullptroma.wallenc.domain.datatypes.EncryptKey
|
||||
import com.github.nullptroma.wallenc.domain.enums.VaultType
|
||||
import com.github.nullptroma.wallenc.domain.models.IStorage
|
||||
import com.github.nullptroma.wallenc.domain.models.IVault
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.util.UUID
|
||||
|
||||
class LocalVault(private val ioDispatcher: CoroutineDispatcher, context: Context) : IVault {
|
||||
init {
|
||||
CoroutineScope(ioDispatcher).launch {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun createStorage(name: String): IStorage = withContext(ioDispatcher) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun createStorage(
|
||||
name: String,
|
||||
key: EncryptKey
|
||||
): IStorage = withContext(ioDispatcher) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun createStorage(
|
||||
name: String,
|
||||
key: EncryptKey,
|
||||
uuid: UUID
|
||||
): IStorage = withContext(ioDispatcher) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun remove(storage: IStorage) = withContext(ioDispatcher) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override val type: VaultType = VaultType.LOCAL
|
||||
override val uuid: UUID
|
||||
get() = TODO("Not yet implemented")
|
||||
override val storages: StateFlow<List<IStorage>>
|
||||
get() = TODO("Not yet implemented")
|
||||
override val isAvailable: StateFlow<Boolean>
|
||||
get() = TODO("Not yet implemented")
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.github.nullptroma.wallenc.data.vaults
|
||||
|
||||
class VaultsManager {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user