Migrate signaling settings

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-05-17 22:27:13 +02:00
parent 66088a48ec
commit 0bcc219d48
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
9 changed files with 165 additions and 400 deletions

View File

@ -4,7 +4,7 @@
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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

View File

@ -1,129 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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.nextcloud.talk.models.json.signaling.settings;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import java.util.List;
@JsonObject
public class IceServer {
@Deprecated
@JsonField(name = "url")
String url;
@JsonField(name = "urls")
List<String> urls;
@JsonField(name = "username")
String username;
@JsonField(name = "credential")
String credential;
@Deprecated
public String getUrl() {
return this.url;
}
public List<String> getUrls() {
return this.urls;
}
public String getUsername() {
return this.username;
}
public String getCredential() {
return this.credential;
}
public void setUrl(String url) {
this.url = url;
}
public void setUrls(List<String> urls) {
this.urls = urls;
}
public void setUsername(String username) {
this.username = username;
}
public void setCredential(String credential) {
this.credential = credential;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof IceServer)) {
return false;
}
final IceServer other = (IceServer) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$url = this.getUrl();
final Object other$url = other.getUrl();
if (this$url == null ? other$url != null : !this$url.equals(other$url)) {
return false;
}
final Object this$urls = this.getUrls();
final Object other$urls = other.getUrls();
if (this$urls == null ? other$urls != null : !this$urls.equals(other$urls)) {
return false;
}
final Object this$username = this.getUsername();
final Object other$username = other.getUsername();
if (this$username == null ? other$username != null : !this$username.equals(other$username)) {
return false;
}
final Object this$credential = this.getCredential();
final Object other$credential = other.getCredential();
return this$credential == null ? other$credential == null : this$credential.equals(other$credential);
}
protected boolean canEqual(final Object other) {
return other instanceof IceServer;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $url = this.getUrl();
result = result * PRIME + ($url == null ? 43 : $url.hashCode());
final Object $urls = this.getUrls();
result = result * PRIME + ($urls == null ? 43 : $urls.hashCode());
final Object $username = this.getUsername();
result = result * PRIME + ($username == null ? 43 : $username.hashCode());
final Object $credential = this.getCredential();
result = result * PRIME + ($credential == null ? 43 : $credential.hashCode());
return result;
}
public String toString() {
return "IceServer(url=" + this.getUrl() + ", urls=" + this.getUrls() + ", username=" + this.getUsername() + ", credential=" + this.getCredential() + ")";
}
}

View File

@ -0,0 +1,44 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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.nextcloud.talk.models.json.signaling.settings
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class IceServer(
@Deprecated("")
@JsonField(name = ["url"])
var url: String? = null,
@JsonField(name = ["urls"])
var urls: List<String>? = null,
@JsonField(name = ["username"])
var username: String? = null,
@JsonField(name = ["credential"])
var credential: String? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null, null)
}

View File

@ -1,127 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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.nextcloud.talk.models.json.signaling.settings;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import java.util.List;
@JsonObject
public class Settings {
@JsonField(name = "stunservers")
List<IceServer> stunServers;
@JsonField(name = "turnservers")
List<IceServer> turnServers;
@JsonField(name = "server")
String externalSignalingServer;
@JsonField(name = "ticket")
String externalSignalingTicket;
public List<IceServer> getStunServers() {
return this.stunServers;
}
public List<IceServer> getTurnServers() {
return this.turnServers;
}
public String getExternalSignalingServer() {
return this.externalSignalingServer;
}
public String getExternalSignalingTicket() {
return this.externalSignalingTicket;
}
public void setStunServers(List<IceServer> stunServers) {
this.stunServers = stunServers;
}
public void setTurnServers(List<IceServer> turnServers) {
this.turnServers = turnServers;
}
public void setExternalSignalingServer(String externalSignalingServer) {
this.externalSignalingServer = externalSignalingServer;
}
public void setExternalSignalingTicket(String externalSignalingTicket) {
this.externalSignalingTicket = externalSignalingTicket;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof Settings)) {
return false;
}
final Settings other = (Settings) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$stunServers = this.getStunServers();
final Object other$stunServers = other.getStunServers();
if (this$stunServers == null ? other$stunServers != null : !this$stunServers.equals(other$stunServers)) {
return false;
}
final Object this$turnServers = this.getTurnServers();
final Object other$turnServers = other.getTurnServers();
if (this$turnServers == null ? other$turnServers != null : !this$turnServers.equals(other$turnServers)) {
return false;
}
final Object this$externalSignalingServer = this.getExternalSignalingServer();
final Object other$externalSignalingServer = other.getExternalSignalingServer();
if (this$externalSignalingServer == null ? other$externalSignalingServer != null : !this$externalSignalingServer.equals(other$externalSignalingServer)) {
return false;
}
final Object this$externalSignalingTicket = this.getExternalSignalingTicket();
final Object other$externalSignalingTicket = other.getExternalSignalingTicket();
return this$externalSignalingTicket == null ? other$externalSignalingTicket == null : this$externalSignalingTicket.equals(other$externalSignalingTicket);
}
protected boolean canEqual(final Object other) {
return other instanceof Settings;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $stunServers = this.getStunServers();
result = result * PRIME + ($stunServers == null ? 43 : $stunServers.hashCode());
final Object $turnServers = this.getTurnServers();
result = result * PRIME + ($turnServers == null ? 43 : $turnServers.hashCode());
final Object $externalSignalingServer = this.getExternalSignalingServer();
result = result * PRIME + ($externalSignalingServer == null ? 43 : $externalSignalingServer.hashCode());
final Object $externalSignalingTicket = this.getExternalSignalingTicket();
result = result * PRIME + ($externalSignalingTicket == null ? 43 : $externalSignalingTicket.hashCode());
return result;
}
public String toString() {
return "Settings(stunServers=" + this.getStunServers() + ", turnServers=" + this.getTurnServers() + ", externalSignalingServer=" + this.getExternalSignalingServer() + ", externalSignalingTicket=" + this.getExternalSignalingTicket() + ")";
}
}

View File

@ -0,0 +1,43 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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.nextcloud.talk.models.json.signaling.settings
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class Settings(
@JsonField(name = ["stunservers"])
var stunServers: List<IceServer>? = null,
@JsonField(name = ["turnservers"])
var turnServers: List<IceServer>? = null,
@JsonField(name = ["server"])
var externalSignalingServer: String? = null,
@JsonField(name = ["ticket"])
var externalSignalingTicket: String? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null, null)
}

View File

@ -1,72 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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.nextcloud.talk.models.json.signaling.settings;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import com.nextcloud.talk.models.json.generic.GenericOCS;
@JsonObject
public class SignalingSettingsOcs extends GenericOCS {
@JsonField(name = "data")
Settings settings;
public Settings getSettings() {
return this.settings;
}
public void setSettings(Settings settings) {
this.settings = settings;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SignalingSettingsOcs)) {
return false;
}
final SignalingSettingsOcs other = (SignalingSettingsOcs) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$settings = this.getSettings();
final Object other$settings = other.getSettings();
return this$settings == null ? other$settings == null : this$settings.equals(other$settings);
}
protected boolean canEqual(final Object other) {
return other instanceof SignalingSettingsOcs;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $settings = this.getSettings();
result = result * PRIME + ($settings == null ? 43 : $settings.hashCode());
return result;
}
public String toString() {
return "SignalingSettingsOcs(settings=" + this.getSettings() + ")";
}
}

View File

@ -0,0 +1,40 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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.nextcloud.talk.models.json.signaling.settings
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class SignalingSettingsOcs(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var settings: Settings? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null)
}

View File

@ -1,71 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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.nextcloud.talk.models.json.signaling.settings;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
@JsonObject
public class SignalingSettingsOverall {
@JsonField(name = "ocs")
SignalingSettingsOcs ocs;
public SignalingSettingsOcs getOcs() {
return this.ocs;
}
public void setOcs(SignalingSettingsOcs ocs) {
this.ocs = ocs;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SignalingSettingsOverall)) {
return false;
}
final SignalingSettingsOverall other = (SignalingSettingsOverall) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$ocs = this.getOcs();
final Object other$ocs = other.getOcs();
return this$ocs == null ? other$ocs == null : this$ocs.equals(other$ocs);
}
protected boolean canEqual(final Object other) {
return other instanceof SignalingSettingsOverall;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $ocs = this.getOcs();
result = result * PRIME + ($ocs == null ? 43 : $ocs.hashCode());
return result;
}
public String toString() {
return "SignalingSettingsOverall(ocs=" + this.getOcs() + ")";
}
}

View File

@ -0,0 +1,37 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* 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.nextcloud.talk.models.json.signaling.settings
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class SignalingSettingsOverall(
@JsonField(name = ["ocs"])
var ocs: SignalingSettingsOcs? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}