Skip to content

Commit

Permalink
Merge pull request #13 from calypsonet/feat/update_package_name
Browse files Browse the repository at this point in the history
Update plugins package names
  • Loading branch information
Yamapps committed Jul 26, 2021
2 parents 13b4410 + e3aa985 commit 770d262
Show file tree
Hide file tree
Showing 110 changed files with 665 additions and 954 deletions.
36 changes: 18 additions & 18 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,31 +110,31 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

//Keyple
implementation "org.eclipse.keyple:keyple-service-java-lib:$keyple_version_2_0_0"
implementation "org.eclipse.keyple:keyple-card-calypso-java-lib:$keyple_version_2_0_0"
implementation "org.eclipse.keyple:keyple-service-resource-java-lib:$keyple_version_2_0_0"
implementation "org.eclipse.keyple:keyple-service-java-lib:2.0.0-SNAPSHOT"
implementation "org.eclipse.keyple:keyple-card-calypso-java-lib:2.0.0-SNAPSHOT"
implementation "org.eclipse.keyple:keyple-service-resource-java-lib:2.0.0-SNAPSHOT"

implementation "org.calypsonet.terminal:calypsonet-terminal-reader-java-api:$keyple_version_1_0"
implementation "org.calypsonet.terminal:calypsonet-terminal-calypso-java-api:$keyple_version_1_0"
implementation "org.calypsonet.terminal:calypsonet-terminal-card-java-api:$keyple_version_1_0"
implementation "org.calypsonet.terminal:calypsonet-terminal-reader-java-api:1.0.+"
implementation "org.calypsonet.terminal:calypsonet-terminal-calypso-java-api:1.0.+"
implementation "org.calypsonet.terminal:calypsonet-terminal-card-java-api:1.0.+"

omapiImplementation "org.eclipse.keyple:keyple-util-java-lib:$keyple_version_2_0_0"
omapiImplementation "org.eclipse.keyple:keyple-common-java-api:$keyple_version_2_0_0"
omapiImplementation "org.eclipse.keyple:keyple-plugin-android-omapi-java-lib:$keyple_version_2_0_0_rc1"
omapiImplementation "org.eclipse.keyple:keyple-plugin-android-nfc-java-lib:$keyple_version_2_0_0_rc1"
omapiImplementation "org.eclipse.keyple:keyple-util-java-lib:2.+"
omapiImplementation "org.eclipse.keyple:keyple-common-java-api:2.0.+"
omapiImplementation "org.eclipse.keyple:keyple-plugin-android-omapi-java-lib:$omapi_plugin_version"
omapiImplementation "org.eclipse.keyple:keyple-plugin-android-nfc-java-lib:$android_nfc_plugin_version"

famocoImplementation "org.eclipse.keyple:keyple-plugin-android-nfc-java-lib:$keyple_version_2_0_0_rc1"
famocoImplementation "org.eclipse.keyple:keyple-plugin-cna-famoco-se-communication-java-lib:$famoco_plugin_version"
famocoImplementation "org.eclipse.keyple:keyple-plugin-android-nfc-java-lib:$android_nfc_plugin_version"
famocoImplementation "org.calypsonet.keyple:keyple-plugin-cna-famoco-se-communication-java-lib:$famoco_plugin_version"

mockSamImplementation "org.eclipse.keyple:keyple-util-java-lib:$keyple_version_2_0_0"
mockSamImplementation "org.eclipse.keyple:keyple-common-java-api:$keyple_version_2_0_0"
mockSamImplementation "org.eclipse.keyple:keyple-plugin-android-nfc-java-lib:$keyple_version_2_0_0_rc1"
mockSamImplementation "org.eclipse.keyple:keyple-util-java-lib:2.+"
mockSamImplementation "org.eclipse.keyple:keyple-common-java-api:2.0.+"
mockSamImplementation "org.eclipse.keyple:keyple-plugin-android-nfc-java-lib:$android_nfc_plugin_version"

coppernicImplementation "org.eclipse.keyple:keyple-plugin-cna-coppernic-cone2-java-lib:$coppernic_plugin_version"
coppernicImplementation "org.calypsonet.keyple:keyple-plugin-cna-coppernic-cone2-java-lib:$coppernic_plugin_version"

bluebirdImplementation "org.eclipse.keyple:keyple-plugin-cna-bluebird-specific-nfc-java-lib:$bluebird_plugin_version"
bluebirdImplementation "org.calypsonet.keyple:keyple-plugin-cna-bluebird-specific-nfc-java-lib:$bluebird_plugin_version"

flowbirdImplementation "org.eclipse.keyple:keyple-plugin-cna-flowbird-android-java-lib:$flowbird_plugin_version"
flowbirdImplementation "org.calypsonet.keyple:keyple-plugin-cna-flowbird-android-java-lib:$flowbird_plugin_version"

// Android Architecture components dependencies
implementation "androidx.lifecycle:lifecycle-runtime:$lifecycle_version"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
/*
* Copyright (c) 2021 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information
* regarding copyright ownership.
*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/

/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -25,18 +13,19 @@ package org.calypsonet.keyple.demo.validation.di

import android.app.Activity
import android.media.MediaPlayer
import javax.inject.Inject
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import org.calypsonet.keyple.demo.validation.R
import org.calypsonet.keyple.demo.validation.reader.IReaderRepository
import org.calypsonet.keyple.demo.validation.reader.PoReaderProtocol
import org.calypsonet.keyple.plugin.bluebird.BluebirdContactReader
import org.calypsonet.keyple.plugin.bluebird.BluebirdContactlessReader
import org.calypsonet.keyple.plugin.bluebird.BluebirdPlugin
import org.calypsonet.keyple.plugin.bluebird.BluebirdPluginFactoryProvider
import org.calypsonet.keyple.plugin.bluebird.BluebirdSupportContactlessProtocols
import org.calypsonet.terminal.reader.spi.CardReaderObservationExceptionHandlerSpi
import org.eclipse.keyple.bluebird.plugin.BluebirdContactReader
import org.eclipse.keyple.bluebird.plugin.BluebirdContactlessReader
import org.eclipse.keyple.bluebird.plugin.BluebirdPlugin
import org.eclipse.keyple.bluebird.plugin.BluebirdPluginFactoryProvider
import org.eclipse.keyple.bluebird.plugin.BluebirdSupportContactlessProtocols
import org.eclipse.keyple.core.service.KeyplePluginException
import org.eclipse.keyple.core.service.ObservableReader
import org.eclipse.keyple.core.service.Plugin
Expand All @@ -45,7 +34,6 @@ import org.eclipse.keyple.core.service.SmartCardServiceProvider
import org.eclipse.keyple.core.service.resource.spi.ReaderConfiguratorSpi
import org.eclipse.keyple.core.util.protocol.ContactCardCommonProtocol
import timber.log.Timber
import javax.inject.Inject

class BluebirdReaderRepositoryImpl @Inject constructor(
private val readerObservationExceptionHandler: CardReaderObservationExceptionHandlerSpi
Expand Down Expand Up @@ -195,4 +183,3 @@ class BluebirdReaderRepositoryImpl @Inject constructor(
}
}
}

Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
/*
* Copyright (c) 2021 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information
* regarding copyright ownership.
*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/

/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -14,28 +14,28 @@ package org.calypsonet.keyple.demo.validation.di
import android.app.Activity
import android.content.Context
import android.media.MediaPlayer
import javax.inject.Inject
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import org.calypsonet.keyple.demo.validation.R
import org.calypsonet.keyple.demo.validation.reader.IReaderRepository
import org.calypsonet.keyple.demo.validation.reader.PoReaderProtocol
import org.calypsonet.keyple.plugin.coppernic.Cone2ContactReader
import org.calypsonet.keyple.plugin.coppernic.Cone2ContactlessReader
import org.calypsonet.keyple.plugin.coppernic.Cone2Plugin
import org.calypsonet.keyple.plugin.coppernic.Cone2PluginFactory
import org.calypsonet.keyple.plugin.coppernic.Cone2PluginFactoryProvider
import org.calypsonet.keyple.plugin.coppernic.ParagonSupportedContactProtocols
import org.calypsonet.keyple.plugin.coppernic.ParagonSupportedContactlessProtocols
import org.calypsonet.terminal.reader.spi.CardReaderObservationExceptionHandlerSpi
import org.eclipse.keyple.coppernic.ask.plugin.Cone2ContactReader
import org.eclipse.keyple.coppernic.ask.plugin.Cone2ContactlessReader
import org.eclipse.keyple.coppernic.ask.plugin.Cone2Plugin
import org.eclipse.keyple.coppernic.ask.plugin.Cone2PluginFactory
import org.eclipse.keyple.coppernic.ask.plugin.Cone2PluginFactoryProvider
import org.eclipse.keyple.coppernic.ask.plugin.ParagonSupportedContactProtocols
import org.eclipse.keyple.coppernic.ask.plugin.ParagonSupportedContactlessProtocols
import org.eclipse.keyple.core.service.KeyplePluginException
import org.eclipse.keyple.core.service.ObservableReader
import org.eclipse.keyple.core.service.Plugin
import org.eclipse.keyple.core.service.Reader
import org.eclipse.keyple.core.service.SmartCardServiceProvider
import org.eclipse.keyple.core.service.resource.spi.ReaderConfiguratorSpi
import timber.log.Timber
import javax.inject.Inject

/**
* @author youssefamrani
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -13,31 +13,30 @@ package org.calypsonet.keyple.demo.validation.di

import android.app.Activity
import android.media.MediaPlayer
import javax.inject.Inject
import org.calypsonet.keyple.demo.validation.R
import org.calypsonet.keyple.demo.validation.reader.IReaderRepository
import org.calypsonet.keyple.demo.validation.reader.PoReaderProtocol
import org.calypsonet.keyple.plugin.famoco.AndroidFamocoPlugin
import org.calypsonet.keyple.plugin.famoco.AndroidFamocoPluginFactoryProvider
import org.calypsonet.keyple.plugin.famoco.AndroidFamocoReader
import org.calypsonet.keyple.plugin.famoco.utils.ContactCardCommonProtocols
import org.calypsonet.terminal.reader.spi.CardReaderObservationExceptionHandlerSpi
import org.eclipse.keyple.core.service.KeyplePluginException
import org.eclipse.keyple.core.service.Plugin
import org.eclipse.keyple.core.service.Reader
import org.eclipse.keyple.core.service.SmartCardServiceProvider
import org.eclipse.keyple.core.service.resource.spi.ReaderConfiguratorSpi
import org.eclipse.keyple.core.util.protocol.ContactlessCardCommonProtocol
import org.eclipse.keyple.famoco.se.plugin.AndroidFamocoPlugin
import org.eclipse.keyple.famoco.se.plugin.AndroidFamocoPluginFactoryProvider
import org.eclipse.keyple.famoco.se.plugin.AndroidFamocoReader
import org.eclipse.keyple.famoco.se.plugin.utils.ContactCardCommonProtocols
import org.eclipse.keyple.plugin.android.nfc.AndroidNfcPlugin
import org.eclipse.keyple.plugin.android.nfc.AndroidNfcPluginFactoryProvider
import org.eclipse.keyple.plugin.android.nfc.AndroidNfcReader
import timber.log.Timber
import javax.inject.Inject

/**
* @author youssefamrani
*/


class FamocoReaderRepositoryImpl @Inject constructor(private val readerObservationExceptionHandler: CardReaderObservationExceptionHandlerSpi) :
IReaderRepository {

Expand Down Expand Up @@ -91,20 +90,20 @@ class FamocoReaderRepositoryImpl @Inject constructor(private val readerObservati
}

override suspend fun initSamReaders(): List<Reader> {
if (samReaders.isNullOrEmpty()) {
val samPlugin =
SmartCardServiceProvider.getService().getPlugin(AndroidFamocoPlugin.PLUGIN_NAME)

if (samPlugin != null) {
val samReader = samPlugin.getReader(AndroidFamocoReader.READER_NAME)
samReader?.let {
it.activateProtocol(
getSamReaderProtocol(),
getSamReaderProtocol()
)

samReaders.add(it)
}
val samPlugin =
SmartCardServiceProvider.getService().getPlugin(AndroidFamocoPlugin.PLUGIN_NAME)

samReaders = mutableListOf()

if (samPlugin != null) {
val samReader = samPlugin.getReader(AndroidFamocoReader.READER_NAME)
samReader?.let {
it.activateProtocol(
getSamReaderProtocol(),
getSamReaderProtocol()
)

samReaders.add(it)
}
}

Expand Down Expand Up @@ -143,8 +142,11 @@ class FamocoReaderRepositoryImpl @Inject constructor(private val readerObservati
override fun clear() {
poReader?.deactivateProtocol(getContactlessIsoProtocol().readerProtocolName)

val samReader = getSamReader()
samReader?.deactivateProtocol(getSamReaderProtocol())
samReaders.forEach {
it.deactivateProtocol(
getSamReaderProtocol()
)
}

successMedia.stop()
successMedia.release()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
/*
* Copyright (c) 2021 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information
* regarding copyright ownership.
*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/

/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand All @@ -24,27 +12,27 @@
package org.calypsonet.keyple.demo.validation.di

import android.app.Activity
import javax.inject.Inject
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import org.calypsonet.keyple.demo.validation.reader.IReaderRepository
import org.calypsonet.keyple.demo.validation.reader.PoReaderProtocol
import org.calypsonet.keyple.plugin.flowbird.FlowbirdPlugin
import org.calypsonet.keyple.plugin.flowbird.FlowbirdPluginFactoryProvider
import org.calypsonet.keyple.plugin.flowbird.FlowbirdUiManager
import org.calypsonet.keyple.plugin.flowbird.contact.FlowbirdContactReader
import org.calypsonet.keyple.plugin.flowbird.contact.SamSlot
import org.calypsonet.keyple.plugin.flowbird.contactless.FlowbirdContactlessReader
import org.calypsonet.keyple.plugin.flowbird.contactless.FlowbirdSupportContactlessProtocols
import org.calypsonet.terminal.reader.spi.CardReaderObservationExceptionHandlerSpi
import org.eclipse.keyple.core.service.KeyplePluginException
import org.eclipse.keyple.core.service.ObservableReader
import org.eclipse.keyple.core.service.Plugin
import org.eclipse.keyple.core.service.Reader
import org.eclipse.keyple.core.service.SmartCardServiceProvider
import org.eclipse.keyple.core.service.resource.spi.ReaderConfiguratorSpi
import org.eclipse.keyple.flowbird.plugin.FlowbirdPlugin
import org.eclipse.keyple.flowbird.plugin.FlowbirdPluginFactoryProvider
import org.eclipse.keyple.flowbird.plugin.FlowbirdUiManager
import org.eclipse.keyple.flowbird.plugin.contact.FlowbirdContactReader
import org.eclipse.keyple.flowbird.plugin.contact.SamSlot
import org.eclipse.keyple.flowbird.plugin.contactless.FlowbirdContactlessReader
import org.eclipse.keyple.flowbird.plugin.contactless.FlowbirdSupportContactlessProtocols
import timber.log.Timber
import javax.inject.Inject

class FlowbirdReaderRepositoryImpl @Inject constructor(
private val readerObservationExceptionHandler: CardReaderObservationExceptionHandlerSpi
Expand Down Expand Up @@ -124,7 +112,6 @@ class FlowbirdReaderRepositoryImpl @Inject constructor(
return samReaders
}


override fun getSamReader(): Reader? {
return if (samReaders.isNotEmpty()) {
val filteredByName = samReaders.filter {
Expand Down Expand Up @@ -220,4 +207,3 @@ class FlowbirdReaderRepositoryImpl @Inject constructor(
const val SAM_READER_NAME_REGEX = ".*ContactReader_0"
}
}

Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
/*
* Copyright (c) 2021 Calypso Networks Association https://www.calypsonet-asso.org/
*
* See the NOTICE file(s) distributed with this work for additional information
* regarding copyright ownership.
*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/

/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2020 Calypso Networks Association https://www.calypsonet-asso.org/
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/
*
* See the NOTICE file(s) distributed with this work for additional information regarding copyright
* ownership.
Expand Down
Loading

0 comments on commit 770d262

Please sign in to comment.