Commit 29/07/2025
This commit is contained in:
17
src/zello/Event_OnChannelStatus.kt
Normal file
17
src/zello/Event_OnChannelStatus.kt
Normal file
@@ -0,0 +1,17 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["command", "channel", "status", "users_online", "images_supported", "texting_supported", "locations_supported", "error", "error_type"])
|
||||
class Event_OnChannelStatus {
|
||||
var command: String="" // must be "on_channel_status"
|
||||
var channel: String=""
|
||||
var status: String="" // must be "online" or "offline"
|
||||
var users_online: Int = 0
|
||||
var images_supported: Boolean = false
|
||||
var texting_supported: Boolean = false
|
||||
var locations_supported: Boolean = false
|
||||
var error: String? = null
|
||||
var error_type: String? = null // either "unknown" or "configuration"
|
||||
}
|
||||
17
src/zello/Event_OnStreamStart.kt
Normal file
17
src/zello/Event_OnStreamStart.kt
Normal file
@@ -0,0 +1,17 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["command", "type", "codec", "codec_header", "packet_duration", "stream_id", "channel", "from", "for"])
|
||||
class Event_OnStreamStart {
|
||||
var command: String = "" // must be "on_stream_start"
|
||||
var type: String = "" // must be "audio"
|
||||
var codec: String = "" // must be "opus"
|
||||
var codec_header: String = ""
|
||||
var packet_duration: Int = 0 // in milliseconds
|
||||
var stream_id: Int = 0
|
||||
var channel: String=""
|
||||
var from: String = "" // the user who started the stream
|
||||
var For: String = "" // the user who is receiving the stream, should be "for" not "For"
|
||||
}
|
||||
10
src/zello/Event_OnStreamStop.kt
Normal file
10
src/zello/Event_OnStreamStop.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["command", "stream_id"])
|
||||
class Event_OnStreamStop {
|
||||
var command: String = "" // must be "on_stream_stop
|
||||
var stream_id: Int = 0
|
||||
}
|
||||
10
src/zello/SendImageCommand.kt
Normal file
10
src/zello/SendImageCommand.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["command", "seq", "channel", "type", "thumbnail_content_length", "content_length", "width", "height", "source", "For"])
|
||||
class SendImageCommand(val seq: Int, val channel: String, val thumbnail_content_length: Int, val content_length: Int, val width: Int, val height: Int, val source: String = "camera", val For: String?) {
|
||||
val command: String = "send_image"
|
||||
val type: String = "jpeg"
|
||||
}
|
||||
11
src/zello/SendImageReply.kt
Normal file
11
src/zello/SendImageReply.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["seq", "success", "image_id"])
|
||||
class SendImageReply {
|
||||
var seq: Int = 0
|
||||
var success: Boolean = false
|
||||
var image_id: Int = 0
|
||||
}
|
||||
9
src/zello/SendLocationCommand.kt
Normal file
9
src/zello/SendLocationCommand.kt
Normal file
@@ -0,0 +1,9 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["command", "seq", "channel", "latitude", "longitude", "accuracy", "formatted_address", "For"])
|
||||
class SendLocationCommand(val seq: Int, val channel: String, val latitude: Double, val longitude: Double, val accuracy: Double, val formatted_address: String, val For: String? = null) {
|
||||
val command: String = "send_location"
|
||||
}
|
||||
10
src/zello/SendLocationReply.kt
Normal file
10
src/zello/SendLocationReply.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["seq", "success"])
|
||||
class SendLocationReply {
|
||||
var seq: Int = 0
|
||||
var success: Boolean = false
|
||||
}
|
||||
9
src/zello/SendTextMessageCommand.kt
Normal file
9
src/zello/SendTextMessageCommand.kt
Normal file
@@ -0,0 +1,9 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["command","seq", "channel", "text", "For"])
|
||||
class SendTextMessageCommand(val seq: Int, val channel: String, val text: String, val For: String? = null) {
|
||||
val command: String = "send_text_message"
|
||||
}
|
||||
10
src/zello/SendTextMessageReply.kt
Normal file
10
src/zello/SendTextMessageReply.kt
Normal file
@@ -0,0 +1,10 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["seq", "success"])
|
||||
class SendTextMessageReply {
|
||||
var seq: Int = 0
|
||||
var success: Boolean = false
|
||||
}
|
||||
12
src/zello/StartStreamCommand.kt
Normal file
12
src/zello/StartStreamCommand.kt
Normal file
@@ -0,0 +1,12 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value=["command","seq","channels","type","codec","codec_header","packet_duration","For"])
|
||||
class StartStreamCommand(val seq: Int, val channels: String, val packet_duration: Int=20, val For:String ) {
|
||||
val command: String = "start_stream"
|
||||
val type: String = "audio"
|
||||
val codec: String = "opus"
|
||||
val codec_header: String ="gD4BPA==" // base64 encoded header for [opus codec header](https://github.com/zelloptt/zello-channel-api/blob/master/API.md#codec_header-attribute)
|
||||
}
|
||||
11
src/zello/StartStreamReply.kt
Normal file
11
src/zello/StartStreamReply.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@JsonPropertyOrder(value=["seq","success","stream_id"])
|
||||
@Suppress("unused")
|
||||
class StartStreamReply {
|
||||
var seq : Int=0
|
||||
var success: Boolean = false
|
||||
var stream_id : Int = 0
|
||||
}
|
||||
9
src/zello/StopStreamCommand.kt
Normal file
9
src/zello/StopStreamCommand.kt
Normal file
@@ -0,0 +1,9 @@
|
||||
package zello
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder
|
||||
|
||||
@Suppress("unused")
|
||||
@JsonPropertyOrder(value = ["command", "seq", "stream_id", "channel"])
|
||||
class StopStreamCommand(val seq: Int, val stream_id: Int, val channel: String) {
|
||||
val command: String = "stop_stream"
|
||||
}
|
||||
Reference in New Issue
Block a user