blob: a62661ede64d47f7f9f197a88df6d954255bdd8b [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
Ben Chan5ccd9fe2013-11-13 18:28:27 -08005#include "cros-disks/device_event.h"
Ben Chan6e726922011-06-28 15:54:32 -07006
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:
Ben Chan6e726922011-06-28 15:54:32 -070016 case kDiskChanged:
17 case kDiskRemoved:
18 return true;
19 default:
20 return false;
21 }
22}
23
24} // namespace cros_disks