From 1e0f84151c9873dead8fa71fd34b4c4f1d94065e Mon Sep 17 00:00:00 2001 From: CWA Technical User <67319337+Corona-Warn-App-Technical-User@users.noreply.github.com> Date: Tue, 6 Apr 2021 11:07:47 +0200 Subject: [PATCH] Protocol Buffer update for release 2.0.x at Tue Apr 6 08:07:46 UTC 2021 (#2742) * Update from https://github.com/corona-warn-app/cwa-protocol-buffers/commit/1bc558730fa5c311d1f52e72684ee6846b91aece * Update from https://github.com/corona-warn-app/cwa-protocol-buffers/commit/727b1304dc01fb2e5fc78035f3fa7ba1a050d9e6 * Update QrCodePosterTemplateServerTest.kt Co-authored-by: Mohamed Metwalli <mohamed.metwalli@sap.com> --- .../QrCodePosterTemplateServerTest.kt | 9 +++++---- .../main/proto/internal/pt/qr_code_poster_template.proto | 4 ++-- .../src/main/proto/internal/pt/trace_location.proto | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/eventregistration/events/server/qrcodepostertemplate/QrCodePosterTemplateServerTest.kt b/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/eventregistration/events/server/qrcodepostertemplate/QrCodePosterTemplateServerTest.kt index 6f2a1b4b7..2bdf021dc 100644 --- a/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/eventregistration/events/server/qrcodepostertemplate/QrCodePosterTemplateServerTest.kt +++ b/Corona-Warn-App/src/test/java/de/rki/coronawarnapp/eventregistration/events/server/qrcodepostertemplate/QrCodePosterTemplateServerTest.kt @@ -45,12 +45,12 @@ internal class QrCodePosterTemplateServerTest : BaseTest() { createInstance().downloadQrCodePosterTemplate().apply { template.toStringUtf8().substring(0, 22) shouldBe "<vector xmlns:android=" - offsetX shouldBe 10 - offsetY shouldBe 10 + offsetX shouldBe 10.0f + offsetY shouldBe 10.0f qrCodeSideLength shouldBe 100 with(descriptionTextBox) { - offsetX shouldBe 10 - offsetY shouldBe 50 + offsetX shouldBe 0.0f + offsetY shouldBe 0.0f width shouldBe 100 height shouldBe 20 fontSize shouldBe 10 @@ -127,6 +127,7 @@ internal class QrCodePosterTemplateServerTest : BaseTest() { "</vector>\n""")) .build()*/ + // TODO update this bundle to send PDF file not XML private val POSTER_BUNDLE = ( "504b03040a000000080014867d52008c85fefb000000ab0100000a0000006578706f72742e62" + "696e7d90cf4bc33014c7071e949c0415bc0825bbc8685f9676edbad216440fbb78f61c9a6a8ae912da9089ff80ffb66957700e" + diff --git a/Server-Protocol-Buffer/src/main/proto/internal/pt/qr_code_poster_template.proto b/Server-Protocol-Buffer/src/main/proto/internal/pt/qr_code_poster_template.proto index 76a0b921c..6fdbbcdd9 100644 --- a/Server-Protocol-Buffer/src/main/proto/internal/pt/qr_code_poster_template.proto +++ b/Server-Protocol-Buffer/src/main/proto/internal/pt/qr_code_poster_template.proto @@ -15,8 +15,8 @@ message QRCodePosterTemplateAndroid { QRCodeTextBoxAndroid descriptionTextBox = 5; message QRCodeTextBoxAndroid { - uint32 offsetX = 1; - uint32 offsetY = 2; + float offsetX = 1; + float offsetY = 2; uint32 width = 3; uint32 height = 4; diff --git a/Server-Protocol-Buffer/src/main/proto/internal/pt/trace_location.proto b/Server-Protocol-Buffer/src/main/proto/internal/pt/trace_location.proto index baf364df2..d169f942a 100644 --- a/Server-Protocol-Buffer/src/main/proto/internal/pt/trace_location.proto +++ b/Server-Protocol-Buffer/src/main/proto/internal/pt/trace_location.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package de.rki.coronawarnapp.server.protocols.internal.pt; + message QRCodePayload { uint32 version = 1; TraceLocation locationData = 2; -- GitLab