diff --git a/jitpack.yml b/jitpack.yml
deleted file mode 100644
index 1eedf0c..0000000
--- a/jitpack.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-install:
- - FILE="-Dfile=shared-release.aar"
- - mvn install:install-file $FILE -DgroupId=com.telnyx.janusmessagesdk -DartifactId=shared-android -Dversion=-0.7.29 -Dpackaging=aar -DpomFile=pom.xml
-jdk:
- - openjdk17
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 6a4353d..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,292 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- com.simpligility.maven.plugins
- android-maven-plugin
- 4.6.0
- true
-
-
-
- 4.0.0
- JanusMessageSdk
- shared-android
- 0.7.29
- aar
-
-
- org.jetbrains.kotlin
- kotlin-stdlib
- 1.9.20
- compile
-
-
- io.ktor
- ktor-client-okhttp-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- org.jetbrains.kotlinx
- kotlinx-serialization-json-jvm
- 1.6.0
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- io.ktor
- ktor-client-auth-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- io.ktor
- ktor-client-cio-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- io.ktor
- ktor-client-core-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- io.ktor
- ktor-client-serialization-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- io.ktor
- ktor-serialization-kotlinx-json-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- io.ktor
- ktor-client-logging-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- org.jetbrains.kotlinx
- kotlinx-datetime-jvm
- 0.5.0
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- io.ktor
- ktor-client-content-negotiation-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- io.ktor
- ktor-client-websockets-jvm
- 2.3.7
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- app.softwork
- kotlinx-uuid-core-jvm
- 0.0.22
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
- co.touchlab
- kermit-android
- 2.0.3
- runtime
-
-
- kotlin-stdlib-common
- org.jetbrains.kotlin
-
-
- kotlin-test-common
- org.jetbrains.kotlin
-
-
- kotlin-test-annotations-common
- org.jetbrains.kotlin
-
-
-
-
-
-
diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts
index 8a9990e..f400bf1 100644
--- a/shared/build.gradle.kts
+++ b/shared/build.gradle.kts
@@ -38,7 +38,7 @@ kotlin {
iosSimulatorArm64()
- version = "0.7.29"
+ version = "0.7.30"
cocoapods {
summary = "Janus-message-sdk"
@@ -186,19 +186,7 @@ fun Project.procRunFailLog(vararg params: String):List{
publishing {
- publications {
-
- create("maven") {
- run {
- groupId = "com.telnyx"
- artifactId = this@Build_gradle.getArtifactId()
- version = getVersionName()
- artifact(tasks["sourceJar"])
- }
- pom {
- }
- }
- }
+
repositories {
mavenLocal()
diff --git a/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Call.kt b/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Call.kt
index 2c54827..9711f8a 100644
--- a/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Call.kt
+++ b/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Call.kt
@@ -26,11 +26,8 @@ data class Accept(
@SerialName("handle_id")
var handleId: Long = 0
- fun default(handleId: Long, body: CallBody, jsep: Jsep, sessionId: Long): Call {
- return Call(
- body = body,
- jsep = jsep
- ).apply {
+ fun default(handleId: Long, sessionId: Long): Accept {
+ return this.apply {
this.handleId = handleId
janus = Janus.MESSAGE.value
this.sessionId = sessionId
@@ -63,11 +60,8 @@ data class Call(
@SerialName("handle_id")
var handleId: Long = 0
- fun default(handleId: Long, body: CallBody, jsep: Jsep, sessionId: Long): Call {
- return Call(
- body = body,
- jsep = jsep
- ).apply {
+ fun default(handleId: Long, sessionId: Long): Call {
+ return this.apply {
this.handleId = handleId
janus = Janus.MESSAGE.value
this.sessionId = sessionId
diff --git a/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/HangUp.kt b/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/HangUp.kt
index 9770cb4..d3a43a4 100644
--- a/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/HangUp.kt
+++ b/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/HangUp.kt
@@ -3,35 +3,36 @@ package com.telnyx.janusmessagesdk.janus
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.encodeToString
+import kotlinx.uuid.UUID
@Serializable
data class HangUpRequest(
- @SerialName("body")
- var body: Body,
@SerialName("handle_id")
var handleId: Long,
@SerialName("session_id")
var sessionId: Long,
- @SerialName("transaction")
- var transaction: String
+
) : JanusBase() {
+
fun encode(): String {
return json.encodeToString(this)
}
- fun default(handleId: Long, sessionId: Long): HangUpRequest {
- return HangUpRequest(
- body = Body(JanusEvent.HANGUP.value()),
- handleId = handleId,
- sessionId = sessionId,
- transaction = transaction
- ).apply {
+ @SerialName("body")
+ var body: HangUpBody? = null
+
+ @SerialName("transaction")
+ var transaction: String = ""
+ fun default(): HangUpRequest {
+ return this.apply {
janus = Janus.MESSAGE.value
+ body = HangUpBody(JanusEvent.HANGUP.value())
+ transaction = UUID().toString()
}
}
@Serializable
- data class Body(
+ data class HangUpBody(
@SerialName("request")
var request: String
)
diff --git a/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Register.kt b/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Register.kt
index f444882..6409ebc 100644
--- a/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Register.kt
+++ b/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Register.kt
@@ -35,29 +35,32 @@ data class Register(
}
-@Serializable
-data class Body(
- @SerialName("username")
- val username: String ?= null,
- @SerialName("login_token")
- val loginToken: String?,
- @SerialName("login")
- val login: String?,
-) {
+
+
+@Serializable
+class Body{
@SerialName("proxy")
var proxy: String? = null
@SerialName("request")
var request: String? = null
- fun default(login: String, loginToken: String,displayName: String, ): Body {
- return Body(
- loginToken = loginToken,
- login = login,
- username = "sip:$login@sipdev.telnyx.com",
- ).apply {
+ @SerialName("login")
+ var login: String? = null
+ @SerialName("display_name")
+ var displayName: String? = ""
+ @SerialName("username")
+ var username: String ?= null
+ @SerialName("password")
+ var password: String ?= null
+ fun default(userName:String,password:String,displayName: String = ""): Body {
+ return this.apply {
+ this.login = userName
+ this.password = password
+ this.username = "sip:$userName@sipdev.telnyx"
request = Janus.REGISTER.value
proxy = "sip:sipdev.telnyx.com:5060"
+ this.displayName = displayName
}
}
}