Loading...
Searching...
No Matches
KeypadManager.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2020 Raritan Inc. All rights reserved.
*/
#ifndef __SMARTLOCK_KEYPAD_MANAGER_IDL__
#define __SMARTLOCK_KEYPAD_MANAGER_IDL__
#include <Keypad.idl>
#include <Event.idl>
#include <UserEvent.idl>
/** Keypad Manager */
module smartlock {
/** Keypad Manager Interface */
interface KeypadManager {
/*
* Keypad setting
*/
structure KeypadSettings {
string name; ///< User-defined name
string description; ///< User-defined description
};
/**
* Keypad base event
*/
valueobject KeypadEvent extends idl.Event {
Keypad keypad; ///< Affected keypad
Keypad.MetaData metaData; ///< MetaData of affected keypad
};
/**
* Keypad attached event
*/
valueobject KeypadAttachedEvent extends KeypadEvent {};
/**
* Keypad detached event
*/
valueobject KeypadDetachedEvent extends KeypadEvent {};
/*
* Event: A keypad's settings have been changed
*/
valueobject KeypadSettingsChangedEvent extends event.UserEvent {
Keypad keypad; ///< affected keypad
KeypadSettings oldSettings; ///< Settings before change
KeypadSettings newSettings; ///< Settings after change
string position; ///< Position of the keypad (see Keypad.MetaData)
};
/**
* Retrieve the list of connected keypads.
*
* @return Keypads list
*/
vector<Keypad> getKeypads();
/**
* Get keypad for a specific id.
*
* @param keypadId keypad id
*
* @return Keypad with given id or null
*/
Keypad getKeypadById(in string keypadId);
/**
* Set settings for a keypad.
*
* @param position position of keypad (see Keypad.MetaData)
* @param settings new settings for keypad
*
* @return NO_ERROR if OK
* @return ERR_INVALID_PARAMS if any setting is invalid
*/
int setKeypadSettings(in string position, in KeypadSettings setting);
/**
* Get settings for all keypads.
*
* @return Map of settings by keypad position (see Keypad.MetaData)
*/
map<string, KeypadSettings> getAllKeypadSettings();
};
}
#endif /* __SMARTLOCK_KEYPAD_MANAGER_IDL__ */
smartlock::KeypadManager
Keypad Manager Interface.
Definition KeypadManager.idl:17
smartlock::KeypadManager::setKeypadSettings
int setKeypadSettings(in string position, in KeypadSettings setting)
Set settings for a keypad.
smartlock::KeypadManager::getKeypads
vector< Keypad > getKeypads()
Retrieve the list of connected keypads.
smartlock::KeypadManager::getKeypadById
Keypad getKeypadById(in string keypadId)
Get keypad for a specific id.
smartlock::KeypadManager::getAllKeypadSettings
map< string, KeypadSettings > getAllKeypadSettings()
Get settings for all keypads.
smartlock::Keypad
Keypad Interface.
Definition Keypad.idl:15
idl
Basic IDL definitions.
Definition Event.idl:10
smartlock
Keypad.
Definition DoorAccessControl.idl:13
idl::Event
Common base for all events.
Definition Event.idl:13
smartlock::KeypadManager::KeypadAttachedEvent
Keypad attached event.
Definition KeypadManager.idl:38
smartlock::KeypadManager::KeypadDetachedEvent
Keypad detached event.
Definition KeypadManager.idl:43
smartlock::KeypadManager::KeypadEvent
Keypad base event.
Definition KeypadManager.idl:30
smartlock::KeypadManager::KeypadEvent::metaData
Keypad::MetaData metaData
MetaData of affected keypad.
Definition KeypadManager.idl:32
smartlock::KeypadManager::KeypadEvent::keypad
Keypad keypad
Affected keypad.
Definition KeypadManager.idl:31
smartlock::KeypadManager::KeypadSettingsChangedEvent
Definition KeypadManager.idl:48
smartlock::KeypadManager::KeypadSettingsChangedEvent::oldSettings
KeypadSettings oldSettings
Settings before change.
Definition KeypadManager.idl:50
smartlock::KeypadManager::KeypadSettingsChangedEvent::newSettings
KeypadSettings newSettings
Settings after change.
Definition KeypadManager.idl:51
smartlock::KeypadManager::KeypadSettingsChangedEvent::keypad
Keypad keypad
affected keypad
Definition KeypadManager.idl:49
smartlock::KeypadManager::KeypadSettingsChangedEvent::position
string position
Position of the keypad (see Keypad::MetaData)
Definition KeypadManager.idl:52
smartlock::KeypadManager::KeypadSettings
Definition KeypadManager.idl:22
smartlock::KeypadManager::KeypadSettings::name
string name
User-defined name.
Definition KeypadManager.idl:23
smartlock::KeypadManager::KeypadSettings::description
string description
User-defined description.
Definition KeypadManager.idl:24
smartlock::Keypad::MetaData
Keypad Metadata.
Definition Keypad.idl:24