33 lines
745 B
C++
33 lines
745 B
C++
#pragma once
|
|
|
|
#include "include/api.h"
|
|
#include <QObject>
|
|
|
|
namespace http {
|
|
|
|
#define HTTPProxyInterfaceIID "bigsnitch.api.HTTPProxyInterface/100"
|
|
|
|
//! Interface for implementing proxies
|
|
/*!
|
|
Interface for implementing proxies
|
|
*/
|
|
class ProxyInterface {
|
|
|
|
public:
|
|
virtual ~ProxyInterface() = default;
|
|
//! called in a custom thread, may block.
|
|
virtual void process(std::string path) = 0;
|
|
//! returns, whether the proxy is currently connected
|
|
virtual bool connected() = 0;
|
|
//! disconnects the handle
|
|
virtual void disconnect() = 0;
|
|
// options/settings
|
|
signals:
|
|
void finished();
|
|
void error(QString err);
|
|
void message(http::Flow flow);
|
|
};
|
|
|
|
}
|
|
|
|
Q_DECLARE_INTERFACE(http::ProxyInterface, HTTPProxyInterfaceIID)
|