Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/scripts/prepare_doxygen.sh

This file was deleted.

48 changes: 6 additions & 42 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,14 @@
name: Build and test code
name: Build and Test code

on:
push:
branches:
- main
pull_request:

jobs:
build:

strategy:
matrix:
env:
- toolchain: "toolchain/gcc-linux.cmake"
runner: ubuntu-latest
generator: ""
- toolchain: "toolchain/clang-macos.cmake"
runner: macos-latest
generator: ""
- toolchain: "\"toolchain/clang-windows.cmake\""
runner: windows-latest
generator: "-G \"Visual Studio 17 2022\""

runs-on: ${{ matrix.env.runner }}

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install Linux reqs
if: ${{ matrix.env.runner == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y clang cmake cppcheck clang-format clang-tidy gcc pre-commit

- name: Install macOS reqs
if: ${{ matrix.env.runner == 'macos-latest' }}
run: |
brew install llvm cppcheck clang-format gcc pre-commit

- name: Build
run: |
cmake ${{ matrix.env.generator }} -B build -S . -DCMAKE_TOOLCHAIN_FILE=${{ matrix.env.toolchain }}
cmake --build build -j8

- name: Run Linux/macOS tests
if: ${{ matrix.env.runner == 'ubuntu-latest' || matrix.env.runner == 'macos-latest' }}
run: |
./build/bin/keypleservicecpplib_ut
jobs:
call-reusable-workflow:
uses: eclipse-keyple/keyple-actions/.github/workflows/reusable-cpp-build-and-test.yml@main # NOSONAR - Same organization, trusted source
with:
test_executable_name: 'build/bin/keypleservicecpplib_ut'
49 changes: 8 additions & 41 deletions .github/workflows/publish-doc-release.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,14 @@
name: Publish API documentation

name: Publish API documentation (release)
on:
release:
types: [published]

permissions:
checks: write

jobs:
publish-doc-release:
runs-on: ubuntu-latest
steps:
- name: Check out repository code from ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Make scripts executable
run: chmod +x ./.github/scripts/*.sh

- name: Check version
working-directory: .
run: ./.github/scripts/check_version.sh $(echo "${{ github.ref }}" | sed -e "s,^refs/tags/,,")

- name: Patch Doxyfile
working-directory: .
run: ./.github/scripts/patch_doxyfile.sh ${{ env.PROJECT_VERSION }}

- name: Generate project documentation with Doxygen
uses: eclipse-keyple/keyple-actions/doxygen@0c8593c4ed6b393642a1732af1fdef84d5e59540
with:
working-directory: .github/doxygen/
doxyfile-path: ./Doxyfile

- name: Prepare Doxygen doc page locally
working-directory: .
run: ./.github/scripts/prepare_doxygen.sh ${{ env.PROJECT_VERSION }}

- name: Deploy to doc branch
run: |
git config --global user.name "Eclipse Keypop Bot"
git config --global user.email "${{ github.repository }}-bot@eclipse.org"
cd ${{ github.event.repository.name }}
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git add .
git commit -m "docs: update ${{ github.event.inputs.version || github.ref_name }} documentation"
git push origin doc --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: eclipse-keyple/keyple-actions/.github/workflows/reusable-publish-doxygen.yml@main # NOSONAR - Same organization, trusted source
with:
version: ${{ github.event.inputs.version || github.ref_name }}
secrets: inherit # NOSONAR - Same organization, trusted source
48 changes: 6 additions & 42 deletions .github/workflows/publish-doc-snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,14 @@
name: Publish API documentation (snapshot)

on:
push:
branches:
- main
- master
- doxygen
workflow_dispatch:

permissions:
checks: write

jobs:
publish-doc-snapshot:
runs-on: ubuntu-latest
steps:
- name: Check out repository code from ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Make scripts executable
run: chmod +x ./.github/scripts/*.sh

- name: Check version
working-directory: .
run: ./.github/scripts/check_version.sh

- name: Patch Doxyfile
working-directory: .
run: ./.github/scripts/patch_doxyfile.sh ${{ env.PROJECT_VERSION }}

- name: Generate project documentation with Doxygen
uses: eclipse-keyple/keyple-actions/doxygen@0c8593c4ed6b393642a1732af1fdef84d5e59540
with:
working-directory: .github/doxygen/
doxyfile-path: ./Doxyfile

- name: Prepare Doxygen doc page locally
working-directory: .
run: ./.github/scripts/prepare_doxygen.sh ${{ env.PROJECT_VERSION }}

- name: Deploy to doc branch
run: |
git config --global user.name "Eclipse Keypop Bot"
git config --global user.email "${{ github.repository }}-bot@eclipse.org"
cd ${{ github.event.repository.name }}
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "docs: update snapshot documentation"
git push origin doc --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: eclipse-keyple/keyple-actions/.github/workflows/reusable-publish-doxygen.yml@main # NOSONAR - Same organization, trusted source
secrets: inherit # NOSONAR - Same organization, trusted source
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(KeypleServiceCppLib
VERSION 3.2.3
VERSION 3.3.5
LANGUAGES C CXX)

SET(CMAKE_PROJECT_VERSION_MAJOR "3")
SET(CMAKE_PROJECT_VERSION_MINOR "2")
SET(CMAKE_PROJECT_VERSION_PATCH "3")
SET(CMAKE_PROJECT_VERSION_MINOR "3")
SET(CMAKE_PROJECT_VERSION_PATCH "5")

SET(CMAKE_PROJECT_VERSION "${CMAKE_PROJECT_VERSION_MAJOR}.
${CMAKE_PROJECT_VERSION_MINOR}.
Expand Down
24 changes: 16 additions & 8 deletions include/keyple/core/service/AbstractReaderAdapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@
*/
const std::string& getPluginName() const;

/**
* Returns the {@link KeypleReaderExtension} that is reader-specific.
*
* <p>Note: the provided argument is used at compile time to check the type
* consistency.
*
* @param readerExtensionClass The specific class of the reader.
* @param <T> The type of the reader extension.
* @return A {@link KeypleReaderExtension}.
* @throw IllegalStateException If reader is no longer registered.
* @since 2.0.0
*/
std::shared_ptr<KeypleReaderExtension>
getExtension(const std::type_info& readerExtensionClass) const;
// FIXME? should be final?

Check warning on line 98 in include/keyple/core/service/AbstractReaderAdapter.hpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Take the required action to fix the issue indicated by this "FIXME" comment.

See more on https://sonarcloud.io/project/issues?id=eclipse-keyple_keyple-service-cpp-lib&issues=AZmwC15mIudJ71qQAHjN&open=AZmwC15mIudJ71qQAHjN&pullRequest=10

/**
* Performs a selection scenario following a card detection.
*
Expand Down Expand Up @@ -194,14 +210,6 @@
*/
const std::string& getName() const final;

/**
* {@inheritDoc}
*
* @since 2.0.0
*/
std::shared_ptr<KeypleReaderExtension>
getExtension(const std::type_info& readerExtensionClass) const;

/**
* {@inheritDoc}
*
Expand Down
11 changes: 9 additions & 2 deletions include/keyple/core/service/ApduResponseAdapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ class KEYPLESERVICE_API ApduResponseAdapter final : public ApduResponseApi {
*
* @since 2.0.0
*/
const std::vector<uint8_t> getDataOut() const override;
void setApdu(const std::vector<std::uint8_t>& apdu) override;

/**
* {@inheritDoc}
*
* @since 2.0.0
*/
std::vector<uint8_t> getDataOut() const override;

/**
* {@inheritDoc}
Expand All @@ -85,7 +92,7 @@ class KEYPLESERVICE_API ApduResponseAdapter final : public ApduResponseApi {
/**
*
*/
const std::vector<uint8_t> mApdu;
std::vector<uint8_t> mApdu;

/**
*
Expand Down
6 changes: 3 additions & 3 deletions include/keyple/core/service/InternalDto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ class KEYPLESERVICE_API InternalDto {
/**
*
*/
const std::shared_ptr<SmartCardSpi>
parse(const std::shared_ptr<CardSelectionResponseApi>
cardSelectionResponseApi) const override;
const std::shared_ptr<SmartCardSpi> parse(
const std::shared_ptr<CardSelectionResponseApi>
cardSelectionResponseApi) const override;

private:
/**
Expand Down
Loading
Loading