forked from dresden-elektronik/deconz-rest-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest_devices.h
47 lines (35 loc) · 1.11 KB
/
rest_devices.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Copyright (c) 2013-2021 dresden elektronik ingenieurtechnik gmbh.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
*/
#ifndef REST_DEVICES_H
#define REST_DEVICES_H
#include <QObject>
class DeRestPluginPrivate;
class ApiRequest;
class ApiResponse;
/*! \class RestDevices
REST-API endpoint for devices.
*/
class RestDevices : public QObject
{
Q_OBJECT
public:
explicit RestDevices(QObject *parent = nullptr);
int handleApi(const ApiRequest &req, ApiResponse &rsp);
bool deleteDevice(quint64 extAddr);
private:
int getAllDevices(const ApiRequest &req, ApiResponse &rsp);
int getDevice(const ApiRequest &req, ApiResponse &rsp);
int putDeviceInstallCode(const ApiRequest &req, ApiResponse &rsp);
DeRestPluginPrivate *plugin;
};
// Resource Introspection (RIS)
int RIS_GetDeviceIntrospect(const ApiRequest &req, ApiResponse &rsp);
int RIS_GetDeviceItemIntrospect(const ApiRequest &req, ApiResponse &rsp);
#endif // REST_DEVICES_H