Raritan / Server Technology Xerus™ PDU JSON-RPC API: CardReaderManager.idl Source File

Raritan / Server Technology Xerus™ PDU JSON-RPC API

CardReaderManager.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright 2013 Raritan Inc. All rights reserved.
4 */
5
6 #ifndef __SMARTCARD_CARD_READER_MANAGER_IDL__
7 #define __SMARTCARD_CARD_READER_MANAGER_IDL__
8
9 #include <CardReader.idl>
10 #include <Event.idl>
11 #include <UserEvent.idl>
12
13 /** Card Reader Manager */
14 module smartcard {
15
16 /** Card Reader Manager Interface */
17 interface CardReaderManager {
18
19 /**
20 * Card Reader Settings
21 */
22 [sparse_in]
23 structure CardReaderSettings {
24 string name; ///< User-defined name
25 string description; ///< User-defined description
26 string cardFormat; ///< Card format, must be one of the values returned by
27 ///< getSupportedCardFormats(); use "RAW" for plain
28 ///< hexadecimal representation.
29 };
30
31 /**
32 * Card Reader base event
33 */
34 valueobject CardReaderEvent extends idl.Event {
35 CardReader cardReader; ///< Affected card reader
36 CardReader.MetaData metaData; ///< Metadata of affected card reader
37 };
38
39 /**
40 * Card Reader attached event
41 */
42 valueobject CardReaderAttachedEvent extends CardReaderEvent {};
43
44 /**
45 * Card Reader detached event
46 */
47 valueobject CardReaderDetachedEvent extends CardReaderEvent {};
48
49 /*
50 * Event: A card reader's settings have been changed
51 */
52 valueobject CardReaderSettingsChangedEvent extends event.UserEvent {
53 CardReader cardReader; ///< affected card reader
54 CardReaderSettings oldSettings; ///< Settings before change
55 CardReaderSettings newSettings; ///< Settings after change
56 string position; ///< Position of the card reader (see CardReader.MetaData)
57 };
58
59 /**
60 * Retrieve the list of connected card readers.
61 *
62 * @return Card Readers list
63 */
64 vector<CardReader> getCardReaders();
65
66 /**
67 * Get card reader for a specific id.
68 *
69 * @param readerId card reader id
70 *
71 * @return Card Reader with given id or null
72 */
73 CardReader getCardReaderById(in string readerId);
74
75 /**
76 * Set settings for a card reader.
77 *
78 * @param position position of card reader (see CardReader.MetaData)
79 * @param settings new settings for card reader
80 *
81 * @return NO_ERROR if OK
82 * @return ERR_INVALID_PARAMS if any setting is invalid
83 *
84 * @note The CardReaderSettings structure can be "sparse"; fields missing
85 * in the JSON representation will remain unchanged.
86 */
87 int setCardReaderSettings(in string position, in CardReaderSettings setting);
88
89 /**
90 * Get settings for all card readers.
91 *
92 * @return Map of settings by card reader position (see CardReader.MetaData)
93 */
94 map<string, CardReaderSettings> getAllCardReaderSettings();
95
96 /**
97 * Retrieve the list of supported card formats like "RAW", "H10301", etc.
98 *
99 * @return Card Formats list
100 */
101 vector<string> getSupportedCardFormats();
102 };
103
104 }
105
106 #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::getSupportedCardFormats
vector< string > getSupportedCardFormats()
Retrieve the list of supported card formats like "RAW", "H10301", etc.
smartcard::CardReaderManager::getCardReaders
vector< CardReader > getCardReaders()
Retrieve the list of connected card readers.
smartcard::CardReaderManager::getAllCardReaderSettings
map< string, CardReaderSettings > getAllCardReaderSettings()
Get settings for all card readers.
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