Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
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 */
14module smartcard {
15
16 /** Card Reader Manager Interface */
18
19 /**
20 * Card Reader Settings
21 */
22 [sparse_in]
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 */
43
44 /**
45 * Card Reader detached event
46 */
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__ */
Card Reader Manager Interface.
int setCardReaderSettings(in string position, in CardReaderSettings setting)
Set settings for a card reader.
CardReader getCardReaderById(in string readerId)
Get card reader for a specific id.
map< string, CardReaderSettings > getAllCardReaderSettings()
Get settings for all card readers.
vector< CardReader > getCardReaders()
Retrieve the list of connected card readers.
vector< string > getSupportedCardFormats()
Retrieve the list of supported card formats like "RAW", "H10301", etc.
Card Reader Interface.
Definition: CardReader.idl:15
Basic IDL definitions.
Definition: Event.idl:10
Card Reader.
Definition: CardReader.idl:12
Common base for all events.
Definition: Event.idl:13
CardReader::MetaData metaData
Metadata of affected card reader.
CardReader cardReader
Affected card reader.
CardReaderSettings oldSettings
Settings before change.
string position
Position of the card reader (see CardReader::MetaData)
string cardFormat
Card format, must be one of the values returned by getSupportedCardFormats(); use "RAW" for plain hex...