QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_CORE_QUIC_EPOLL_ALARM_FACTORY_H_ |
| 6 | #define QUICHE_QUIC_CORE_QUIC_EPOLL_ALARM_FACTORY_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/core/quic_alarm.h" |
| 9 | #include "net/third_party/quiche/src/quic/core/quic_alarm_factory.h" |
| 10 | #include "net/third_party/quiche/src/quic/core/quic_one_block_arena.h" |
| 11 | #include "net/third_party/quiche/src/quic/platform/api/quic_epoll.h" |
| 12 | |
| 13 | namespace quic { |
| 14 | |
| 15 | // Creates alarms that use the supplied EpollServer for timing and firing. |
| 16 | class QuicEpollAlarmFactory : public QuicAlarmFactory { |
| 17 | public: |
| 18 | explicit QuicEpollAlarmFactory(QuicEpollServer* eps); |
| 19 | QuicEpollAlarmFactory(const QuicEpollAlarmFactory&) = delete; |
| 20 | QuicEpollAlarmFactory& operator=(const QuicEpollAlarmFactory&) = delete; |
| 21 | ~QuicEpollAlarmFactory() override; |
| 22 | |
| 23 | // QuicAlarmFactory interface. |
| 24 | QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override; |
| 25 | QuicArenaScopedPtr<QuicAlarm> CreateAlarm( |
| 26 | QuicArenaScopedPtr<QuicAlarm::Delegate> delegate, |
| 27 | QuicConnectionArena* arena) override; |
| 28 | |
| 29 | private: |
| 30 | QuicEpollServer* epoll_server_; // Not owned. |
| 31 | }; |
| 32 | |
| 33 | } // namespace quic |
| 34 | |
| 35 | #endif // QUICHE_QUIC_CORE_QUIC_EPOLL_ALARM_FACTORY_H_ |