Leosac  0.7.0
OpenSourceAccessControl
CRUDHandler.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2017 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
21 
22 namespace Leosac
23 {
24 namespace Module
25 {
26 namespace Piface
27 {
35 {
36  public:
38 
41 
42  std::vector<ActionActionParam>
43  required_permission(Verb verb, const WebSockAPI::json &req) const override;
44 
45  boost::optional<WebSockAPI::json>
46  create_impl(const WebSockAPI::json &req) override;
47 
48  boost::optional<WebSockAPI::json>
49  read_impl(const WebSockAPI::json &req) override;
50 
51  boost::optional<WebSockAPI::json>
52  update_impl(const WebSockAPI::json &req) override;
53 
54  boost::optional<WebSockAPI::json>
55  delete_impl(const WebSockAPI::json &req) override;
56 };
57 }
58 }
59 }
std::vector< ActionActionParam > required_permission(Verb verb, const WebSockAPI::json &req) const override
Definition: CRUDHandler.cpp:37
boost::optional< WebSockAPI::json > create_impl(const WebSockAPI::json &req) override
Definition: CRUDHandler.cpp:73
This is the header file for a generated source file, GitSHA1.cpp.
static WebSockAPI::CRUDResourceHandlerUPtr instanciate(WebSockAPI::RequestContext)
std::unique_ptr< CRUDResourceHandler > CRUDResourceHandlerUPtr
Definition: WebSockFwd.hpp:39
CRUD Handler for GPIO backed by Piface module.
Definition: CRUDHandler.hpp:34
boost::optional< WebSockAPI::json > read_impl(const WebSockAPI::json &req) override
Definition: CRUDHandler.cpp:99
boost::optional< WebSockAPI::json > update_impl(const WebSockAPI::json &req) override
boost::optional< WebSockAPI::json > delete_impl(const WebSockAPI::json &req) override
CRUDHandler(const WebSockAPI::RequestContext &ctx)
Base CRUD handler for use within the websocket module.
Holds valuable pointer to provide context to a request.