Warning, /network/kdeconnect-android/src/org/kde/kdeconnect/UserInterface/About/AboutData.kt is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2021 Maxim Leshchenko <cnmaks90@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 package org.kde.kdeconnect.UserInterface.About
0008 
0009 import android.os.Parcel
0010 import android.os.Parcelable
0011 
0012 class AboutData(var name: String, var icon: Int, var versionName: String, var bugURL: String? = null,
0013                 var websiteURL: String? = null, var sourceCodeURL: String? = null, var donateURL: String? = null,
0014                 var authorsFooterText: Int? = null) : Parcelable {
0015     val authors: MutableList<AboutPerson> = mutableListOf()
0016 
0017     constructor(parcel: Parcel) : this(parcel.readString()!!, parcel.readInt(), parcel.readString()!!,
0018                                        parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(),
0019                                        if (parcel.readByte() == 0x01.toByte()) parcel.readInt() else null) {
0020         parcel.readList(authors as List<*>, AboutPerson::class.java.classLoader)
0021     }
0022 
0023     companion object CREATOR : Parcelable.Creator<AboutData> {
0024         override fun createFromParcel(parcel: Parcel): AboutData = AboutData(parcel)
0025         override fun newArray(size: Int): Array<AboutData?> = arrayOfNulls(size)
0026     }
0027 
0028     override fun writeToParcel(parcel: Parcel, flags: Int) {
0029         parcel.writeString(name)
0030         parcel.writeInt(icon)
0031         parcel.writeString(versionName)
0032         parcel.writeList(authors.toList())
0033 
0034         parcel.writeString(bugURL)
0035         parcel.writeString(websiteURL)
0036         parcel.writeString(sourceCodeURL)
0037         parcel.writeString(donateURL)
0038 
0039         authorsFooterText?.let {
0040             parcel.writeByte(0x01)
0041             parcel.writeInt(it)
0042         } ?: parcel.writeByte(0x00)
0043     }
0044 
0045     override fun describeContents(): Int = 0
0046 }