blob: 1d8e15dbcec1140da0f00ab7caca7df746154306 [file] [log] [blame]
Ningyuan Wangdb805e22015-11-20 14:08:47 -08001//
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 Wangb6836022015-12-02 14:39:01 -080020#include <base/callback.h>
21
Ningyuan Wangdb805e22015-11-20 14:08:47 -080022namespace dhcp_client {
23
24// Abstract class for dispatching tasks.
25class 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_