diff options
author | Kevin Harwell <kharwell@digium.com> | 2013-11-23 17:48:28 +0000 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2013-11-23 17:48:28 +0000 |
commit | ed483779946553e2ec42472c6b665b86dcb07066 (patch) | |
tree | 954ae85065f670f111954e36e5bd77d4f271778a /include/asterisk/devicestate.h | |
parent | 05cbf8df9b2ea0b41e049698b9f51ee4365ceab0 (diff) |
ARI: Implement device state API
Created a data model and implemented functionality for an ARI device state
resource. The following operations have been added that allow a user to
manipulate an ARI controlled device:
Create/Change the state of an ARI controlled device
PUT /deviceStates/{deviceName}&{deviceState}
Retrieve all ARI controlled devices
GET /deviceStates
Retrieve the current state of a device
GET /deviceStates/{deviceName}
Destroy a device-state controlled by ARI
DELETE /deviceStates/{deviceName}
The ARI controlled device must begin with 'Stasis:'. An example controlled
device name would be Stasis:Example. A 'DeviceStateChanged' event has also
been added so that an application can subscribe and receive device change
events. Any device state, ARI controlled or not, can be subscribed to.
While adding the event, the underlying subscription control mechanism was
refactored so that all current and future resource subscriptions would be
the same. Each event resource must now register itself in order to be able
to properly handle [un]subscribes.
(issue ASTERISK-22838)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3025/
........
Merged revisions 403134 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/devicestate.h')
-rw-r--r-- | include/asterisk/devicestate.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asterisk/devicestate.h b/include/asterisk/devicestate.h index a3267387f..565e01341 100644 --- a/include/asterisk/devicestate.h +++ b/include/asterisk/devicestate.h @@ -325,6 +325,15 @@ struct stasis_cache *ast_device_state_cache(void); struct stasis_message_type *ast_device_state_message_type(void); /*! + * \brief Clear the device from the stasis cache. + * \param The device to clear + * \retval 0 if successful + * \retval -1 nothing to clear + * \since 12 + */ +int ast_device_state_clear_cache(const char *device); + +/*! * \brief Initialize the device state core * \retval 0 Success * \retval -1 Failure |