-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
...mmonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/Container.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,40 @@ | ||
/* | ||
* Infomaniak SwissTransfer - Multiplatform | ||
* Copyright (C) 2024 Infomaniak Network SA | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.infomaniak.multiplatform_swisstransfer.common.interfaces | ||
|
||
interface Container<F : List<File>> { | ||
var uuid: String | ||
var duration: Long | ||
var createdDateTimestamp: Long | ||
var expiredDateTimestamp: Long | ||
var numberOfFile: Long | ||
var message: String? | ||
var needPassword: Long | ||
var lang: String | ||
var sizeUploaded: Long | ||
var deletedDateTimestamp: Long? | ||
var swiftVersion: Long | ||
var downloadLimit: Long | ||
var source: String | ||
|
||
// @SerialName("WSUser") TODO: What's it ? | ||
//val wsUser: JsonElement? | ||
|
||
var files: F | ||
} |
34 changes: 34 additions & 0 deletions
34
...rc/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/File.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,34 @@ | ||
/* | ||
* Infomaniak SwissTransfer - Multiplatform | ||
* Copyright (C) 2024 Infomaniak Network SA | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.infomaniak.multiplatform_swisstransfer.common.interfaces | ||
|
||
interface File { | ||
var containerUUID: String | ||
var uuid: String | ||
var fileName: String | ||
var fileSizeInBytes: Long | ||
var downloadCounter: Long | ||
var createdDateTimestamp: Long | ||
var expiredDateTimestamp: Long | ||
var eVirus: String | ||
var deletedDate: String? | ||
var mimeType: String | ||
var receivedSizeInBytes: Long | ||
var path: String? | ||
} |
31 changes: 31 additions & 0 deletions
31
...ommonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/Transfer.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,31 @@ | ||
/* | ||
* Infomaniak SwissTransfer - Multiplatform | ||
* Copyright (C) 2024 Infomaniak Network SA | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.infomaniak.multiplatform_swisstransfer.common.interfaces | ||
|
||
interface Transfer<ContainerType> { | ||
var linkUUID: String | ||
var containerUUID: String | ||
var downloadCounterCredit: Long | ||
var createdDateTimestamp: Long | ||
var expiredDateTimestamp: Long | ||
var isDownloadOnetime: Long | ||
var isMailSent: Boolean | ||
var downloadHost: String | ||
var container: ContainerType | ||
} |
30 changes: 30 additions & 0 deletions
30
...infomaniak/multiplatform_swisstransfer/common/interfaces/upload/UploadCompleteResponse.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,30 @@ | ||
/* | ||
* Infomaniak SwissTransfer - Multiplatform | ||
* Copyright (C) 2024 Infomaniak Network SA | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.infomaniak.multiplatform_swisstransfer.common.interfaces.upload | ||
|
||
interface UploadCompleteResponse { | ||
var linkUUID: String | ||
var containerUUID: String | ||
var userEmail: String? | ||
var downloadCounterCredit: Long | ||
var createdDateTimestamp: Long | ||
var expiredDateTimestamp: Long | ||
var isDownloadOnetime: Boolean | ||
var isMailSent: Boolean | ||
} |
36 changes: 36 additions & 0 deletions
36
...in/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/UploadContainer.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,36 @@ | ||
/* | ||
* Infomaniak SwissTransfer - Multiplatform | ||
* Copyright (C) 2024 Infomaniak Network SA | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.infomaniak.multiplatform_swisstransfer.common.interfaces.upload | ||
|
||
interface UploadContainer { | ||
val uuid: String | ||
val duration: String | ||
val downloadLimit: Long | ||
val lang: String | ||
val source: String | ||
val wsUser: String? | ||
val authorIP: String | ||
val swiftVersion: String | ||
|
||
// val createdDate: Object TODO: (Date) Waiting or deserialize this complex date object to timestamp | ||
val expiredDateTimestamp: Long | ||
val needPassword: Boolean | ||
val message: String | ||
val numberOfFile: Long | ||
} |
25 changes: 25 additions & 0 deletions
25
...nfomaniak/multiplatform_swisstransfer/common/interfaces/upload/UploadContainerResponse.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,25 @@ | ||
/* | ||
* Infomaniak SwissTransfer - Multiplatform | ||
* Copyright (C) 2024 Infomaniak Network SA | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.infomaniak.multiplatform_swisstransfer.common.interfaces.upload | ||
|
||
interface UploadContainerResponse<C : UploadContainer> { | ||
var container: C | ||
var uploadHost: String | ||
var filesUUID: List<String> | ||
} |