Some signaling stuff

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-11-01 16:34:46 +01:00
parent d6d51909fd
commit 2946ce6c44
6 changed files with 160 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import com.nextcloud.talk.api.models.json.push.PushRegistrationOverall;
import com.nextcloud.talk.api.models.json.rooms.RoomOverall;
import com.nextcloud.talk.api.models.json.rooms.RoomsOverall;
import com.nextcloud.talk.api.models.json.sharees.ShareesOverall;
import com.nextcloud.talk.api.models.json.signaling.SignalingOverall;
import com.nextcloud.talk.api.models.json.userprofile.UserProfileOverall;
import java.util.Map;
@ -162,7 +163,7 @@ public interface NcApi {
Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /signaling
*/
@GET
Observable<Integer> pullSignalingMessages(@Header("Authorization") String authorization, @Url String url);
Observable<SignalingOverall> pullSignalingMessages(@Header("Authorization") String authorization, @Url String url);
/*
QueryMap items are as follows:

View File

@ -39,4 +39,7 @@ public class Participant {
@JsonField(name = "sessionId")
String sessionId;
@JsonField(name = "roomId")
long roomId;
}

View File

@ -0,0 +1,45 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.api.models.json.signaling;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import java.util.HashMap;
import lombok.Data;
@Data
@JsonObject
public class NCSignalingMessage {
@JsonField(name = "from")
String from;
@JsonField(name = "to")
String to;
@JsonField(name = "sid")
String sid;
@JsonField(name = "type")
String type;
@JsonField(name = "payload")
HashMap<String, Object> payload;
@JsonField(name = "roomType")
String roomType;
}

View File

@ -0,0 +1,40 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.api.models.json.signaling;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import lombok.Data;
/**
* Created by mdjanic on 30/10/2017.
*/
@Data
@JsonObject
public class Signaling {
@JsonField(name = "type")
String type;
//can be NCSignalingMessage or List<Participant>
@JsonField(name = "data")
Object signalingMessage;
}

View File

@ -0,0 +1,36 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.api.models.json.signaling;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import com.nextcloud.talk.api.models.json.generic.GenericOCS;
import java.util.List;
import lombok.Data;
@Data
@JsonObject
public class SignalingOCS extends GenericOCS {
@JsonField(name = "data")
List<Signaling> signalings;
}

View File

@ -0,0 +1,34 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.api.models.json.signaling;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import lombok.Data;
@JsonObject
@Data
public class SignalingOverall {
@JsonField(name = "ocs")
SignalingOCS ocs;
}