import rest client

This commit is contained in:
jbnadal
2018-04-13 18:01:58 +02:00
parent 38ba93805b
commit 480c1a6002
33 changed files with 3759 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
/*!
* (C) Copyright 2003-2017 Awox SA. All rights reserved.
* This work contains confidential trade secrets of Awox.
* Use, examination, copying, transfer and disclosure to others
* are prohibited, except with the express written agreement of Awox.
*
* @Author: Awox
* @Date: 23/06/2017
*/
/*------------------------------- INCLUDES ----------------------------------*/
#include "core/web-connection.h"
#include "core/web-controller.h"
/*! ----------------------------------------------------------------------------
* @fn WebController
*
* @brief constructor of the web controller object.
*/
WebController::WebController (const std::string &a_path) :
m_path(a_path)
{
}
/*! ----------------------------------------------------------------------------
* @fn ~WebController
*
* @brief destructor of the web controller object.
*/
WebController::~WebController (void)
{
}
/*! ----------------------------------------------------------------------------
* @fn set_name
*
* @brief set the name of the controller
*/
void WebController::set_name (const std::string &a_name)
{
m_name = a_name;
}
/*! ----------------------------------------------------------------------------
* @fn get_name
*
* @brief return the name of the controller.
*/
const std::string &WebController::get_name (void)
{
return m_name;
}
/*! ----------------------------------------------------------------------------
* @fn get_path
*
* @brief return the model path of the controller.
*/
std::string WebController::get_path (void)
{
return m_path;
}
/*! ----------------------------------------------------------------------------
* @fn new_connection
*
* @brief return a new connection object.
*/
WebConnection *WebController::new_connection (struct uhttpd_ops *an_ops, struct client *a_client, const std::string &a_parameters)
{
return new WebConnection(an_ops, a_client);
}