import rest client
This commit is contained in:
46
src/plugins/uhttpd/uhttpd-rest-api/core/web-connection.h
Normal file
46
src/plugins/uhttpd/uhttpd-rest-api/core/web-connection.h
Normal 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 */
|
||||
Reference in New Issue
Block a user