// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef DEVICE_HID_UDEV_COMMON_H_ #define DEVICE_HID_UDEV_COMMON_H_ #include #include "base/memory/scoped_ptr.h" namespace device { template void DiscardReturnType(T* arg) { func(arg); } template void DiscardReturnType(T* arg) { func(arg); } template struct Deleter { void operator()(T* enumerate) const { if (enumerate != NULL) func(enumerate); } }; typedef Deleter > UdevDeleter; typedef Deleter > UdevEnumerateDeleter; typedef Deleter > UdevDeviceDeleter; typedef Deleter > UdevMonitorDeleter; typedef scoped_ptr ScopedUdevPtr; typedef scoped_ptr ScopedUdevEnumeratePtr; typedef scoped_ptr ScopedUdevDevicePtr; typedef scoped_ptr ScopedUdevMonitorPtr; } // namespace device #endif // DEVICE_HID_UDEV_COMMON_H_