diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 531d00c0d..59163c1e4 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -59,6 +59,15 @@
+
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ActorWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ActorWebSocketMessage.java
deleted file mode 100644
index 1cc2e0678..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ActorWebSocketMessage.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class ActorWebSocketMessage {
- @JsonField(name = "type")
- String type;
-
- @JsonField(name = "sessionid")
- String sessionId;
-
- @JsonField(name = "userid")
- String userid;
-
- public String getType() {
- return this.type;
- }
-
- public String getSessionId() {
- return this.sessionId;
- }
-
- public String getUserid() {
- return this.userid;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public void setSessionId(String sessionId) {
- this.sessionId = sessionId;
- }
-
- public void setUserid(String userid) {
- this.userid = userid;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof ActorWebSocketMessage)) {
- return false;
- }
- final ActorWebSocketMessage other = (ActorWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$type = this.getType();
- final Object other$type = other.getType();
- if (this$type == null ? other$type != null : !this$type.equals(other$type)) {
- return false;
- }
- final Object this$sessionId = this.getSessionId();
- final Object other$sessionId = other.getSessionId();
- if (this$sessionId == null ? other$sessionId != null : !this$sessionId.equals(other$sessionId)) {
- return false;
- }
- final Object this$userid = this.getUserid();
- final Object other$userid = other.getUserid();
-
- return this$userid == null ? other$userid == null : this$userid.equals(other$userid);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof ActorWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $type = this.getType();
- result = result * PRIME + ($type == null ? 43 : $type.hashCode());
- final Object $sessionId = this.getSessionId();
- result = result * PRIME + ($sessionId == null ? 43 : $sessionId.hashCode());
- final Object $userid = this.getUserid();
- result = result * PRIME + ($userid == null ? 43 : $userid.hashCode());
- return result;
- }
-
- public String toString() {
- return "ActorWebSocketMessage(type=" + this.getType() + ", sessionId=" + this.getSessionId() + ", userid=" + this.getUserid() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ActorWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ActorWebSocketMessage.kt
new file mode 100644
index 000000000..0542ed9f5
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ActorWebSocketMessage.kt
@@ -0,0 +1,41 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 ActorWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["sessionid"])
+ var sessionId: String? = null,
+ @JsonField(name = ["userid"])
+ var userid: String? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthParametersWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthParametersWebSocketMessage.java
deleted file mode 100644
index b4366ce48..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthParametersWebSocketMessage.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class AuthParametersWebSocketMessage {
- @JsonField(name = "userid")
- String userid;
-
- @JsonField(name = "ticket")
- String ticket;
-
- public String getUserid() {
- return this.userid;
- }
-
- public String getTicket() {
- return this.ticket;
- }
-
- public void setUserid(String userid) {
- this.userid = userid;
- }
-
- public void setTicket(String ticket) {
- this.ticket = ticket;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof AuthParametersWebSocketMessage)) {
- return false;
- }
- final AuthParametersWebSocketMessage other = (AuthParametersWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$userid = this.getUserid();
- final Object other$userid = other.getUserid();
- if (this$userid == null ? other$userid != null : !this$userid.equals(other$userid)) {
- return false;
- }
- final Object this$ticket = this.getTicket();
- final Object other$ticket = other.getTicket();
-
- return this$ticket == null ? other$ticket == null : this$ticket.equals(other$ticket);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof AuthParametersWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $userid = this.getUserid();
- result = result * PRIME + ($userid == null ? 43 : $userid.hashCode());
- final Object $ticket = this.getTicket();
- result = result * PRIME + ($ticket == null ? 43 : $ticket.hashCode());
- return result;
- }
-
- public String toString() {
- return "AuthParametersWebSocketMessage(userid=" + this.getUserid() + ", ticket=" + this.getTicket() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthParametersWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthParametersWebSocketMessage.kt
new file mode 100644
index 000000000..7afa0b6a6
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthParametersWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+import android.os.Parcelable
+import com.bluelinelabs.logansquare.annotation.JsonField
+import com.bluelinelabs.logansquare.annotation.JsonObject
+import kotlinx.android.parcel.Parcelize
+
+@Parcelize
+@JsonObject
+class AuthParametersWebSocketMessage(
+ @JsonField(name = ["userid"])
+ var userid: String? = null,
+ @JsonField(name = ["ticket"])
+ var ticket: String? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthWebSocketMessage.java
deleted file mode 100644
index 2c08101fd..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthWebSocketMessage.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class AuthWebSocketMessage {
- @JsonField(name = "url")
- String url;
-
- @JsonField(name = "params")
- AuthParametersWebSocketMessage authParametersWebSocketMessage;
-
- public String getUrl() {
- return this.url;
- }
-
- public AuthParametersWebSocketMessage getAuthParametersWebSocketMessage() {
- return this.authParametersWebSocketMessage;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public void setAuthParametersWebSocketMessage(AuthParametersWebSocketMessage authParametersWebSocketMessage) {
- this.authParametersWebSocketMessage = authParametersWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof AuthWebSocketMessage)) {
- return false;
- }
- final AuthWebSocketMessage other = (AuthWebSocketMessage) 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$authParametersWebSocketMessage = this.getAuthParametersWebSocketMessage();
- final Object other$authParametersWebSocketMessage = other.getAuthParametersWebSocketMessage();
-
- return this$authParametersWebSocketMessage == null ? other$authParametersWebSocketMessage == null : this$authParametersWebSocketMessage.equals(other$authParametersWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof AuthWebSocketMessage;
- }
-
- 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 $authParametersWebSocketMessage = this.getAuthParametersWebSocketMessage();
- result = result * PRIME + ($authParametersWebSocketMessage == null ? 43 : $authParametersWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "AuthWebSocketMessage(url=" + this.getUrl() + ", authParametersWebSocketMessage=" + this.getAuthParametersWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthWebSocketMessage.kt
new file mode 100644
index 000000000..a9fe8e2be
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/AuthWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 AuthWebSocketMessage(
+ @JsonField(name = ["url"])
+ var url: String? = null,
+ @JsonField(name = ["params"])
+ var authParametersWebSocketMessage: AuthParametersWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/BaseWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/BaseWebSocketMessage.java
deleted file mode 100644
index 66ba83a9e..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/BaseWebSocketMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class BaseWebSocketMessage {
- @JsonField(name = "type")
- String type;
-
- public String getType() {
- return this.type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof BaseWebSocketMessage)) {
- return false;
- }
- final BaseWebSocketMessage other = (BaseWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$type = this.getType();
- final Object other$type = other.getType();
-
- return this$type == null ? other$type == null : this$type.equals(other$type);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof BaseWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $type = this.getType();
- result = result * PRIME + ($type == null ? 43 : $type.hashCode());
- return result;
- }
-
- public String toString() {
- return "BaseWebSocketMessage(type=" + this.getType() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/BaseWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/BaseWebSocketMessage.kt
new file mode 100644
index 000000000..9bef196e8
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/BaseWebSocketMessage.kt
@@ -0,0 +1,37 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 BaseWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ByeWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ByeWebSocketMessage.java
deleted file mode 100644
index a1b6c2e59..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ByeWebSocketMessage.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-import java.util.HashMap;
-
-@JsonObject
-@Parcel
-public class ByeWebSocketMessage extends BaseWebSocketMessage {
- @JsonField(name = "bye")
- HashMap bye;
-
- public HashMap getBye() {
- return this.bye;
- }
-
- public void setBye(HashMap bye) {
- this.bye = bye;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof ByeWebSocketMessage)) {
- return false;
- }
- final ByeWebSocketMessage other = (ByeWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$bye = this.getBye();
- final Object other$bye = other.getBye();
-
- return this$bye == null ? other$bye == null : this$bye.equals(other$bye);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof ByeWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $bye = this.getBye();
- result = result * PRIME + ($bye == null ? 43 : $bye.hashCode());
- return result;
- }
-
- public String toString() {
- return "ByeWebSocketMessage(bye=" + this.getBye() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ByeWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ByeWebSocketMessage.kt
new file mode 100644
index 000000000..b450700e2
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ByeWebSocketMessage.kt
@@ -0,0 +1,43 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+import android.os.Parcelable
+import com.bluelinelabs.logansquare.annotation.JsonField
+import com.bluelinelabs.logansquare.annotation.JsonObject
+import com.nextcloud.talk.models.json.AnyParceler
+import kotlinx.android.parcel.Parcelize
+import kotlinx.android.parcel.TypeParceler
+import java.util.HashMap
+
+@Parcelize
+@JsonObject
+@TypeParceler
+data class ByeWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["bye"])
+ var bye: HashMap? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallOverallWebSocketMessage.java
deleted file mode 100644
index 064daa45a..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallOverallWebSocketMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class CallOverallWebSocketMessage extends BaseWebSocketMessage {
- @JsonField(name = "message")
- CallWebSocketMessage callWebSocketMessage;
-
- public CallWebSocketMessage getCallWebSocketMessage() {
- return this.callWebSocketMessage;
- }
-
- public void setCallWebSocketMessage(CallWebSocketMessage callWebSocketMessage) {
- this.callWebSocketMessage = callWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof CallOverallWebSocketMessage)) {
- return false;
- }
- final CallOverallWebSocketMessage other = (CallOverallWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$callWebSocketMessage = this.getCallWebSocketMessage();
- final Object other$callWebSocketMessage = other.getCallWebSocketMessage();
-
- return this$callWebSocketMessage == null ? other$callWebSocketMessage == null : this$callWebSocketMessage.equals(other$callWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof CallOverallWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $callWebSocketMessage = this.getCallWebSocketMessage();
- result = result * PRIME + ($callWebSocketMessage == null ? 43 : $callWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "CallOverallWebSocketMessage(callWebSocketMessage=" + this.getCallWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallOverallWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallOverallWebSocketMessage.kt
new file mode 100644
index 000000000..4137b6d2c
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallOverallWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 CallOverallWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["message"])
+ var callWebSocketMessage: CallWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallWebSocketMessage.java
deleted file mode 100644
index 6b3b59099..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallWebSocketMessage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-import com.nextcloud.talk.models.json.signaling.NCSignalingMessage;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class CallWebSocketMessage {
- @JsonField(name = "recipient")
- ActorWebSocketMessage recipientWebSocketMessage;
-
- @JsonField(name = "sender")
- ActorWebSocketMessage senderWebSocketMessage;
-
- @JsonField(name = "data")
- NCSignalingMessage ncSignalingMessage;
-
- public ActorWebSocketMessage getRecipientWebSocketMessage() {
- return this.recipientWebSocketMessage;
- }
-
- public ActorWebSocketMessage getSenderWebSocketMessage() {
- return this.senderWebSocketMessage;
- }
-
- public NCSignalingMessage getNcSignalingMessage() {
- return this.ncSignalingMessage;
- }
-
- public void setRecipientWebSocketMessage(ActorWebSocketMessage recipientWebSocketMessage) {
- this.recipientWebSocketMessage = recipientWebSocketMessage;
- }
-
- public void setSenderWebSocketMessage(ActorWebSocketMessage senderWebSocketMessage) {
- this.senderWebSocketMessage = senderWebSocketMessage;
- }
-
- public void setNcSignalingMessage(NCSignalingMessage ncSignalingMessage) {
- this.ncSignalingMessage = ncSignalingMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof CallWebSocketMessage)) {
- return false;
- }
- final CallWebSocketMessage other = (CallWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$recipientWebSocketMessage = this.getRecipientWebSocketMessage();
- final Object other$recipientWebSocketMessage = other.getRecipientWebSocketMessage();
- if (this$recipientWebSocketMessage == null ? other$recipientWebSocketMessage != null : !this$recipientWebSocketMessage.equals(other$recipientWebSocketMessage)) {
- return false;
- }
- final Object this$senderWebSocketMessage = this.getSenderWebSocketMessage();
- final Object other$senderWebSocketMessage = other.getSenderWebSocketMessage();
- if (this$senderWebSocketMessage == null ? other$senderWebSocketMessage != null : !this$senderWebSocketMessage.equals(other$senderWebSocketMessage)) {
- return false;
- }
- final Object this$ncSignalingMessage = this.getNcSignalingMessage();
- final Object other$ncSignalingMessage = other.getNcSignalingMessage();
-
- return this$ncSignalingMessage == null ? other$ncSignalingMessage == null : this$ncSignalingMessage.equals(other$ncSignalingMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof CallWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $recipientWebSocketMessage = this.getRecipientWebSocketMessage();
- result = result * PRIME + ($recipientWebSocketMessage == null ? 43 : $recipientWebSocketMessage.hashCode());
- final Object $senderWebSocketMessage = this.getSenderWebSocketMessage();
- result = result * PRIME + ($senderWebSocketMessage == null ? 43 : $senderWebSocketMessage.hashCode());
- final Object $ncSignalingMessage = this.getNcSignalingMessage();
- result = result * PRIME + ($ncSignalingMessage == null ? 43 : $ncSignalingMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "CallWebSocketMessage(recipientWebSocketMessage=" + this.getRecipientWebSocketMessage() + ", senderWebSocketMessage=" + this.getSenderWebSocketMessage() + ", ncSignalingMessage=" + this.getNcSignalingMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallWebSocketMessage.kt
new file mode 100644
index 000000000..1bd855c43
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/CallWebSocketMessage.kt
@@ -0,0 +1,42 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+import android.os.Parcelable
+import com.bluelinelabs.logansquare.annotation.JsonField
+import com.bluelinelabs.logansquare.annotation.JsonObject
+import com.nextcloud.talk.models.json.signaling.NCSignalingMessage
+import kotlinx.android.parcel.Parcelize
+
+@Parcelize
+@JsonObject
+data class CallWebSocketMessage(
+ @JsonField(name = ["recipient"])
+ var recipientWebSocketMessage: ActorWebSocketMessage? = null,
+ @JsonField(name = ["sender"])
+ var senderWebSocketMessage: ActorWebSocketMessage? = null,
+ @JsonField(name = ["data"])
+ var ncSignalingMessage: NCSignalingMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorOverallWebSocketMessage.java
deleted file mode 100644
index 94b37056c..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorOverallWebSocketMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@Parcel
-@JsonObject
-public class ErrorOverallWebSocketMessage extends BaseWebSocketMessage {
- @JsonField(name = "error")
- ErrorWebSocketMessage errorWebSocketMessage;
-
- public ErrorWebSocketMessage getErrorWebSocketMessage() {
- return this.errorWebSocketMessage;
- }
-
- public void setErrorWebSocketMessage(ErrorWebSocketMessage errorWebSocketMessage) {
- this.errorWebSocketMessage = errorWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof ErrorOverallWebSocketMessage)) {
- return false;
- }
- final ErrorOverallWebSocketMessage other = (ErrorOverallWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$errorWebSocketMessage = this.getErrorWebSocketMessage();
- final Object other$errorWebSocketMessage = other.getErrorWebSocketMessage();
-
- return this$errorWebSocketMessage == null ? other$errorWebSocketMessage == null : this$errorWebSocketMessage.equals(other$errorWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof ErrorOverallWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $errorWebSocketMessage = this.getErrorWebSocketMessage();
- result = result * PRIME + ($errorWebSocketMessage == null ? 43 : $errorWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "ErrorOverallWebSocketMessage(errorWebSocketMessage=" + this.getErrorWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorOverallWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorOverallWebSocketMessage.kt
new file mode 100644
index 000000000..a3110d8ca
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorOverallWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 ErrorOverallWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["error"])
+ var errorWebSocketMessage: ErrorWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorWebSocketMessage.java
deleted file mode 100644
index 3b1c829aa..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorWebSocketMessage.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@Parcel
-@JsonObject
-public class ErrorWebSocketMessage {
- @JsonField(name = "code")
- String code;
-
- @JsonField(name = "message")
- String message;
-
- public String getCode() {
- return this.code;
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public void setCode(String code) {
- this.code = code;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof ErrorWebSocketMessage)) {
- return false;
- }
- final ErrorWebSocketMessage other = (ErrorWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$code = this.getCode();
- final Object other$code = other.getCode();
- if (this$code == null ? other$code != null : !this$code.equals(other$code)) {
- return false;
- }
- final Object this$message = this.getMessage();
- final Object other$message = other.getMessage();
-
- return this$message == null ? other$message == null : this$message.equals(other$message);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof ErrorWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $code = this.getCode();
- result = result * PRIME + ($code == null ? 43 : $code.hashCode());
- final Object $message = this.getMessage();
- result = result * PRIME + ($message == null ? 43 : $message.hashCode());
- return result;
- }
-
- public String toString() {
- return "ErrorWebSocketMessage(code=" + this.getCode() + ", message=" + this.getMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorWebSocketMessage.kt
new file mode 100644
index 000000000..3d2a33c5b
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ErrorWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 ErrorWebSocketMessage(
+ @JsonField(name = ["code"])
+ var code: String? = null,
+ @JsonField(name = ["message"])
+ var message: String? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/EventOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/EventOverallWebSocketMessage.java
index d9424ee43..83520bb0f 100644
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/EventOverallWebSocketMessage.java
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/EventOverallWebSocketMessage.java
@@ -2,6 +2,8 @@
* Nextcloud Talk application
*
* @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
* Copyright (C) 2017-2018 Mario Danic
*
* This program is free software: you can redistribute it and/or modify
@@ -29,7 +31,7 @@ import java.util.HashMap;
@Parcel
@JsonObject
-public class EventOverallWebSocketMessage extends BaseWebSocketMessage {
+public class EventOverallWebSocketMessage {
@JsonField(name = "type")
String type;
@JsonField(name = "event")
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloOverallWebSocketMessage.java
deleted file mode 100644
index 51d56e856..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloOverallWebSocketMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class HelloOverallWebSocketMessage extends BaseWebSocketMessage {
- @JsonField(name = "hello")
- HelloWebSocketMessage helloWebSocketMessage;
-
- public HelloWebSocketMessage getHelloWebSocketMessage() {
- return this.helloWebSocketMessage;
- }
-
- public void setHelloWebSocketMessage(HelloWebSocketMessage helloWebSocketMessage) {
- this.helloWebSocketMessage = helloWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof HelloOverallWebSocketMessage)) {
- return false;
- }
- final HelloOverallWebSocketMessage other = (HelloOverallWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$helloWebSocketMessage = this.getHelloWebSocketMessage();
- final Object other$helloWebSocketMessage = other.getHelloWebSocketMessage();
-
- return this$helloWebSocketMessage == null ? other$helloWebSocketMessage == null : this$helloWebSocketMessage.equals(other$helloWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof HelloOverallWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $helloWebSocketMessage = this.getHelloWebSocketMessage();
- result = result * PRIME + ($helloWebSocketMessage == null ? 43 : $helloWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "HelloOverallWebSocketMessage(helloWebSocketMessage=" + this.getHelloWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloOverallWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloOverallWebSocketMessage.kt
new file mode 100644
index 000000000..0da623ceb
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloOverallWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 HelloOverallWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["hello"])
+ var helloWebSocketMessage: HelloWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseOverallWebSocketMessage.java
deleted file mode 100644
index 589e7d432..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseOverallWebSocketMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class HelloResponseOverallWebSocketMessage extends BaseWebSocketMessage {
- @JsonField(name = "hello")
- HelloResponseWebSocketMessage helloResponseWebSocketMessage;
-
- public HelloResponseWebSocketMessage getHelloResponseWebSocketMessage() {
- return this.helloResponseWebSocketMessage;
- }
-
- public void setHelloResponseWebSocketMessage(HelloResponseWebSocketMessage helloResponseWebSocketMessage) {
- this.helloResponseWebSocketMessage = helloResponseWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof HelloResponseOverallWebSocketMessage)) {
- return false;
- }
- final HelloResponseOverallWebSocketMessage other = (HelloResponseOverallWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$helloResponseWebSocketMessage = this.getHelloResponseWebSocketMessage();
- final Object other$helloResponseWebSocketMessage = other.getHelloResponseWebSocketMessage();
-
- return this$helloResponseWebSocketMessage == null ? other$helloResponseWebSocketMessage == null : this$helloResponseWebSocketMessage.equals(other$helloResponseWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof HelloResponseOverallWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $helloResponseWebSocketMessage = this.getHelloResponseWebSocketMessage();
- result = result * PRIME + ($helloResponseWebSocketMessage == null ? 43 : $helloResponseWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "HelloResponseOverallWebSocketMessage(helloResponseWebSocketMessage=" + this.getHelloResponseWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseOverallWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseOverallWebSocketMessage.kt
new file mode 100644
index 000000000..c213190c1
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseOverallWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 HelloResponseOverallWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["hello"])
+ var helloResponseWebSocketMessage: HelloResponseWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseWebSocketMessage.java
deleted file mode 100644
index f31c7f1e5..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseWebSocketMessage.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class HelloResponseWebSocketMessage {
- @JsonField(name = "resumeid")
- String resumeId;
-
- @JsonField(name = "sessionid")
- String sessionId;
-
- @JsonField(name = "server")
- ServerHelloResponseFeaturesWebSocketMessage serverHelloResponseFeaturesWebSocketMessage;
-
- public boolean serverHasMCUSupport() {
- return serverHelloResponseFeaturesWebSocketMessage != null && serverHelloResponseFeaturesWebSocketMessage.getFeatures() != null
- && serverHelloResponseFeaturesWebSocketMessage.getFeatures().contains("mcu");
- }
-
- public String getResumeId() {
- return this.resumeId;
- }
-
- public String getSessionId() {
- return this.sessionId;
- }
-
- public ServerHelloResponseFeaturesWebSocketMessage getServerHelloResponseFeaturesWebSocketMessage() {
- return this.serverHelloResponseFeaturesWebSocketMessage;
- }
-
- public void setResumeId(String resumeId) {
- this.resumeId = resumeId;
- }
-
- public void setSessionId(String sessionId) {
- this.sessionId = sessionId;
- }
-
- public void setServerHelloResponseFeaturesWebSocketMessage(ServerHelloResponseFeaturesWebSocketMessage serverHelloResponseFeaturesWebSocketMessage) {
- this.serverHelloResponseFeaturesWebSocketMessage = serverHelloResponseFeaturesWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof HelloResponseWebSocketMessage)) {
- return false;
- }
- final HelloResponseWebSocketMessage other = (HelloResponseWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$resumeId = this.getResumeId();
- final Object other$resumeId = other.getResumeId();
- if (this$resumeId == null ? other$resumeId != null : !this$resumeId.equals(other$resumeId)) {
- return false;
- }
- final Object this$sessionId = this.getSessionId();
- final Object other$sessionId = other.getSessionId();
- if (this$sessionId == null ? other$sessionId != null : !this$sessionId.equals(other$sessionId)) {
- return false;
- }
- final Object this$serverHelloResponseFeaturesWebSocketMessage = this.getServerHelloResponseFeaturesWebSocketMessage();
- final Object other$serverHelloResponseFeaturesWebSocketMessage = other.getServerHelloResponseFeaturesWebSocketMessage();
-
- return this$serverHelloResponseFeaturesWebSocketMessage == null ? other$serverHelloResponseFeaturesWebSocketMessage == null : this$serverHelloResponseFeaturesWebSocketMessage.equals(other$serverHelloResponseFeaturesWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof HelloResponseWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $resumeId = this.getResumeId();
- result = result * PRIME + ($resumeId == null ? 43 : $resumeId.hashCode());
- final Object $sessionId = this.getSessionId();
- result = result * PRIME + ($sessionId == null ? 43 : $sessionId.hashCode());
- final Object $serverHelloResponseFeaturesWebSocketMessage = this.getServerHelloResponseFeaturesWebSocketMessage();
- result = result * PRIME + ($serverHelloResponseFeaturesWebSocketMessage == null ? 43 : $serverHelloResponseFeaturesWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "HelloResponseWebSocketMessage(resumeId=" + this.getResumeId() + ", sessionId=" + this.getSessionId() + ", serverHelloResponseFeaturesWebSocketMessage=" + this.getServerHelloResponseFeaturesWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseWebSocketMessage.kt
new file mode 100644
index 000000000..8e0e1a1a1
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloResponseWebSocketMessage.kt
@@ -0,0 +1,47 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 HelloResponseWebSocketMessage(
+ @JsonField(name = ["resumeid"])
+ var resumeId: String? = null,
+ @JsonField(name = ["sessionid"])
+ var sessionId: String? = null,
+ @JsonField(name = ["server"])
+ var serverHelloResponseFeaturesWebSocketMessage: ServerHelloResponseFeaturesWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null, null)
+
+ fun serverHasMCUSupport(): Boolean {
+ return serverHelloResponseFeaturesWebSocketMessage != null &&
+ serverHelloResponseFeaturesWebSocketMessage!!.features != null &&
+ serverHelloResponseFeaturesWebSocketMessage!!.features!!.contains("mcu")
+ }
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloWebSocketMessage.java
deleted file mode 100644
index 2aed8f798..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloWebSocketMessage.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class HelloWebSocketMessage {
- @JsonField(name = "version")
- String version;
-
- @JsonField(name = "resumeid")
- String resumeid;
-
- @JsonField(name = "auth")
- AuthWebSocketMessage authWebSocketMessage;
-
- public String getVersion() {
- return this.version;
- }
-
- public String getResumeid() {
- return this.resumeid;
- }
-
- public AuthWebSocketMessage getAuthWebSocketMessage() {
- return this.authWebSocketMessage;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public void setResumeid(String resumeid) {
- this.resumeid = resumeid;
- }
-
- public void setAuthWebSocketMessage(AuthWebSocketMessage authWebSocketMessage) {
- this.authWebSocketMessage = authWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof HelloWebSocketMessage)) {
- return false;
- }
- final HelloWebSocketMessage other = (HelloWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$version = this.getVersion();
- final Object other$version = other.getVersion();
- if (this$version == null ? other$version != null : !this$version.equals(other$version)) {
- return false;
- }
- final Object this$resumeid = this.getResumeid();
- final Object other$resumeid = other.getResumeid();
- if (this$resumeid == null ? other$resumeid != null : !this$resumeid.equals(other$resumeid)) {
- return false;
- }
- final Object this$authWebSocketMessage = this.getAuthWebSocketMessage();
- final Object other$authWebSocketMessage = other.getAuthWebSocketMessage();
-
- return this$authWebSocketMessage == null ? other$authWebSocketMessage == null : this$authWebSocketMessage.equals(other$authWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof HelloWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $version = this.getVersion();
- result = result * PRIME + ($version == null ? 43 : $version.hashCode());
- final Object $resumeid = this.getResumeid();
- result = result * PRIME + ($resumeid == null ? 43 : $resumeid.hashCode());
- final Object $authWebSocketMessage = this.getAuthWebSocketMessage();
- result = result * PRIME + ($authWebSocketMessage == null ? 43 : $authWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "HelloWebSocketMessage(version=" + this.getVersion() + ", resumeid=" + this.getResumeid() + ", authWebSocketMessage=" + this.getAuthWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloWebSocketMessage.kt
new file mode 100644
index 000000000..6aa62f9d6
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/HelloWebSocketMessage.kt
@@ -0,0 +1,41 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 HelloWebSocketMessage(
+ @JsonField(name = ["version"])
+ var version: String? = null,
+ @JsonField(name = ["resumeid"])
+ var resumeid: String? = null,
+ @JsonField(name = ["auth"])
+ var authWebSocketMessage: AuthWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/JoinedRoomOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/JoinedRoomOverallWebSocketMessage.java
deleted file mode 100644
index c6523b13f..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/JoinedRoomOverallWebSocketMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class JoinedRoomOverallWebSocketMessage extends BaseWebSocketMessage {
- @JsonField(name = "room")
- RoomWebSocketMessage roomWebSocketMessage;
-
- public RoomWebSocketMessage getRoomWebSocketMessage() {
- return this.roomWebSocketMessage;
- }
-
- public void setRoomWebSocketMessage(RoomWebSocketMessage roomWebSocketMessage) {
- this.roomWebSocketMessage = roomWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof JoinedRoomOverallWebSocketMessage)) {
- return false;
- }
- final JoinedRoomOverallWebSocketMessage other = (JoinedRoomOverallWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$roomWebSocketMessage = this.getRoomWebSocketMessage();
- final Object other$roomWebSocketMessage = other.getRoomWebSocketMessage();
-
- return this$roomWebSocketMessage == null ? other$roomWebSocketMessage == null : this$roomWebSocketMessage.equals(other$roomWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof JoinedRoomOverallWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $roomWebSocketMessage = this.getRoomWebSocketMessage();
- result = result * PRIME + ($roomWebSocketMessage == null ? 43 : $roomWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "JoinedRoomOverallWebSocketMessage(roomWebSocketMessage=" + this.getRoomWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/JoinedRoomOverallWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/JoinedRoomOverallWebSocketMessage.kt
new file mode 100644
index 000000000..69a977371
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/JoinedRoomOverallWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 JoinedRoomOverallWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["room"])
+ var roomWebSocketMessage: RoomWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferOverallWebSocketMessage.java
deleted file mode 100644
index 7994ac56f..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferOverallWebSocketMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class RequestOfferOverallWebSocketMessage extends BaseWebSocketMessage {
- @JsonField(name = "message")
- RequestOfferSignalingMessage requestOfferOverallWebSocketMessage;
-
- public RequestOfferSignalingMessage getRequestOfferOverallWebSocketMessage() {
- return this.requestOfferOverallWebSocketMessage;
- }
-
- public void setRequestOfferOverallWebSocketMessage(RequestOfferSignalingMessage requestOfferOverallWebSocketMessage) {
- this.requestOfferOverallWebSocketMessage = requestOfferOverallWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof RequestOfferOverallWebSocketMessage)) {
- return false;
- }
- final RequestOfferOverallWebSocketMessage other = (RequestOfferOverallWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$requestOfferOverallWebSocketMessage = this.getRequestOfferOverallWebSocketMessage();
- final Object other$requestOfferOverallWebSocketMessage = other.getRequestOfferOverallWebSocketMessage();
-
- return this$requestOfferOverallWebSocketMessage == null ? other$requestOfferOverallWebSocketMessage == null : this$requestOfferOverallWebSocketMessage.equals(other$requestOfferOverallWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof RequestOfferOverallWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $requestOfferOverallWebSocketMessage = this.getRequestOfferOverallWebSocketMessage();
- result = result * PRIME + ($requestOfferOverallWebSocketMessage == null ? 43 : $requestOfferOverallWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "RequestOfferOverallWebSocketMessage(requestOfferOverallWebSocketMessage=" + this.getRequestOfferOverallWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferOverallWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferOverallWebSocketMessage.kt
new file mode 100644
index 000000000..deb11af47
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferOverallWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 RequestOfferOverallWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["message"])
+ var requestOfferOverallWebSocketMessage: RequestOfferSignalingMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferSignalingMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferSignalingMessage.java
deleted file mode 100644
index b79a705d1..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferSignalingMessage.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class RequestOfferSignalingMessage {
- @JsonField(name = "recipient")
- ActorWebSocketMessage actorWebSocketMessage;
-
- @JsonField(name = "data")
- SignalingDataWebSocketMessageForOffer signalingDataWebSocketMessageForOffer;
-
- public ActorWebSocketMessage getActorWebSocketMessage() {
- return this.actorWebSocketMessage;
- }
-
- public SignalingDataWebSocketMessageForOffer getSignalingDataWebSocketMessageForOffer() {
- return this.signalingDataWebSocketMessageForOffer;
- }
-
- public void setActorWebSocketMessage(ActorWebSocketMessage actorWebSocketMessage) {
- this.actorWebSocketMessage = actorWebSocketMessage;
- }
-
- public void setSignalingDataWebSocketMessageForOffer(SignalingDataWebSocketMessageForOffer signalingDataWebSocketMessageForOffer) {
- this.signalingDataWebSocketMessageForOffer = signalingDataWebSocketMessageForOffer;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof RequestOfferSignalingMessage)) {
- return false;
- }
- final RequestOfferSignalingMessage other = (RequestOfferSignalingMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$actorWebSocketMessage = this.getActorWebSocketMessage();
- final Object other$actorWebSocketMessage = other.getActorWebSocketMessage();
- if (this$actorWebSocketMessage == null ? other$actorWebSocketMessage != null : !this$actorWebSocketMessage.equals(other$actorWebSocketMessage)) {
- return false;
- }
- final Object this$signalingDataWebSocketMessageForOffer = this.getSignalingDataWebSocketMessageForOffer();
- final Object other$signalingDataWebSocketMessageForOffer = other.getSignalingDataWebSocketMessageForOffer();
-
- return this$signalingDataWebSocketMessageForOffer == null ? other$signalingDataWebSocketMessageForOffer == null : this$signalingDataWebSocketMessageForOffer.equals(other$signalingDataWebSocketMessageForOffer);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof RequestOfferSignalingMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $actorWebSocketMessage = this.getActorWebSocketMessage();
- result = result * PRIME + ($actorWebSocketMessage == null ? 43 : $actorWebSocketMessage.hashCode());
- final Object $signalingDataWebSocketMessageForOffer = this.getSignalingDataWebSocketMessageForOffer();
- result = result * PRIME + ($signalingDataWebSocketMessageForOffer == null ? 43 : $signalingDataWebSocketMessageForOffer.hashCode());
- return result;
- }
-
- public String toString() {
- return "RequestOfferSignalingMessage(actorWebSocketMessage=" + this.getActorWebSocketMessage() + ", signalingDataWebSocketMessageForOffer=" + this.getSignalingDataWebSocketMessageForOffer() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferSignalingMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferSignalingMessage.kt
new file mode 100644
index 000000000..d791cf7bd
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RequestOfferSignalingMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+import android.os.Parcelable
+import com.bluelinelabs.logansquare.annotation.JsonField
+import com.bluelinelabs.logansquare.annotation.JsonObject
+import kotlinx.android.parcel.Parcelize
+
+@Parcelize
+@JsonObject
+class RequestOfferSignalingMessage(
+ @JsonField(name = ["recipient"])
+ var actorWebSocketMessage: ActorWebSocketMessage? = null,
+ @JsonField(name = ["data"])
+ var signalingDataWebSocketMessageForOffer: SignalingDataWebSocketMessageForOffer? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.java
deleted file mode 100644
index 80f1b0d22..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class RoomOverallWebSocketMessage extends BaseWebSocketMessage {
- @JsonField(name = "room")
- RoomWebSocketMessage roomWebSocketMessage;
-
- public RoomWebSocketMessage getRoomWebSocketMessage() {
- return this.roomWebSocketMessage;
- }
-
- public void setRoomWebSocketMessage(RoomWebSocketMessage roomWebSocketMessage) {
- this.roomWebSocketMessage = roomWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof RoomOverallWebSocketMessage)) {
- return false;
- }
- final RoomOverallWebSocketMessage other = (RoomOverallWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$roomWebSocketMessage = this.getRoomWebSocketMessage();
- final Object other$roomWebSocketMessage = other.getRoomWebSocketMessage();
-
- return this$roomWebSocketMessage == null ? other$roomWebSocketMessage == null : this$roomWebSocketMessage.equals(other$roomWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof RoomOverallWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $roomWebSocketMessage = this.getRoomWebSocketMessage();
- result = result * PRIME + ($roomWebSocketMessage == null ? 43 : $roomWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "RoomOverallWebSocketMessage(roomWebSocketMessage=" + this.getRoomWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.kt
new file mode 100644
index 000000000..ecf77c134
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomOverallWebSocketMessage.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+import android.os.Parcelable
+import com.bluelinelabs.logansquare.annotation.JsonField
+import com.bluelinelabs.logansquare.annotation.JsonObject
+import kotlinx.android.parcel.Parcelize
+
+@Parcelize
+@JsonObject
+class RoomOverallWebSocketMessage(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["room"])
+ var roomWebSocketMessage: RoomWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomPropertiesWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomPropertiesWebSocketMessage.java
deleted file mode 100644
index 726404eb9..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomPropertiesWebSocketMessage.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-import com.nextcloud.talk.models.json.conversations.Conversation;
-import com.nextcloud.talk.models.json.converters.EnumRoomTypeConverter;
-
-import org.parceler.Parcel;
-
-@Parcel
-@JsonObject
-public class RoomPropertiesWebSocketMessage {
- @JsonField(name = "name")
- String name;
-
- @JsonField(name = "type", typeConverter = EnumRoomTypeConverter.class)
- Conversation.ConversationType roomType;
-
- public String getName() {
- return this.name;
- }
-
- public Conversation.ConversationType getRoomType() {
- return this.roomType;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setRoomType(Conversation.ConversationType roomType) {
- this.roomType = roomType;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof RoomPropertiesWebSocketMessage)) {
- return false;
- }
- final RoomPropertiesWebSocketMessage other = (RoomPropertiesWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$name = this.getName();
- final Object other$name = other.getName();
- if (this$name == null ? other$name != null : !this$name.equals(other$name)) {
- return false;
- }
- final Object this$roomType = this.getRoomType();
- final Object other$roomType = other.getRoomType();
-
- return this$roomType == null ? other$roomType == null : this$roomType.equals(other$roomType);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof RoomPropertiesWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $name = this.getName();
- result = result * PRIME + ($name == null ? 43 : $name.hashCode());
- final Object $roomType = this.getRoomType();
- result = result * PRIME + ($roomType == null ? 43 : $roomType.hashCode());
- return result;
- }
-
- public String toString() {
- return "RoomPropertiesWebSocketMessage(name=" + this.getName() + ", roomType=" + this.getRoomType() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomPropertiesWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomPropertiesWebSocketMessage.kt
new file mode 100644
index 000000000..74bd8b2fc
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomPropertiesWebSocketMessage.kt
@@ -0,0 +1,41 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+import android.os.Parcelable
+import com.bluelinelabs.logansquare.annotation.JsonField
+import com.bluelinelabs.logansquare.annotation.JsonObject
+import com.nextcloud.talk.models.json.conversations.Conversation.ConversationType
+import com.nextcloud.talk.models.json.converters.EnumRoomTypeConverter
+import kotlinx.android.parcel.Parcelize
+
+@Parcelize
+@JsonObject
+data class RoomPropertiesWebSocketMessage(
+ @JsonField(name = ["name"])
+ var name: String? = null,
+ @JsonField(name = ["type"], typeConverter = EnumRoomTypeConverter::class)
+ var roomType: ConversationType? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomWebSocketMessage.java
deleted file mode 100644
index 16168c6d8..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomWebSocketMessage.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class RoomWebSocketMessage {
- @JsonField(name = "roomid")
- String roomId;
-
- @JsonField(name = "sessionid")
- String sessiondId;
-
- @JsonField(name = "properties")
- RoomPropertiesWebSocketMessage roomPropertiesWebSocketMessage;
-
- public String getRoomId() {
- return this.roomId;
- }
-
- public String getSessiondId() {
- return this.sessiondId;
- }
-
- public RoomPropertiesWebSocketMessage getRoomPropertiesWebSocketMessage() {
- return this.roomPropertiesWebSocketMessage;
- }
-
- public void setRoomId(String roomId) {
- this.roomId = roomId;
- }
-
- public void setSessiondId(String sessiondId) {
- this.sessiondId = sessiondId;
- }
-
- public void setRoomPropertiesWebSocketMessage(RoomPropertiesWebSocketMessage roomPropertiesWebSocketMessage) {
- this.roomPropertiesWebSocketMessage = roomPropertiesWebSocketMessage;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof RoomWebSocketMessage)) {
- return false;
- }
- final RoomWebSocketMessage other = (RoomWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$roomId = this.getRoomId();
- final Object other$roomId = other.getRoomId();
- if (this$roomId == null ? other$roomId != null : !this$roomId.equals(other$roomId)) {
- return false;
- }
- final Object this$sessiondId = this.getSessiondId();
- final Object other$sessiondId = other.getSessiondId();
- if (this$sessiondId == null ? other$sessiondId != null : !this$sessiondId.equals(other$sessiondId)) {
- return false;
- }
- final Object this$roomPropertiesWebSocketMessage = this.getRoomPropertiesWebSocketMessage();
- final Object other$roomPropertiesWebSocketMessage = other.getRoomPropertiesWebSocketMessage();
-
- return this$roomPropertiesWebSocketMessage == null ? other$roomPropertiesWebSocketMessage == null : this$roomPropertiesWebSocketMessage.equals(other$roomPropertiesWebSocketMessage);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof RoomWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $roomId = this.getRoomId();
- result = result * PRIME + ($roomId == null ? 43 : $roomId.hashCode());
- final Object $sessiondId = this.getSessiondId();
- result = result * PRIME + ($sessiondId == null ? 43 : $sessiondId.hashCode());
- final Object $roomPropertiesWebSocketMessage = this.getRoomPropertiesWebSocketMessage();
- result = result * PRIME + ($roomPropertiesWebSocketMessage == null ? 43 : $roomPropertiesWebSocketMessage.hashCode());
- return result;
- }
-
- public String toString() {
- return "RoomWebSocketMessage(roomId=" + this.getRoomId() + ", sessiondId=" + this.getSessiondId() + ", roomPropertiesWebSocketMessage=" + this.getRoomPropertiesWebSocketMessage() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomWebSocketMessage.kt
new file mode 100644
index 000000000..5096d33f1
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/RoomWebSocketMessage.kt
@@ -0,0 +1,41 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+import android.os.Parcelable
+import com.bluelinelabs.logansquare.annotation.JsonField
+import com.bluelinelabs.logansquare.annotation.JsonObject
+import kotlinx.android.parcel.Parcelize
+
+@Parcelize
+@JsonObject
+class RoomWebSocketMessage(
+ @JsonField(name = ["roomid"])
+ var roomId: String? = null,
+ @JsonField(name = ["sessionid"])
+ var sessiondId: String? = null,
+ @JsonField(name = ["properties"])
+ var roomPropertiesWebSocketMessage: RoomPropertiesWebSocketMessage? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null, null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ServerHelloResponseFeaturesWebSocketMessage.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ServerHelloResponseFeaturesWebSocketMessage.java
deleted file mode 100644
index 0ee622864..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ServerHelloResponseFeaturesWebSocketMessage.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-import java.util.List;
-
-@JsonObject
-@Parcel
-public class ServerHelloResponseFeaturesWebSocketMessage {
- @JsonField(name = "features")
- List features;
-
- public List getFeatures() {
- return this.features;
- }
-
- public void setFeatures(List features) {
- this.features = features;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof ServerHelloResponseFeaturesWebSocketMessage)) {
- return false;
- }
- final ServerHelloResponseFeaturesWebSocketMessage other = (ServerHelloResponseFeaturesWebSocketMessage) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$features = this.getFeatures();
- final Object other$features = other.getFeatures();
-
- return this$features == null ? other$features == null : this$features.equals(other$features);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof ServerHelloResponseFeaturesWebSocketMessage;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $features = this.getFeatures();
- result = result * PRIME + ($features == null ? 43 : $features.hashCode());
- return result;
- }
-
- public String toString() {
- return "ServerHelloResponseFeaturesWebSocketMessage(features=" + this.getFeatures() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/ServerHelloResponseFeaturesWebSocketMessage.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ServerHelloResponseFeaturesWebSocketMessage.kt
new file mode 100644
index 000000000..5d8ac619d
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/ServerHelloResponseFeaturesWebSocketMessage.kt
@@ -0,0 +1,37 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+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 ServerHelloResponseFeaturesWebSocketMessage(
+ @JsonField(name = ["features"])
+ var features: List? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null)
+}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/SignalingDataWebSocketMessageForOffer.java b/app/src/main/java/com/nextcloud/talk/models/json/websocket/SignalingDataWebSocketMessageForOffer.java
deleted file mode 100644
index 714aae569..000000000
--- a/app/src/main/java/com/nextcloud/talk/models/json/websocket/SignalingDataWebSocketMessageForOffer.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Nextcloud Talk application
- *
- * @author Mario Danic
- * Copyright (C) 2017-2018 Mario Danic
- *
- * 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 .
- */
-
-package com.nextcloud.talk.models.json.websocket;
-
-import com.bluelinelabs.logansquare.annotation.JsonField;
-import com.bluelinelabs.logansquare.annotation.JsonObject;
-
-import org.parceler.Parcel;
-
-@JsonObject
-@Parcel
-public class SignalingDataWebSocketMessageForOffer {
- @JsonField(name = "type")
- String type;
-
- @JsonField(name = "roomType")
- String roomType;
-
- public String getType() {
- return this.type;
- }
-
- public String getRoomType() {
- return this.roomType;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public void setRoomType(String roomType) {
- this.roomType = roomType;
- }
-
- public boolean equals(final Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof SignalingDataWebSocketMessageForOffer)) {
- return false;
- }
- final SignalingDataWebSocketMessageForOffer other = (SignalingDataWebSocketMessageForOffer) o;
- if (!other.canEqual((Object) this)) {
- return false;
- }
- final Object this$type = this.getType();
- final Object other$type = other.getType();
- if (this$type == null ? other$type != null : !this$type.equals(other$type)) {
- return false;
- }
- final Object this$roomType = this.getRoomType();
- final Object other$roomType = other.getRoomType();
-
- return this$roomType == null ? other$roomType == null : this$roomType.equals(other$roomType);
- }
-
- protected boolean canEqual(final Object other) {
- return other instanceof SignalingDataWebSocketMessageForOffer;
- }
-
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $type = this.getType();
- result = result * PRIME + ($type == null ? 43 : $type.hashCode());
- final Object $roomType = this.getRoomType();
- result = result * PRIME + ($roomType == null ? 43 : $roomType.hashCode());
- return result;
- }
-
- public String toString() {
- return "SignalingDataWebSocketMessageForOffer(type=" + this.getType() + ", roomType=" + this.getRoomType() + ")";
- }
-}
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/websocket/SignalingDataWebSocketMessageForOffer.kt b/app/src/main/java/com/nextcloud/talk/models/json/websocket/SignalingDataWebSocketMessageForOffer.kt
new file mode 100644
index 000000000..dbf2327fc
--- /dev/null
+++ b/app/src/main/java/com/nextcloud/talk/models/json/websocket/SignalingDataWebSocketMessageForOffer.kt
@@ -0,0 +1,39 @@
+/*
+ * Nextcloud Talk application
+ *
+ * @author Mario Danic
+ * @author Andy Scherzinger
+ * Copyright (C) 2022 Andy Scherzinger
+ * Copyright (C) 2017-2018 Mario Danic
+ *
+ * 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 .
+ */
+package com.nextcloud.talk.models.json.websocket
+
+import android.os.Parcelable
+import com.bluelinelabs.logansquare.annotation.JsonField
+import com.bluelinelabs.logansquare.annotation.JsonObject
+import kotlinx.android.parcel.Parcelize
+
+@Parcelize
+@JsonObject
+class SignalingDataWebSocketMessageForOffer(
+ @JsonField(name = ["type"])
+ var type: String? = null,
+ @JsonField(name = ["roomType"])
+ var roomType: String? = null
+) : Parcelable {
+ // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
+ constructor() : this(null, null)
+}