blob: fddf469188636554db27371fb7f5a1876bf679b3 [file] [log] [blame]
Ben Chan6e726922011-06-28 15:54:32 -07001// Copyright (c) 2011 The Chromium OS 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#include "cros-disks/device-event.h"
6
7namespace cros_disks {
8
Ben Chan89cf29e2011-08-10 13:11:05 -07009bool DeviceEvent::operator==(const DeviceEvent& event) const {
10 return event.event_type == event_type && event.device_path == device_path;
11}
12
Ben Chan6e726922011-06-28 15:54:32 -070013bool DeviceEvent::IsDiskEvent() const {
14 switch (event_type) {
15 case kDiskAdded:
16 case kDiskAddedAfterRemoved:
17 case kDiskChanged:
18 case kDiskRemoved:
19 return true;
20 default:
21 return false;
22 }
23}
24
25} // namespace cros_disks