Loading...
Searching...
No Matches
CardReaderManager.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2013 Raritan Inc. All rights reserved.
*/
#ifndef __SMARTCARD_CARD_READER_MANAGER_IDL__
#define __SMARTCARD_CARD_READER_MANAGER_IDL__
#include <CardReader.idl>
#include <Event.idl>
#include <UserEvent.idl>
/** Card Reader Manager */
module smartcard {
/** Card Reader Manager Interface */
interface CardReaderManager {
/**
* Card Reader Settings
*/
[sparse_in]
structure CardReaderSettings {
string name; ///< User-defined name
string description; ///< User-defined description
string cardFormat; ///< Card format, must be one of the values returned by
///< getSupportedCardFormats(); use "RAW" for plain
///< hexadecimal representation.
};
/**
* Card Reader base event
*/
valueobject CardReaderEvent extends idl.Event {
CardReader cardReader; ///< Affected card reader
CardReader.MetaData metaData; ///< Metadata of affected card reader
};
/**
* Card Reader attached event
*/
valueobject CardReaderAttachedEvent extends CardReaderEvent {};
/**
* Card Reader detached event
*/
valueobject CardReaderDetachedEvent extends CardReaderEvent {};
/*
* Event: A card reader's settings have been changed
*/
valueobject CardReaderSettingsChangedEvent extends event.UserEvent {
CardReader cardReader; ///< affected card reader
CardReaderSettings oldSettings; ///< Settings before change
CardReaderSettings newSettings; ///< Settings after change
string position; ///< Position of the card reader (see CardReader.MetaData)
};
/**
* Retrieve the list of connected card readers.
*
* @return Card Readers list
*/
vector<CardReader> getCardReaders();
/**
* Get card reader for a specific id.
*
* @param readerId card reader id
*
* @return Card Reader with given id or null
*/
CardReader getCardReaderById(in string readerId);
/**
* Set settings for a card reader.
*
* @param position position of card reader (see CardReader.MetaData)
* @param settings new settings for card reader
*
* @return NO_ERROR if OK
* @return ERR_INVALID_PARAMS if any setting is invalid
*
* @note The CardReaderSettings structure can be "sparse"; fields missing
* in the JSON representation will remain unchanged.
*/
int setCardReaderSettings(in string position, in CardReaderSettings setting);
/**
* Get settings for all card readers.
*
* @return Map of settings by card reader position (see CardReader.MetaData)
*/
map<string, CardReaderSettings> getAllCardReaderSettings();
/**
* Retrieve the list of supported card formats like "RAW", "H10301", etc.
*
* @return Card Formats list
*/
vector<string> getSupportedCardFormats();
};
}
#endif /* __SMARTCARD_CARD_READER_MANAGER_IDL__ */
smartcard::CardReaderManager
Card Reader Manager Interface.
Definition CardReaderManager.idl:17
smartcard::CardReaderManager::setCardReaderSettings
int setCardReaderSettings(in string position, in CardReaderSettings setting)
Set settings for a card reader.
smartcard::CardReaderManager::getCardReaderById
CardReader getCardReaderById(in string readerId)
Get card reader for a specific id.
smartcard::CardReaderManager::getAllCardReaderSettings
map< string, CardReaderSettings > getAllCardReaderSettings()
Get settings for all card readers.
smartcard::CardReaderManager::getCardReaders
vector< CardReader > getCardReaders()
Retrieve the list of connected card readers.
smartcard::CardReaderManager::getSupportedCardFormats
vector< string > getSupportedCardFormats()
Retrieve the list of supported card formats like "RAW", "H10301", etc.
smartcard::CardReader
Card Reader Interface.
Definition CardReader.idl:15
idl
Basic IDL definitions.
Definition Event.idl:10
smartcard
Card Reader.
Definition CardReader.idl:12
idl::Event
Common base for all events.
Definition Event.idl:13
smartcard::CardReaderManager::CardReaderAttachedEvent
Card Reader attached event.
Definition CardReaderManager.idl:42
smartcard::CardReaderManager::CardReaderDetachedEvent
Card Reader detached event.
Definition CardReaderManager.idl:47
smartcard::CardReaderManager::CardReaderEvent
Card Reader base event.
Definition CardReaderManager.idl:34
smartcard::CardReaderManager::CardReaderEvent::metaData
CardReader::MetaData metaData
Metadata of affected card reader.
Definition CardReaderManager.idl:36
smartcard::CardReaderManager::CardReaderEvent::cardReader
CardReader cardReader
Affected card reader.
Definition CardReaderManager.idl:35
smartcard::CardReaderManager::CardReaderSettingsChangedEvent
Definition CardReaderManager.idl:52
smartcard::CardReaderManager::CardReaderSettingsChangedEvent::oldSettings
CardReaderSettings oldSettings
Settings before change.
Definition CardReaderManager.idl:54
smartcard::CardReaderManager::CardReaderSettingsChangedEvent::cardReader
CardReader cardReader
affected card reader
Definition CardReaderManager.idl:53
smartcard::CardReaderManager::CardReaderSettingsChangedEvent::position
string position
Position of the card reader (see CardReader::MetaData)
Definition CardReaderManager.idl:56
smartcard::CardReaderManager::CardReaderSettingsChangedEvent::newSettings
CardReaderSettings newSettings
Settings after change.
Definition CardReaderManager.idl:55
smartcard::CardReaderManager::CardReaderSettings
Card Reader Settings.
Definition CardReaderManager.idl:23
smartcard::CardReaderManager::CardReaderSettings::name
string name
User-defined name.
Definition CardReaderManager.idl:24
smartcard::CardReaderManager::CardReaderSettings::description
string description
User-defined description.
Definition CardReaderManager.idl:25
smartcard::CardReaderManager::CardReaderSettings::cardFormat
string cardFormat
Card format, must be one of the values returned by getSupportedCardFormats(); use "RAW" for plain hex...
Definition CardReaderManager.idl:26
smartcard::CardReader::MetaData
Reader Metadata.
Definition CardReader.idl:24