From c797b9626c1bd993328295571af39d0e28dceeeb Mon Sep 17 00:00:00 2001 From: Gerhard Muth Date: Wed, 1 Nov 2023 18:27:15 +0100 Subject: [PATCH] make attributes publicly accessible --- src/main/kotlin/de/gmuth/ipp/client/IppClient.kt | 3 ++- src/main/kotlin/de/gmuth/ipp/client/IppDocument.kt | 2 +- src/main/kotlin/de/gmuth/ipp/client/IppEventNotification.kt | 2 +- src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt | 2 +- src/main/kotlin/de/gmuth/ipp/client/IppSubscription.kt | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/de/gmuth/ipp/client/IppClient.kt b/src/main/kotlin/de/gmuth/ipp/client/IppClient.kt index 749fbbfb..c75da00c 100644 --- a/src/main/kotlin/de/gmuth/ipp/client/IppClient.kt +++ b/src/main/kotlin/de/gmuth/ipp/client/IppClient.kt @@ -19,6 +19,7 @@ import java.net.HttpURLConnection import java.net.URI import java.util.concurrent.atomic.AtomicInteger import java.util.logging.Level.SEVERE +import java.util.logging.Logger import java.util.logging.Logger.getLogger import javax.net.ssl.HostnameVerifier import javax.net.ssl.HttpsURLConnection @@ -26,7 +27,7 @@ import javax.net.ssl.HttpsURLConnection typealias IppResponseInterceptor = (request: IppRequest, response: IppResponse) -> Unit open class IppClient(val config: IppConfig = IppConfig()) : IppExchange { - protected val log = getLogger(javaClass.name) + protected val log: Logger = getLogger(javaClass.name) var responseInterceptor: IppResponseInterceptor? = null var saveMessages: Boolean = false diff --git a/src/main/kotlin/de/gmuth/ipp/client/IppDocument.kt b/src/main/kotlin/de/gmuth/ipp/client/IppDocument.kt index ccd42b90..139065ca 100644 --- a/src/main/kotlin/de/gmuth/ipp/client/IppDocument.kt +++ b/src/main/kotlin/de/gmuth/ipp/client/IppDocument.kt @@ -17,7 +17,7 @@ import kotlin.io.path.createTempDirectory class IppDocument( val job: IppJob, - private val attributes: IppAttributesGroup, + val attributes: IppAttributesGroup, private val inputStream: InputStream ) { diff --git a/src/main/kotlin/de/gmuth/ipp/client/IppEventNotification.kt b/src/main/kotlin/de/gmuth/ipp/client/IppEventNotification.kt index 4c5d0060..9605cb26 100644 --- a/src/main/kotlin/de/gmuth/ipp/client/IppEventNotification.kt +++ b/src/main/kotlin/de/gmuth/ipp/client/IppEventNotification.kt @@ -13,7 +13,7 @@ import java.util.logging.Logger class IppEventNotification( val subscription: IppSubscription, - private val attributes: IppAttributesGroup + val attributes: IppAttributesGroup ) { val sequenceNumber: Int diff --git a/src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt b/src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt index f6ce6aa8..982264eb 100644 --- a/src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt +++ b/src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt @@ -26,7 +26,7 @@ import kotlin.io.path.createTempDirectory @SuppressWarnings("kotlin:S1192") class IppPrinter( val printerUri: URI, - internal val attributes: IppAttributesGroup = IppAttributesGroup(Printer), + val attributes: IppAttributesGroup = IppAttributesGroup(Printer), ippConfig: IppConfig = IppConfig(), internal val ippClient: IppClient = IppClient(ippConfig), getPrinterAttributesOnInit: Boolean = true, diff --git a/src/main/kotlin/de/gmuth/ipp/client/IppSubscription.kt b/src/main/kotlin/de/gmuth/ipp/client/IppSubscription.kt index d65b70ba..6e6c728e 100644 --- a/src/main/kotlin/de/gmuth/ipp/client/IppSubscription.kt +++ b/src/main/kotlin/de/gmuth/ipp/client/IppSubscription.kt @@ -21,7 +21,7 @@ import java.util.logging.Logger.getLogger class IppSubscription( val printer: IppPrinter, - private val attributes: IppAttributesGroup + val attributes: IppAttributesGroup ) : IppExchange by printer { private val log = getLogger(javaClass.name)