Ningyuan Wang | db805e2 | 2015-11-20 14:08:47 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2015 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | #ifndef DHCP_CLIENT_EVENT_DISPATCHER_INTERFACE_H_ |
| 18 | #define DHCP_CLIENT_EVENT_DISPATCHER_INTERFACE_H_ |
| 19 | |
Ningyuan Wang | b683602 | 2015-12-02 14:39:01 -0800 | [diff] [blame] | 20 | #include <base/callback.h> |
| 21 | |
Ningyuan Wang | db805e2 | 2015-11-20 14:08:47 -0800 | [diff] [blame] | 22 | namespace dhcp_client { |
| 23 | |
| 24 | // Abstract class for dispatching tasks. |
| 25 | class EventDispatcherInterface { |
| 26 | public: |
| 27 | virtual ~EventDispatcherInterface() {} |
| 28 | |
| 29 | virtual bool PostTask(const base::Closure& task) = 0; |
| 30 | virtual bool PostDelayedTask(const base::Closure& task, |
| 31 | int64_t delay_ms) = 0; |
| 32 | }; |
| 33 | |
| 34 | } // namespace dhcp_client |
| 35 | |
| 36 | #endif // DHCP_CLIENT_EVENT_DISPATCHER_INTERFACE_H_ |