chromium/third_party/cros_system_api/dbus/cros-disks/dbus-constants.h

// Copyright 2015 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SYSTEM_API_DBUS_CROS_DISKS_DBUS_CONSTANTS_H_
#define SYSTEM_API_DBUS_CROS_DISKS_DBUS_CONSTANTS_H_

#include <ostream>

namespace cros_disks {

const char kCrosDisksInterface[] =;
const char kCrosDisksServicePath[] =;
const char kCrosDisksServiceName[] =;
const char kCrosDisksServiceError[] =;

// Methods.
const char kEnumerateAutoMountableDevices[] =;
const char kEnumerateDevices[] =;
const char kEnumerateMountEntries[] =;
const char kFormat[] =;
const char kSinglePartitionFormat[] =;
const char kGetDeviceProperties[] =;
const char kMount[] =;
const char kRename[] =;
const char kUnmount[] =;

// Signals.
const char kDeviceAdded[] =;
const char kDeviceScanned[] =;
const char kDeviceRemoved[] =;
const char kDiskAdded[] =;
const char kDiskChanged[] =;
const char kDiskRemoved[] =;
const char kFormatCompleted[] =;
const char kMountCompleted[] =;
const char kMountProgress[] =;
const char kRenameCompleted[] =;

// Properties.
// TODO(benchan): Drop unnecessary 'Device' / 'Drive' prefix as they were
// carried through old code base.
const char kDeviceFile[] =;
const char kDeviceIsDrive[] =;
const char kDeviceIsMediaAvailable[] =;
const char kDeviceIsMounted[] =;
const char kDeviceIsOnBootDevice[] =;
const char kDeviceIsOnRemovableDevice[] =;
const char kDeviceIsReadOnly[] =;
const char kDeviceIsVirtual[] =;
const char kDeviceMediaType[] =;
const char kDeviceMountPaths[] =;
const char kDevicePresentationHide[] =;
const char kDeviceSize[] =;
const char kDriveModel[] =;
const char kIsAutoMountable[] =;
const char kIdLabel[] =;
const char kIdUuid[] =;
const char kVendorId[] =;
const char kVendorName[] =;
const char kProductId[] =;
const char kProductName[] =;
const char kBusNumber[] =;
const char kDeviceNumber[] =;
const char kStorageDevicePath[] =;
const char kFileSystemType[] =;

// Format options.
const char kFormatLabelOption[] =;

// Device media type.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// See enum CrosDisksDeviceMediaType in tools/metrics/histograms/enums.xml.
enum class DeviceType {};

// Format error reported by cros-disks.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// See enum CrosDisksClientFormatError in tools/metrics/histograms/enums.xml.
enum class FormatError {};

// Mount or unmount error code.
//
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class MountError {};

// MountSourceType enum values are solely used by Chrome/CrosDisks in
// the MountCompleted signal, and currently not reported through UMA.
enum MountSourceType {};

// Partition error reported by cros-disks.
enum class PartitionError {};

// Rename error reported by cros-disks.
enum class RenameError {};

// Output operators for logging and debugging.

template <typename C>
std::basic_ostream<C>& operator<<(std::basic_ostream<C>& out,
                                  const DeviceType type) {}

template <typename C>
std::basic_ostream<C>& operator<<(std::basic_ostream<C>& out,
                                  const MountError error) {}

template <typename C>
std::basic_ostream<C>& operator<<(std::basic_ostream<C>& out,
                                  const RenameError error) {}

template <typename C>
std::basic_ostream<C>& operator<<(std::basic_ostream<C>& out,
                                  const FormatError error) {}

template <typename C>
std::basic_ostream<C>& operator<<(std::basic_ostream<C>& out,
                                  const PartitionError error) {}

}  // namespace cros_disks

#endif  // SYSTEM_API_DBUS_CROS_DISKS_DBUS_CONSTANTS_H_