/*
* Nextcloud Android client application
*
* @author Alper Ozturk
* Copyright (C) 2024 Alper Ozturk
* Copyright (C) 2024 Nextcloud GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package com.nextcloud.test.model
import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize
import java.io.Serializable
@Parcelize
class OtherTestData : Parcelable
data class TestData(val message: String) : Serializable
data class TestDataParcelable(val message: String) : Parcelable {
constructor(parcel: Parcel) : this(parcel.readString() ?: "")
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeString(message)
}
override fun describeContents(): Int {
return 0
}
companion object CREATOR : Parcelable.Creator {
override fun createFromParcel(parcel: Parcel): TestDataParcelable {
return TestDataParcelable(parcel)
}
override fun newArray(size: Int): Array {
return arrayOfNulls(size)
}
}
}