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,46 @@
/*!
* (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
*/
#ifndef _WEB_CONNECTION_H
#define _WEB_CONNECTION_H
/*------------------------------- INCLUDES ----------------------------------*/
#include <string>
/*----------------------------- Dependencies --------------------------------*/
struct client;
struct uhttpd_ops;
struct ubus_context;
/*--------------------------------- CLASS ----------------------------------*/
class WebConnection {
public:
WebConnection (struct uhttpd_ops *an_ops, struct client *a_client);
virtual ~WebConnection (void);
int add_data (const char *a_data, int a_len);
struct client *get_client (void);
virtual void invoke (struct ubus_context *a_ctx);
bool should_be_removed (void);
protected:
struct uhttpd_ops *m_ops;
struct client *m_client;
std::string m_connection_data;
bool m_should_be_removed;
};
#endif /* _WEB_CONNECTION_H */