-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Implement realm definition of clip items
- Loading branch information
1 parent
d0e0c98
commit 89db293
Showing
28 changed files
with
432 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,7 @@ enum class AppFileType { | |
LOG, | ||
ENCRYPT, | ||
DATA, | ||
IMAGE, | ||
VIDEO, | ||
FILE | ||
} |
4 changes: 2 additions & 2 deletions
4
composeApp/src/commonMain/kotlin/com/clipevery/clip/item/ClipFile.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package com.clipevery.clip.item | ||
|
||
import java.io.File | ||
import java.nio.file.Path | ||
|
||
interface ClipFile { | ||
|
||
fun getFile(): File | ||
fun getFilePath(): Path | ||
|
||
fun getExtension(): String | ||
} |
4 changes: 2 additions & 2 deletions
4
composeApp/src/commonMain/kotlin/com/clipevery/clip/item/ClipFiles.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package com.clipevery.clip.item | ||
|
||
import java.io.File | ||
import java.nio.file.Path | ||
|
||
interface ClipFiles { | ||
fun getFiles(): List<File> | ||
fun getFilePaths(): List<Path> | ||
} |
6 changes: 6 additions & 0 deletions
6
composeApp/src/commonMain/kotlin/com/clipevery/dao/clip/ClipDao.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.clipevery.dao.clip | ||
|
||
interface ClipDao { | ||
|
||
fun getMaxClipId(): Int | ||
} |
36 changes: 0 additions & 36 deletions
36
composeApp/src/commonMain/kotlin/com/clipevery/dao/clip/item/FilesClipItem.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,6 @@ interface OneFilePersist { | |
fun <T> save(config: T) | ||
|
||
fun saveBytes(bytes: ByteArray) | ||
|
||
fun delete(): Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
composeApp/src/desktopMain/kotlin/com/clipevery/clip/ClipCollector.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.clipevery.clip | ||
|
||
import com.clipevery.app.AppInfo | ||
import com.clipevery.dao.clip.ClipDao | ||
|
||
class ClipCollector( | ||
appInfo: AppInfo, | ||
clipDao: ClipDao, | ||
singleClipPlugins: List<SingleClipPlugin>, | ||
multiClipPlugins: List<MultiClipPlugin> | ||
) { | ||
fun needCollectionItem(): Boolean { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
fun completeCollect() { | ||
TODO("Not yet implemented") | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
composeApp/src/desktopMain/kotlin/com/clipevery/clip/ClipItemService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.clipevery.clip | ||
|
||
import java.awt.datatransfer.Transferable | ||
|
||
interface ClipItemService { | ||
|
||
fun getIdentifiers(): List<String> | ||
|
||
fun createClipItem( | ||
clipId: Int, | ||
itemIndex: Int, | ||
hpn: String?, | ||
transferable: Transferable, | ||
clipCollector: ClipCollector | ||
) | ||
|
||
// fun createPreClipItem(clipId: Int, itemIndex: Int, identifier: String, itemProvider: DataFlavor, clipCollector: ClipCollector) | ||
} |
16 changes: 16 additions & 0 deletions
16
composeApp/src/desktopMain/kotlin/com/clipevery/clip/ClipPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.clipevery.clip | ||
|
||
import com.clipevery.dao.clip.ClipAppearItem | ||
import kotlin.reflect.KClass | ||
|
||
interface SingleClipPlugin { | ||
|
||
fun pluginProcess(clipAppearItems: Map<KClass<ClipItemService>, ClipAppearItem>): Map<KClass<ClipItemService>, ClipAppearItem> | ||
|
||
} | ||
|
||
interface MultiClipPlugin { | ||
|
||
fun pluginProcess(clipAppearItems: List<ClipAppearItem>): List<ClipAppearItem> | ||
|
||
} |
Oops, something went wrong.