api started
This commit is contained in:
parent
4d5f0fd233
commit
efa3677d69
4 changed files with 52 additions and 5 deletions
18
include/httpreceiver.h
Normal file
18
include/httpreceiver.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <include/api.h>
|
||||
#include <QObject>
|
||||
|
||||
namespace http {
|
||||
|
||||
#define HTTPReceiverInterfaceIID "bigsnitch.api.HTTPReceiverInterface/100"
|
||||
|
||||
class ReceiverInterface {
|
||||
|
||||
public:
|
||||
virtual ~ReceiverInterface() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Q_DECLARE_INTERFACE(http::ReceiverInterface, HTTPReceiverInterfaceIID)
|
||||
21
include/httpsender.h
Normal file
21
include/httpsender.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include <include/api.h>
|
||||
#include <QObject>
|
||||
|
||||
namespace http {
|
||||
|
||||
#define HTTPSenderInterfaceIID "bigsnitch.api.HTTPSenderInterface/100"
|
||||
|
||||
class SenderInterface {
|
||||
|
||||
public:
|
||||
virtual ~SenderInterface() = default;
|
||||
virtual int send(http::Request request);
|
||||
virtual bool received(int id);
|
||||
virtual std::optional<http::Response> receive(int id);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Q_DECLARE_INTERFACE(http::SenderInterface, HTTPSenderInterfaceIID)
|
||||
Loading…
Add table
Add a link
Reference in a new issue