Commit 6fa1485a authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1195 Expose GetDeviceDetails() via WebserviceDevice.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 838e5305
......@@ -28,7 +28,7 @@
class WebserviceDevice {
/**
* Returns a list of all known devices of the Request::GetGETUser()
* Returns a list of all known devices of the Request::GetGETUser().
*
* @access public
* @return array
......@@ -48,7 +48,21 @@ class WebserviceDevice {
}
/**
* Remove all state data for a device of the Request::GetGETUser()
* Returns the details of a given deviceid of the Request::GetGETUser().
*
* @access public
* @return ASDevice object
*/
public function GetDeviceDetails($deviceId) {
$deviceId = preg_replace("/[^A-Za-z0-9]/", "", $deviceId);
ZLog::Write(LOGLEVEL_INFO, sprintf("WebserviceDevice::GetDeviceDetails('%s'): getting device details from state of user '%s'", $deviceId, Request::GetGETUser()));
$user = Request::GetGETUser();
ZPush::GetTopCollector()->AnnounceInformation(sprintf("Retrieved details of device '%s'", $deviceId), true);
return ZPushAdmin::GetDeviceDetails($deviceId, $user);
}
/**
* Remove all state data for a device of the Request::GetGETUser().
*
* @param string $deviceId the device id
*
......@@ -70,7 +84,7 @@ class WebserviceDevice {
}
/**
* Marks a device of the Request::GetGETUser() to be remotely wiped
* Marks a device of the Request::GetGETUser() to be remotely wiped.
*
* @param string $deviceId the device id
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment