Browse Source

Kotlin: Add cannot_reach_eth_network and cannot_decode_pdl_message status codes

pull/10/head
Francisco Cunha 2 months ago
committed by Newgitea
parent
commit
87905fc07b
2 changed files with 9 additions and 6 deletions
  1. +6
    -5
      src/Transport.kt
  2. +3
    -1
      src/pdl.tsc

+ 6
- 5
src/Transport.kt View File

@ -2,6 +2,7 @@ package foundation.pEp
import foundation.pEp.jniadapter.Message
import foundation.pEp.jniadapter.Rating
import kotlinx.coroutines.flow.Flow
/**
* # pEp distributed transport Kotlin interface
@ -21,7 +22,7 @@ abstract class Transport {
*/
abstract val uriScheme: String
abstract fun configure() : TransportStatusCode // To be defined, what needs to be configured.
abstract fun configure(): TransportStatusCode // To be defined, what needs to be configured.
/**
* Startup
@ -30,7 +31,7 @@ abstract class Transport {
*
* @return Result with status code
*/
abstract fun startup() : Result<TransportStatusCode>
abstract fun startup(): Result<TransportStatusCode>
/**
* Shutdown
@ -39,7 +40,7 @@ abstract class Transport {
*
* @return Status code
*/
abstract fun shutdown() : TransportStatusCode
abstract fun shutdown(): TransportStatusCode
/**
* Send
@ -48,7 +49,7 @@ abstract class Transport {
*
* @return Result with tatus code
*/
abstract fun send(message: Message) : Result<TransportStatusCode>
abstract fun send(message: Message): Result<TransportStatusCode>
/**
@ -60,7 +61,7 @@ abstract class Transport {
*/
abstract fun getAllMessages(): Result<List<Message>>
fun isOnline() = true;
fun isOnline() = true
fun supportsShortMsg() = false
fun supportsLongMsg() = true
fun supportsLongMsgFormatted() = false


+ 3
- 1
src/pdl.tsc View File

@ -1,3 +1,5 @@
doc > transport status codes for PDL (0x03)
hex unknown_eth_error 0x03ffffff;
hex cannot_reach_eth_network 0x03800001;
hex cannot_decode_pdl_message 0x03800002;
hex unknown_eth_error 0x03ffffff;

Loading…
Cancel
Save