| 1 | #ifndef TGCALLS_DIRECT_CONNECTION_CHANNEL_H |
| 2 | #define TGCALLS_DIRECT_CONNECTION_CHANNEL_H |
| 3 | |
| 4 | #include <functional> |
| 5 | #include <memory> |
| 6 | #include <vector> |
| 7 | |
| 8 | namespace tgcalls { |
| 9 | |
| 10 | class DirectConnectionChannel { |
| 11 | public: |
| 12 | virtual ~DirectConnectionChannel() = default; |
| 13 | |
| 14 | virtual std::vector<uint8_t> addOnIncomingPacket(std::function<void(std::shared_ptr<std::vector<uint8_t>>)> &&) = 0; |
| 15 | virtual void removeOnIncomingPacket(std::vector<uint8_t> &token) = 0; |
| 16 | virtual void sendPacket(std::unique_ptr<std::vector<uint8_t>> &&packet) = 0; |
| 17 | }; |
| 18 | |
| 19 | } // namespace tgcalls |
| 20 | |
| 21 | #endif |
| 22 | |