Home | History | Annotate | Download | only in dbus
      1 // Copyright (c) 2012 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 #ifndef SYSTEM_API_DBUS_SERVICE_CONSTANTS_H_
      6 #define SYSTEM_API_DBUS_SERVICE_CONSTANTS_H_
      7 
      8 #include <stdint.h>  // for uint32_t
      9 
     10 // We use relative includes here to make this compatible with both the
     11 // Chromium OS and Chromium environment.
     12 #include "apmanager/dbus-constants.h"
     13 #include "cros-disks/dbus-constants.h"
     14 #include "cryptohome/dbus-constants.h"
     15 #include "debugd/dbus-constants.h"
     16 #include "login_manager/dbus-constants.h"
     17 #include "lorgnette/dbus-constants.h"
     18 #include "permission_broker/dbus-constants.h"
     19 #include "power_manager/dbus-constants.h"
     20 #include "shill/dbus-constants.h"
     21 #include "update_engine/dbus-constants.h"
     22 
     23 namespace dbus {
     24 const char kDBusInterface[] = "org.freedesktop.DBus";
     25 const char kDBusServiceName[] = "org.freedesktop.DBus";
     26 const char kDBusServicePath[] = "/org/freedesktop/DBus";
     27 
     28 // Object Manager interface
     29 const char kDBusObjectManagerInterface[] = "org.freedesktop.DBus.ObjectManager";
     30 // Methods
     31 const char kDBusObjectManagerGetManagedObjects[] = "GetManagedObjects";
     32 // Signals
     33 const char kDBusObjectManagerInterfacesAddedSignal[] = "InterfacesAdded";
     34 const char kDBusObjectManagerInterfacesRemovedSignal[] = "InterfacesRemoved";
     35 
     36 // Properties interface
     37 const char kDBusPropertiesInterface[] = "org.freedesktop.DBus.Properties";
     38 // Methods
     39 const char kDBusPropertiesGet[] = "Get";
     40 const char kDBusPropertiesSet[] = "Set";
     41 const char kDBusPropertiesGetAll[] = "GetAll";
     42 // Signals
     43 const char kDBusPropertiesChangedSignal[] = "PropertiesChanged";
     44 }  // namespace dbus
     45 
     46 namespace imageburn {
     47 const char kImageBurnServiceName[] = "org.chromium.ImageBurner";
     48 const char kImageBurnServicePath[] = "/org/chromium/ImageBurner";
     49 const char kImageBurnServiceInterface[] = "org.chromium.ImageBurnerInterface";
     50 // Methods
     51 const char kBurnImage[] = "BurnImage";
     52 // Signals
     53 const char kSignalBurnFinishedName[] = "burn_finished";
     54 const char kSignalBurnUpdateName[] = "burn_progress_update";
     55 }  // namespace imageburn
     56 
     57 namespace speech_synthesis {
     58 const char kSpeechSynthesizerInterface[] =
     59     "org.chromium.SpeechSynthesizerInterface";
     60 const char kSpeechSynthesizerServicePath[] = "/org/chromium/SpeechSynthesizer";
     61 const char kSpeechSynthesizerServiceName[] = "org.chromium.SpeechSynthesizer";
     62 // Methods
     63 const char kSpeak[] = "Speak";
     64 const char kStop[] = "Stop";
     65 const char kIsSpeaking[] = "IsSpeaking";
     66 const char kShutdown[] = "Shutdown";
     67 }  // namespace speech_synthesis
     68 
     69 namespace chromium {
     70 const char kChromiumInterface[] = "org.chromium.Chromium";
     71 // Text-to-speech service signals.
     72 const char kTTSReadySignal[] = "TTSReady";
     73 const char kTTSFailedSignal[] = "TTSFailed";
     74 }  // namespace chromium
     75 
     76 namespace chromeos {
     77 const char kLibCrosServiceName[] = "org.chromium.LibCrosService";
     78 const char kLibCrosServicePath[] = "/org/chromium/LibCrosService";
     79 const char kLibCrosServiceInterface[] = "org.chromium.LibCrosServiceInterface";
     80 // Methods
     81 const char kResolveNetworkProxy[] = "ResolveNetworkProxy";
     82 const char kCheckLiveness[] = "CheckLiveness";
     83 const char kLockScreen[] = "LockScreen";
     84 const char kSetDisplayPower[] = "SetDisplayPower";
     85 const char kSetDisplaySoftwareDimming[] = "SetDisplaySoftwareDimming";
     86 const char kTakeDisplayOwnership[] = "TakeDisplayOwnership";
     87 const char kReleaseDisplayOwnership[] = "ReleaseDisplayOwnership";
     88 // Values
     89 enum DisplayPowerState {
     90   DISPLAY_POWER_ALL_ON = 0,
     91   DISPLAY_POWER_ALL_OFF = 1,
     92   DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON = 2,
     93   DISPLAY_POWER_INTERNAL_ON_EXTERNAL_OFF = 3,
     94 };
     95 }  // namespace chromeos
     96 
     97 namespace cromo {
     98 // cromo D-Bus service identifiers
     99 const char kCromoServiceName[] = "org.chromium.ModemManager";
    100 const char kCromoServicePath[] = "/org/chromium/ModemManager";
    101 
    102 // cromo D-Bus interfaces
    103 const char kModemInterface[] = "org.freedesktop.ModemManager.Modem";
    104 const char kModemSimpleInterface[] =
    105     "org.freedesktop.ModemManager.Modem.Simple";
    106 const char kModemCdmaInterface[] = "org.freedesktop.ModemManager.Modem.Cdma";
    107 const char kModemGsmInterface[] = "org.freedesktop.ModemManager.Modem.Gsm";
    108 const char kModemGsmCardInterface[] =
    109     "org.freedesktop.ModemManager.Modem.Gsm.Card";
    110 const char kModemGsmNetworkInterface[] =
    111     "org.freedesktop.ModemManager.Modem.Gsm.Network";
    112 const char kModemGobiInterface[] = "org.chromium.ModemManager.Modem.Gobi";
    113 }  // namespace cromo
    114 
    115 namespace modemmanager {
    116 // ModemManager D-Bus service identifiers
    117 const char kModemManagerSMSInterface[] =
    118     "org.freedesktop.ModemManager.Modem.Gsm.SMS";
    119 
    120 // ModemManager function names.
    121 const char kSMSGetFunction[] = "Get";
    122 const char kSMSDeleteFunction[] = "Delete";
    123 const char kSMSListFunction[] = "List";
    124 
    125 // ModemManager monitored signals
    126 const char kSMSReceivedSignal[] = "SmsReceived";
    127 
    128 // ModemManager1 interfaces and signals
    129 // The canonical source for these constants is:
    130 //   /usr/include/ModemManager/ModemManager-names.h
    131 const char kModemManager1ServiceName[] = "org.freedesktop.ModemManager1";
    132 const char kModemManager1ServicePath[] = "/org/freedesktop/ModemManager1";
    133 const char kModemManager1MessagingInterface[] =
    134     "org.freedesktop.ModemManager1.Modem.Messaging";
    135 const char kModemManager1SmsInterface[] =
    136     "org.freedesktop.ModemManager1.Sms";
    137 const char kSMSAddedSignal[] = "Added";
    138 }  // namespace modemmanager
    139 
    140 namespace wimax_manager {
    141 // WiMaxManager D-Bus service identifiers
    142 const char kWiMaxManagerServiceName[] = "org.chromium.WiMaxManager";
    143 const char kWiMaxManagerServicePath[] = "/org/chromium/WiMaxManager";
    144 const char kWiMaxManagerServiceError[] = "org.chromium.WiMaxManager.Error";
    145 const char kWiMaxManagerInterface[] = "org.chromium.WiMaxManager";
    146 const char kWiMaxManagerDeviceInterface[] = "org.chromium.WiMaxManager.Device";
    147 const char kWiMaxManagerNetworkInterface[] =
    148     "org.chromium.WiMaxManager.Network";
    149 const char kDeviceObjectPathPrefix[] = "/org/chromium/WiMaxManager/Device/";
    150 const char kNetworkObjectPathPrefix[] = "/org/chromium/WiMaxManager/Network/";
    151 const char kDevicesProperty[] = "Devices";
    152 const char kNetworksProperty[] = "Networks";
    153 const char kEAPAnonymousIdentity[] = "EAPAnonymousIdentity";
    154 const char kEAPUserIdentity[] = "EAPUserIdentity";
    155 const char kEAPUserPassword[] = "EAPUserPassword";
    156 
    157 enum DeviceStatus {
    158   kDeviceStatusUninitialized,
    159   kDeviceStatusDisabled,
    160   kDeviceStatusReady,
    161   kDeviceStatusScanning,
    162   kDeviceStatusConnecting,
    163   kDeviceStatusConnected
    164 };
    165 }  // namespace wimax_manager
    166 
    167 namespace bluetooth_plugin {
    168 // Service identifiers for the plugin interface added to the /org/bluez object.
    169 const char kBluetoothPluginServiceName[] = "org.bluez";
    170 const char kBluetoothPluginInterface[] = "org.chromium.Bluetooth";
    171 
    172 // Bluetooth plugin properties.
    173 const char kSupportsLEServices[] = "SupportsLEServices";
    174 const char kSupportsConnInfo[] = "SupportsConnInfo";
    175 }  // namespace bluetooth_plugin
    176 
    177 namespace bluetooth_plugin_device {
    178 // Service identifiers for the plugin interface added to Bluetooth Device
    179 // objects.
    180 const char kBluetoothPluginServiceName[] = "org.bluez";
    181 const char kBluetoothPluginInterface[] = "org.chromium.BluetoothDevice";
    182 
    183 // Bluetooth Device plugin methods.
    184 const char kGetConnInfo[] = "GetConnInfo";
    185 }  // namespace bluetooth_plugin_device
    186 
    187 namespace bluetooth_adapter {
    188 // Bluetooth Adapter service identifiers.
    189 const char kBluetoothAdapterServiceName[] = "org.bluez";
    190 const char kBluetoothAdapterInterface[] = "org.bluez.Adapter1";
    191 
    192 // Bluetooth Adapter methods.
    193 const char kStartDiscovery[] = "StartDiscovery";
    194 const char kSetDiscoveryFilter[] = "SetDiscoveryFilter";
    195 const char kStopDiscovery[] = "StopDiscovery";
    196 const char kRemoveDevice[] = "RemoveDevice";
    197 
    198 // Bluetooth Adapter properties.
    199 const char kAddressProperty[] = "Address";
    200 const char kNameProperty[] = "Name";
    201 const char kAliasProperty[] = "Alias";
    202 const char kClassProperty[] = "Class";
    203 const char kPoweredProperty[] = "Powered";
    204 const char kDiscoverableProperty[] = "Discoverable";
    205 const char kPairableProperty[] = "Pairable";
    206 const char kPairableTimeoutProperty[] = "PairableTimeout";
    207 const char kDiscoverableTimeoutProperty[] = "DiscoverableTimeout";
    208 const char kDiscoveringProperty[] = "Discovering";
    209 const char kUUIDsProperty[] = "UUIDs";
    210 const char kModaliasProperty[] = "Modalias";
    211 
    212 // Bluetooth Adapter errors.
    213 const char kErrorNotReady[] = "org.bluez.Error.NotReady";
    214 const char kErrorFailed[] = "org.bluez.Error.Failed";
    215 const char kErrorNotAuthorized[] = "org.bluez.Error.NotAuthorized";
    216 const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
    217 
    218 // Bluetooth Adapter parameters supplied to SetDiscoveryFilter request.
    219 const char kDiscoveryFilterParameterUUIDs[] = "UUIDs";
    220 const char kDiscoveryFilterParameterRSSI[] = "RSSI";
    221 const char kDiscoveryFilterParameterPathloss[] = "Pathloss";
    222 const char kDiscoveryFilterParameterTransport[] = "Transport";
    223 }  // namespace bluetooth_adapter
    224 
    225 namespace bluetooth_agent_manager {
    226 // Bluetooth Agent Manager service indentifiers
    227 const char kBluetoothAgentManagerServiceName[] = "org.bluez";
    228 const char kBluetoothAgentManagerServicePath[] = "/org/bluez";
    229 const char kBluetoothAgentManagerInterface[] = "org.bluez.AgentManager1";
    230 
    231 // Bluetooth Agent Manager methods.
    232 const char kRegisterAgent[] = "RegisterAgent";
    233 const char kUnregisterAgent[] = "UnregisterAgent";
    234 const char kRequestDefaultAgent[] = "RequestDefaultAgent";
    235 
    236 // Bluetooth capabilities.
    237 const char kNoInputNoOutputCapability[] = "NoInputNoOutput";
    238 const char kDisplayOnlyCapability[] = "DisplayOnly";
    239 const char kKeyboardOnlyCapability[] = "KeyboardOnly";
    240 const char kDisplayYesNoCapability[] = "DisplayYesNo";
    241 const char kKeyboardDisplayCapability[] = "KeyboardDisplay";
    242 
    243 // Bluetooth Agent Manager errors.
    244 const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
    245 const char kErrorAlreadyExists[] = "org.bluez.Error.AlreadyExists";
    246 const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
    247 }  // namespace bluetooth_agent_manager
    248 
    249 
    250 namespace bluetooth_agent {
    251 // Bluetooth Agent service indentifiers
    252 const char kBluetoothAgentInterface[] = "org.bluez.Agent1";
    253 
    254 // Bluetooth Agent methods.
    255 const char kRelease[] = "Release";
    256 const char kRequestPinCode[] = "RequestPinCode";
    257 const char kDisplayPinCode[] = "DisplayPinCode";
    258 const char kRequestPasskey[] = "RequestPasskey";
    259 const char kDisplayPasskey[] = "DisplayPasskey";
    260 const char kRequestConfirmation[] = "RequestConfirmation";
    261 const char kRequestAuthorization[] = "RequestAuthorization";
    262 const char kAuthorizeService[] = "AuthorizeService";
    263 const char kCancel[] = "Cancel";
    264 
    265 // Bluetooth Agent errors.
    266 const char kErrorRejected[] = "org.bluez.Error.Rejected";
    267 const char kErrorCanceled[] = "org.bluez.Error.Canceled";
    268 }  // namespace bluetooth_agent
    269 
    270 namespace bluetooth_device {
    271 // Bluetooth Device service identifiers.
    272 const char kBluetoothDeviceServiceName[] = "org.bluez";
    273 const char kBluetoothDeviceInterface[] = "org.bluez.Device1";
    274 
    275 // Bluetooth Device methods.
    276 const char kConnect[] = "Connect";
    277 const char kDisconnect[] = "Disconnect";
    278 const char kConnectProfile[] = "ConnectProfile";
    279 const char kDisconnectProfile[] = "DisconnectProfile";
    280 const char kPair[] = "Pair";
    281 const char kCancelPairing[] = "CancelPairing";
    282 // TODO(tengs): Remove deprecated constants after they are removed in the Chrome
    283 // codebase. (See crbug.com/430665).
    284 const char kStartConnectionMonitor[] = "StartConnectionMonitor";  // DEPRECATED
    285 const char kStopConnectionMonitor[] = "StopConnectionMonitor";    // DEPRECATED
    286 
    287 // Bluetooth Device properties.
    288 const char kAddressProperty[] = "Address";
    289 const char kNameProperty[] = "Name";
    290 const char kIconProperty[] = "Icon";
    291 const char kClassProperty[] = "Class";
    292 const char kAppearanceProperty[] = "Appearance";
    293 const char kUUIDsProperty[] = "UUIDs";
    294 const char kPairedProperty[] = "Paired";
    295 const char kConnectedProperty[] = "Connected";
    296 const char kTrustedProperty[] = "Trusted";
    297 const char kBlockedProperty[] = "Blocked";
    298 const char kAliasProperty[] = "Alias";
    299 const char kAdapterProperty[] = "Adapter";
    300 const char kLegacyPairingProperty[] = "LegacyPairing";
    301 const char kModaliasProperty[] = "Modalias";
    302 const char kRSSIProperty[] = "RSSI";
    303 const char kTxPowerProperty[] = "TxPower";
    304 const char kManufacturerDataProperty[] = "ManufacturerData";
    305 const char kServiceDataProperty[] = "ServiceData";
    306 const char kGattServicesProperty[] = "GattServices";
    307 // TODO(tengs): Remove deprecated constants after they are removed in the Chrome
    308 // codebase. (See crbug.com/430665).
    309 const char kConnectionRSSI[] = "ConnectionRSSI";             // DEPRECATED
    310 const char kConnectionTXPower[] = "ConnectionTXPower";       // DEPRECATED
    311 const char kConnectionTXPowerMax[] = "ConnectionTXPowerMax"; // DEPRECATED
    312 
    313 // Bluetooth Device errors.
    314 const char kErrorNotReady[] = "org.bluez.Error.NotReady";
    315 const char kErrorFailed[] = "org.bluez.Error.Failed";
    316 const char kErrorInProgress[] = "org.bluez.Error.InProgress";
    317 const char kErrorAlreadyConnected[] = "org.bluez.Error.AlreadyConnected";
    318 const char kErrorNotConnected[] = "org.bluez.Error.NotConnected";
    319 const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
    320 const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
    321 
    322 // Undocumented errors that we know BlueZ returns for Bluetooth Device methods.
    323 const char kErrorNotSupported[] = "org.bluez.Error.NotSupported";
    324 const char kErrorAuthenticationCanceled[] =
    325     "org.bluez.Error.AuthenticationCanceled";
    326 const char kErrorAuthenticationFailed[] =
    327     "org.bluez.Error.AuthenticationFailed";
    328 const char kErrorAuthenticationRejected[] =
    329     "org.bluez.Error.AuthenticationRejected";
    330 const char kErrorAuthenticationTimeout[] =
    331     "org.bluez.Error.AuthenticationTimeout";
    332 const char kErrorConnectionAttemptFailed[] =
    333     "org.bluez.Error.ConnectionAttemptFailed";
    334 }  // namespace bluetooth_device
    335 
    336 namespace bluetooth_gatt_characteristic {
    337 // Bluetooth GATT Characteristic service identifiers. The service name is used
    338 // only for characteristic objects hosted by bluetoothd.
    339 const char kBluetoothGattCharacteristicServiceName[] = "org.bluez";
    340 const char kBluetoothGattCharacteristicInterface[] =
    341     "org.bluez.GattCharacteristic1";
    342 
    343 // Bluetooth GATT Characteristic methods.
    344 const char kReadValue[] = "ReadValue";
    345 const char kWriteValue[] = "WriteValue";
    346 const char kStartNotify[] = "StartNotify";
    347 const char kStopNotify[] = "StopNotify";
    348 
    349 // Bluetooth GATT Characteristic signals.
    350 const char kValueUpdatedSignal[] = "ValueUpdated";
    351 
    352 // Bluetooth GATT Characteristic properties.
    353 const char kUUIDProperty[] = "UUID";
    354 const char kServiceProperty[] = "Service";
    355 const char kValueProperty[] = "Value";
    356 const char kFlagsProperty[] = "Flags";
    357 const char kNotifyingProperty[] = "Notifying";
    358 const char kDescriptorsProperty[] = "Descriptors";
    359 
    360 // Possible values for the "Flags" property.
    361 const char kFlagBroadcast[] = "broadcast";
    362 const char kFlagRead[] = "read";
    363 const char kFlagWriteWithoutResponse[] = "write-without-response";
    364 const char kFlagWrite[] = "write";
    365 const char kFlagNotify[] = "notify";
    366 const char kFlagIndicate[] = "indicate";
    367 const char kFlagAuthenticatedSignedWrites[] = "authenticated-signed-writes";
    368 const char kFlagExtendedProperties[] = "extended-properties";
    369 const char kFlagReliableWrite[] = "reliable-write";
    370 const char kFlagWritableAuxiliaries[] = "writable-auxiliaries";
    371 }  // namespace bluetooth_gatt_characteristic
    372 
    373 namespace bluetooth_gatt_descriptor {
    374 // Bluetooth GATT Descriptor service identifiers. The service name is used
    375 // only for descriptor objects hosted by bluetoothd.
    376 const char kBluetoothGattDescriptorServiceName[] = "org.bluez";
    377 const char kBluetoothGattDescriptorInterface[] = "org.bluez.GattDescriptor1";
    378 
    379 // Bluetooth GATT Descriptor methods.
    380 const char kReadValue[] = "ReadValue";
    381 const char kWriteValue[] = "WriteValue";
    382 
    383 // Bluetooth GATT Descriptor properties.
    384 const char kUUIDProperty[] = "UUID";
    385 const char kCharacteristicProperty[] = "Characteristic";
    386 const char kValueProperty[] = "Value";
    387 }  // namespace bluetooth_gatt_descriptor
    388 
    389 namespace bluetooth_gatt_manager {
    390 // Bluetooth GATT Manager service identifiers.
    391 const char kBluetoothGattManagerServiceName[] = "org.bluez";
    392 const char kBluetoothGattManagerInterface[] = "org.bluez.GattManager1";
    393 
    394 // Bluetooth GATT Manager methods.
    395 const char kRegisterService[] = "RegisterService";
    396 const char kUnregisterService[] = "UnregisterService";
    397 
    398 // Bluetooth GATT Manager errors.
    399 const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
    400 const char kErrorAlreadyExists[] = "org.bluez.Error.AlreadyExists";
    401 const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
    402 }  // namespace bluetooth_gatt_manager
    403 
    404 namespace bluetooth_gatt_service {
    405 // Bluetooth GATT Service service identifiers. The service name is used
    406 // only for service objects hosted by bluetoothd.
    407 const char kBluetoothGattServiceServiceName[] = "org.bluez";
    408 const char kBluetoothGattServiceInterface[] = "org.bluez.GattService1";
    409 
    410 // Bluetooth GATT Service properties.
    411 const char kUUIDProperty[] = "UUID";
    412 const char kDeviceProperty[] = "Device";
    413 const char kPrimaryProperty[] = "Primary";
    414 const char kIncludesProperty[] = "Includes";
    415 const char kCharacteristicsProperty[] = "Characteristics";
    416 
    417 // Bluetooth GATT Service errors.
    418 const char kErrorFailed[] = "org.bluez.Error.Failed";
    419 const char kErrorInProgress[] = "org.bluez.Error.InProgress";
    420 const char kErrorInvalidValueLength[] = "org.bluez.Error.InvalidValueLength";
    421 const char kErrorNotAuthorized[] = "org.bluez.Error.NotAuthorized";
    422 const char kErrorNotPaired[] = "org.bluez.Error.NotPaired";
    423 const char kErrorNotSupported[] = "org.bluez.Error.NotSupported";
    424 const char kErrorReadNotPermitted[] = "org.bluez.Error.ReadNotPermitted";
    425 const char kErrorWriteNotPermitted[] = "org.bluez.Error.WriteNotPermitted";
    426 }  // namespace bluetooth_gatt_service
    427 
    428 namespace bluetooth_input {
    429 // Bluetooth Input service identifiers.
    430 const char kBluetoothInputServiceName[] = "org.bluez";
    431 const char kBluetoothInputInterface[] = "org.bluez.Input1";
    432 
    433 // Bluetooth Input properties.
    434 const char kReconnectModeProperty[] = "ReconnectMode";
    435 
    436 // Bluetooth Input property values.
    437 const char kNoneReconnectModeProperty[] = "none";
    438 const char kHostReconnectModeProperty[] = "host";
    439 const char kDeviceReconnectModeProperty[] = "device";
    440 const char kAnyReconnectModeProperty[] = "any";
    441 }  // namespace bluetooth_input
    442 
    443 namespace bluetooth_media {
    444 // Bluetooth Media service identifiers
    445 const char kBluetoothMediaServiceName[] = "org.bluez";
    446 const char kBluetoothMediaInterface[] = "org.bluez.Media1";
    447 
    448 // Bluetooth Media methods
    449 const char kRegisterEndpoint[] = "RegisterEndpoint";
    450 const char kUnregisterEndpoint[] = "UnregisterEndpoint";
    451 const char kRegisterPlayer[] = "RegisterPlayer";
    452 const char kUnregisterPlayer[] = "UnregisterPlayer";
    453 
    454 // Bluetooth Media errors
    455 const char kErrorFailed[] = "org.bluez.Error.Failed";
    456 const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
    457 const char kErrorNotSupported[] = "org.bluez.Error.NotSupported";
    458 }  // namespace bluetooth_media
    459 
    460 namespace bluetooth_media_endpoint {
    461 // Bluetooth Media Endpoint service identifiers
    462 const char kBluetoothMediaEndpointServiceName[] = "org.bluez";
    463 const char kBluetoothMediaEndpointInterface[] = "org.bluez.MediaEndpoint1";
    464 
    465 // Bluetooth Media Endpoint methods
    466 const char kSetConfiguration[] = "SetConfiguration";
    467 const char kSelectConfiguration[] = "SelectConfiguration";
    468 const char kClearConfiguration[] = "ClearConfiguration";
    469 const char kRelease[] = "Release";
    470 }  // namespace bluetooth_media_endpoint
    471 
    472 namespace bluetooth_media_transport {
    473 // Bluetooth Media Transport service identifiers
    474 const char kBluetoothMediaTransportServiceName[] = "org.bluez";
    475 const char kBluetoothMediaTransportInterface[] = "org.bluez.MediaTransport1";
    476 
    477 // Bluetooth Media Transport methods
    478 const char kAcquire[] = "Acquire";
    479 const char kTryAcquire[] = "TryAcquire";
    480 const char kRelease[] = "Release";
    481 
    482 // Bluetooth Media Transport property names.
    483 const char kDeviceProperty[] = "Device";
    484 const char kUUIDProperty[] = "UUID";
    485 const char kCodecProperty[] = "Codec";
    486 const char kConfigurationProperty[] = "Configuration";
    487 const char kStateProperty[] = "State";
    488 const char kDelayProperty[] = "Delay";
    489 const char kVolumeProperty[] = "Volume";
    490 
    491 // Possible states for the "State" property
    492 const char kStateIdle[] = "idle";
    493 const char kStatePending[] = "pending";
    494 const char kStateActive[] = "active";
    495 
    496 // Bluetooth Media Transport errors.
    497 const char kErrorFailed[] = "org.bluez.Error.Failed";
    498 const char kErrorNotAuthorized[] = "org.bluez.Error.NotAuthorized";
    499 const char kErrorNotAvailable[] = "org.bluez.Error.NotAvailable";
    500 }  // namespace bluetooth_media_transport
    501 
    502 namespace bluetooth_object_manager {
    503 // Bluetooth daemon Object Manager service identifiers.
    504 const char kBluetoothObjectManagerServiceName[] = "org.bluez";
    505 const char kBluetoothObjectManagerServicePath[] = "/";
    506 }  // namespace bluetooth_object_manager
    507 
    508 namespace bluetooth_profile_manager {
    509 // Bluetooth Profile Manager service identifiers.
    510 const char kBluetoothProfileManagerServiceName[] = "org.bluez";
    511 const char kBluetoothProfileManagerServicePath[] = "/org/bluez";
    512 const char kBluetoothProfileManagerInterface[] = "org.bluez.ProfileManager1";
    513 
    514 // Bluetooth Profile Manager methods.
    515 const char kRegisterProfile[] = "RegisterProfile";
    516 const char kUnregisterProfile[] = "UnregisterProfile";
    517 
    518 // Bluetooth Profile Manager option names.
    519 const char kNameOption[] = "Name";
    520 const char kServiceOption[] = "Service";
    521 const char kRoleOption[] = "Role";
    522 const char kChannelOption[] = "Channel";
    523 const char kPSMOption[] = "PSM";
    524 const char kRequireAuthenticationOption[] = "RequireAuthentication";
    525 const char kRequireAuthorizationOption[] = "RequireAuthorization";
    526 const char kAutoConnectOption[] = "AutoConnect";
    527 const char kServiceRecordOption[] = "ServiceRecord";
    528 const char kVersionOption[] = "Version";
    529 const char kFeaturesOption[] = "Features";
    530 
    531 // Bluetooth Profile Manager option values.
    532 const char kClientRoleOption[] = "client";
    533 const char kServerRoleOption[] = "server";
    534 
    535 // Bluetooth Profile Manager errors.
    536 const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
    537 const char kErrorAlreadyExists[] = "org.bluez.Error.AlreadyExists";
    538 const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
    539 }  // namespace bluetooth_profile_manager
    540 
    541 namespace bluetooth_profile {
    542 // Bluetooth Profile service identifiers.
    543 const char kBluetoothProfileInterface[] = "org.bluez.Profile1";
    544 
    545 // Bluetooth Profile methods.
    546 const char kRelease[] = "Release";
    547 const char kNewConnection[] = "NewConnection";
    548 const char kRequestDisconnection[] = "RequestDisconnection";
    549 const char kCancel[] = "Cancel";
    550 
    551 // Bluetooth Profile property names.
    552 const char kVersionProperty[] = "Version";
    553 const char kFeaturesProperty[] = "Features";
    554 
    555 // Bluetooth Profile errors.
    556 const char kErrorRejected[] = "org.bluez.Error.Rejected";
    557 const char kErrorCanceled[] = "org.bluez.Error.Canceled";
    558 }  // namespace bluetooth_profile
    559 
    560 namespace bluetooth_advertisement {
    561 // Bluetooth LE Advertisement service identifiers.
    562 const char kBluetoothAdvertisementServiceName[] = "org.bluez";
    563 const char kBluetoothAdvertisementInterface[] =
    564     "org.bluez.LEAdvertisement1";
    565 
    566 // Bluetooth Advertisement methods.
    567 const char kRelease[] = "Release";
    568 
    569 // Bluetooth Advertisement properties.
    570 const char kManufacturerDataProperty[] = "ManufacturerData";
    571 const char kServiceUUIDsProperty[] = "ServiceUUIDs";
    572 const char kServiceDataProperty[] = "ServiceData";
    573 const char kSolicitUUIDsProperty[] = "SolicitUUIDs";
    574 const char kTypeProperty[] = "Type";
    575 const char kIncludeTxPowerProperty[] = "IncludeTxPower";
    576 
    577 // Possible values for the "Type" property.
    578 const char kTypeBroadcast[] = "broadcast";
    579 const char kTypePeripheral[] = "peripheral";
    580 
    581 }  // namespace bluetooth_advertisement
    582 
    583 namespace bluetooth_advertising_manager {
    584 // Bluetooth LE Advertising Manager service identifiers.
    585 const char kBluetoothAdvertisingManagerServiceName[] = "org.bluez";
    586 const char kBluetoothAdvertisingManagerInterface[] =
    587     "org.bluez.LEAdvertisingManager1";
    588 
    589 // Bluetooth LE Advertising Manager methods.
    590 const char kRegisterAdvertisement[] = "RegisterAdvertisement";
    591 const char kUnregisterAdvertisement[] = "UnregisterAdvertisement";
    592 
    593 // Bluetooth LE Advertising Manager errors.
    594 const char kErrorAlreadyExists[] = "org.bluez.Error.AlreadyExists";
    595 const char kErrorDoesNotExist[] = "org.bluez.Error.DoesNotExist";
    596 const char kErrorFailed[] = "org.bluez.Error.Failed";
    597 const char kErrorInvalidArguments[] = "org.bluez.Error.InvalidArguments";
    598 const char kErrorInvalidLength[] = "org.bluez.Error.InvalidLength";
    599 }  // namespace bluetooth_advertising_manager
    600 
    601 namespace nfc_adapter {
    602 // NFC Adapter service identifiers.
    603 const char kNfcAdapterServiceName[] = "org.neard";
    604 const char kNfcAdapterInterface[] = "org.neard.Adapter";
    605 
    606 // NFC Adapter methods.
    607 const char kStartEmulation[] = "StartEmulation";
    608 const char kStartPollLoop[] = "StartPollLoop";
    609 const char kStopEmulation[] = "StopEmulation";
    610 const char kStopPollLoop[] = "StopPollLoop";
    611 
    612 // NFC Adapter signals.
    613 const char kTagFoundSignal[] = "TagFound";
    614 const char kTagLostSignal[] = "TagLost";
    615 
    616 // NFC Adapter properties.
    617 const char kDevicesProperty[] = "Devices";
    618 const char kModeProperty[] = "Mode";
    619 const char kPollingProperty[] = "Polling";
    620 const char kPoweredProperty[] = "Powered";
    621 const char kProtocolsProperty[] = "Protocols";
    622 const char kTagsProperty[] = "Tags";
    623 
    624 // NFC Adapter mode values.
    625 const char kModeInitiator[] = "Initiator";
    626 const char kModeTarget[] = "Target";
    627 const char kModeIdle[] = "Idle";
    628 
    629 }  // namespace nfc_adapter
    630 
    631 namespace nfc_device {
    632 // NFC Device service identifiers.
    633 const char kNfcDeviceServiceName[] = "org.neard";
    634 const char kNfcDeviceInterface[] = "org.neard.Device";
    635 
    636 // NFC Device methods.
    637 const char kPush[] = "Push";
    638 
    639 // NFC Device properties.
    640 const char kRecordsProperty[] = "Records";
    641 
    642 }  // namespace nfc_device
    643 
    644 namespace nfc_manager {
    645 // NFC Manager service identifiers.
    646 const char kNfcManagerServiceName[] = "org.neard";
    647 const char kNfcManagerServicePath[] = "/";
    648 const char kNfcManagerInterface[] = "org.neard.Manager";
    649 
    650 // NFC Manager methods.
    651 const char kRegisterHandoverAgent[] = "RegisterHandoverAgent";
    652 const char kUnregisterHandoverAgent[] = "UnregisterHandoverAgent";
    653 const char kRegisterNDEFAgent[] = "RegisterNDEFAgent";
    654 const char kUnregisterNDEFAgent[] = "UnregisterNDEFAgent";
    655 
    656 // NFC Manager signals.
    657 const char kAdapterAddedSignal[] = "AdapterAdded";
    658 const char kAdapterRemovedSignal[] = "AdapterRemoved";
    659 
    660 // NFC Manager properties.
    661 const char kAdaptersProperty[] = "Adapters";
    662 
    663 // NFC Manager handover carrier values.
    664 const char kCarrierBluetooth[] = "bluetooth";
    665 const char kCarrierWifi[] = "wifi";
    666 }  // namespace nfc_manager
    667 
    668 namespace nfc_tag {
    669 // NFC Tag service identifiers.
    670 const char kNfcTagServiceName[] = "org.neard";
    671 const char kNfcTagInterface[] = "org.neard.Tag";
    672 
    673 // NFC Tag methods.
    674 const char kWrite[] = "Write";
    675 
    676 // NFC Tag properties.
    677 const char kProtocolProperty[] = "Protocol";
    678 const char kReadOnlyProperty[] = "ReadOnly";
    679 const char kRecordsProperty[] = "Records";
    680 const char kTypeProperty[] = "Type";
    681 
    682 // NFC Tag type values.
    683 const char kTagType1[] = "Type 1";
    684 const char kTagType2[] = "Type 2";
    685 const char kTagType3[] = "Type 3";
    686 const char kTagType4[] = "Type 4";
    687 
    688 }  // namespace nfc_tag
    689 
    690 namespace nfc_record {
    691 // NFC Record service identifiers.
    692 const char kNfcRecordServiceName[] = "org.neard";
    693 const char kNfcRecordInterface[] = "org.neard.Record";
    694 
    695 // NFC Record properties.
    696 const char kTypeProperty[] = "Type";
    697 const char kEncodingProperty[] = "Encoding";
    698 const char kLanguageProperty[] = "Language";
    699 const char kRepresentationProperty[] = "Representation";
    700 const char kUriProperty[] = "URI";
    701 const char kMimeTypeProperty[] = "MIMEType";
    702 const char kSizeProperty[] = "Size";
    703 const char kActionProperty[] = "Action";
    704 
    705 // NFC Record type values.
    706 const char kTypeSmartPoster[] = "SmartPoster";
    707 const char kTypeText[] = "Text";
    708 const char kTypeUri[] = "URI";
    709 const char kTypeHandoverRequest[] = "HandoverRequest";
    710 const char kTypeHandoverSelect[] = "HandoverSelect";
    711 const char kTypeHandoverCarrier[] = "HandoverCarrier";
    712 
    713 // NFC Record encoding values.
    714 const char kEncodingUtf8[] = "UTF-8";
    715 const char kEncodingUtf16[] = "UTF-16";
    716 }  // namespace nfc_record
    717 
    718 namespace nfc_handover_agent {
    719 // NFC Handover Agent service identifiers.
    720 // TODO(armansito): Add the correct service name once the HandoverAgent feature
    721 // is fully implemented.
    722 const char kNfcHandoverAgentServiceName[] = "";
    723 const char kNfcHandoverInterface[] = "org.neard.HandoverAgent";
    724 
    725 // NFC Handover Agent methods.
    726 const char kRequestOOB[] = "RequestOOB";
    727 const char kPushOOB[] = "PushOOB";
    728 const char kRelease[] = "Release";
    729 
    730 // NFC Handover Agent properties.
    731 const char kEIRProperty[] = "EIR";
    732 const char kNokiaDotComBtProperty[] = "nokia.com:bt";
    733 const char kWSCProperty[] = "WSC";
    734 const char kStateProperty[] = "State";
    735 }  // namespace nfc_handover_agent
    736 
    737 namespace nfc_ndef_agent {
    738 // NFC NDEF Agent service identifiers.
    739 // TODO(armansito): Add the correct service name once the NDEFAgent feature
    740 // is fully implemented.
    741 const char kNfcNdefAgentServiceName[] = "";
    742 const char kNfcNdefAgentInterface[] = "org.neard.NDEFAgent";
    743 
    744 // NFC NDEF Agent methods.
    745 const char kGetNDEF[] = "GetNDEF";
    746 const char kRelease[] = "Release";
    747 
    748 // NFC NDEF properties.
    749 const char kNDEFProperty[] = "NDEF";
    750 const char kRecordProperty[] = "Record";
    751 }  // namespace nfc_ndef_agent
    752 
    753 namespace nfc_common {
    754 // NFC Adapter/Tag protocol values.
    755 const char kProtocolFelica[] = "Felica";
    756 const char kProtocolMifare[] = "MIFARE";
    757 const char kProtocolJewel[] = "Jewel";
    758 const char kProtocolIsoDep[] = "ISO-DEP";
    759 const char kProtocolNfcDep[] = "NFC-DEP";
    760 
    761 // Common methods for NFC property access and signals.
    762 const char kGetProperties[] = "GetProperties";
    763 const char kSetProperty[] = "SetProperty";
    764 const char kPropertyChangedSignal[] = "PropertyChanged";
    765 }  // namespace nfc_common
    766 
    767 namespace nfc_error {
    768 // NFC errors.
    769 const char kAlreadyExists[] = "org.neard.Error.AlreadyExists";
    770 const char kDoesNotExist[] = "org.neard.Error.DoesNotExist";
    771 const char kFailed[] = "org.neard.Error.Failed";
    772 const char kInProgress[] = "org.neard.Error.InProgress";
    773 const char kInvalidArguments[] = "org.neard.Error.InvalidArguments";
    774 const char kNotReady[] = "org.neard.Error.NotReady";
    775 const char kNotSupported[] = "org.neard.Error.NotSupported";
    776 const char kPermissionDenied[] = "org.neard.Error.PermissionDenied";
    777 
    778 // NFC Handover Agent errors.
    779 const char kHandoverAgentFailed[] = "org.neard.HandoverAgent.Error.Failed";
    780 const char kHandoverAgentInProgress[] =
    781     "org.neard.HandoverAgent.Error.InProgress";
    782 }  // namespace nfc_error
    783 
    784 namespace mtpd {
    785 const char kMtpdInterface[] = "org.chromium.Mtpd";
    786 const char kMtpdServicePath[] = "/org/chromium/Mtpd";
    787 const char kMtpdServiceName[] = "org.chromium.Mtpd";
    788 const char kMtpdServiceError[] = "org.chromium.Mtpd.Error";
    789 
    790 // Methods.
    791 const char kEnumerateStorages[] = "EnumerateStorages";
    792 const char kGetStorageInfo[] = "GetStorageInfo";
    793 const char kGetStorageInfoFromDevice[] = "GetStorageInfoFromDevice";
    794 const char kOpenStorage[] = "OpenStorage";
    795 const char kCloseStorage[] = "CloseStorage";
    796 const char kReadDirectoryEntryIds[] = "ReadDirectoryEntryIds";
    797 const char kGetFileInfo[] = "GetFileInfo";
    798 const char kReadFileChunk[] = "ReadFileChunk";
    799 const char kCopyFileFromLocal[] = "CopyFileFromLocal";
    800 const char kDeleteObject[] = "DeleteObject";
    801 const char kRenameObject[] = "RenameObject";
    802 const char kCreateDirectory[] = "CreateDirectory";
    803 
    804 // Signals.
    805 const char kMTPStorageAttached[] = "MTPStorageAttached";
    806 const char kMTPStorageDetached[] = "MTPStorageDetached";
    807 
    808 // For FileEntry struct:
    809 const uint32_t kInvalidFileId = 0xffffffff;
    810 
    811 // For OpenStorage method:
    812 const char kReadOnlyMode[] = "ro";
    813 const char kReadWriteMode[] = "rw";
    814 
    815 // For GetFileInfo() method:
    816 // The id of the root node in a storage, as defined by the PTP/MTP standards.
    817 // Use this when referring to the root node in the context of GetFileInfo().
    818 const uint32_t kRootFileId = 0;
    819 }  // namespace mtpd
    820 
    821 namespace system_clock {
    822 const char kSystemClockInterface[] = "org.torproject.tlsdate";
    823 const char kSystemClockServicePath[] = "/org/torproject/tlsdate";
    824 const char kSystemClockServiceName[] = "org.torproject.tlsdate";
    825 
    826 // Methods.
    827 const char kSystemClockCanSet[] = "CanSetTime";
    828 const char kSystemClockSet[] = "SetTime";
    829 
    830 // Signals.
    831 const char kSystemClockUpdated[] = "TimeUpdated";
    832 }  // namespace system_clock
    833 
    834 namespace cras {
    835 const char kCrasServicePath[] = "/org/chromium/cras";
    836 const char kCrasServiceName[] = "org.chromium.cras";
    837 const char kCrasControlInterface[] = "org.chromium.cras.Control";
    838 
    839 // Methods.
    840 const char kSetOutputVolume[] = "SetOutputVolume";
    841 const char kSetOutputNodeVolume[] = "SetOutputNodeVolume";
    842 const char kSwapLeftRight[] = "SwapLeftRight";
    843 const char kSetOutputMute[] = "SetOutputMute";
    844 const char kSetOutputUserMute[] = "SetOutputUserMute";
    845 const char kSetSuspendAudio[] = "SetSuspendAudio";
    846 const char kSetInputGain[] = "SetInputGain";
    847 const char kSetInputNodeGain[] = "SetInputNodeGain";
    848 const char kSetInputMute[] = "SetInputMute";
    849 const char kGetVolumeState[] = "GetVolumeState";
    850 const char kGetNodes[] = "GetNodes";
    851 const char kSetActiveOutputNode[] = "SetActiveOutputNode";
    852 const char kSetActiveInputNode[] = "SetActiveInputNode";
    853 const char kAddActiveOutputNode[] = "AddActiveOutputNode";
    854 const char kAddActiveInputNode[] = "AddActiveInputNode";
    855 const char kRemoveActiveOutputNode[] = "RemoveActiveOutputNode";
    856 const char kRemoveActiveInputNode[] = "RemoveActiveInputNode";
    857 const char kGetNumberOfActiveStreams[] = "GetNumberOfActiveStreams";
    858 const char kGetNumberOfActiveInputStreams[] = "GetNumberOfActiveInputStreams";
    859 const char kGetNumberOfActiveOutputStreams[] = "GetNumberOfActiveOutputStreams";
    860 
    861 // Names of properties returned by GetNodes()
    862 const char kIsInputProperty[] = "IsInput";
    863 const char kIdProperty[] = "Id";
    864 const char kTypeProperty[] = "Type";
    865 const char kNameProperty[] = "Name";
    866 const char kDeviceNameProperty[] = "DeviceName";
    867 const char kActiveProperty[] = "Active";
    868 const char kPluggedTimeProperty[] = "PluggedTime";
    869 const char kMicPositionsProperty[] = "MicPositions";
    870 const char kStableDeviceIdProperty[] = "StableDeviceId";
    871 
    872 // Signals.
    873 const char kOutputVolumeChanged[] = "OutputVolumeChanged";
    874 const char kOutputMuteChanged[] = "OutputMuteChanged";
    875 const char kNodeLeftRightSwappedChanged[] = "NodeLeftRightSwappedChanged";
    876 const char kInputGainChanged[] = "InputGainChanged";
    877 const char kInputMuteChanged[] = "InputMuteChanged";
    878 const char kNodesChanged[] = "NodesChanged";
    879 const char kActiveOutputNodeChanged[] = "ActiveOutputNodeChanged";
    880 const char kActiveInputNodeChanged[] = "ActiveInputNodeChanged";
    881 const char kNumberOfActiveStreamsChanged[] = "NumberOfActiveStreamsChanged";
    882 }  // namespace cras
    883 
    884 namespace feedback {
    885 const char kFeedbackServicePath[] = "/org/chromium/feedback";
    886 const char kFeedbackServiceName[] = "org.chromium.feedback";
    887 
    888 // Methods.
    889 const char kSendFeedback[] = "SendFeedback";
    890 }  // namespace feedback
    891 
    892 namespace easy_unlock {
    893 const char kEasyUnlockServicePath[] = "/org/chromium/EasyUnlock";
    894 const char kEasyUnlockServiceName[] = "org.chromium.EasyUnlock";
    895 const char kEasyUnlockServiceInterface[] = "org.chromium.EasyUnlock";
    896 
    897 // Values supplied as enrcryption type to CreateSecureMessage and
    898 // UnwrapSecureMessage methods.
    899 const char kEncryptionTypeNone[] = "NONE";
    900 const char kEncryptionTypeAES256CBC[] = "AES_256_CBC";
    901 
    902 // Values supplied as signature type to CreateSecureMessage and
    903 // UnwrapSecureMessage methods.
    904 const char kSignatureTypeECDSAP256SHA256[] = "ECDSA_P256_SHA256";
    905 const char kSignatureTypeHMACSHA256[] = "HMAC_SHA256";
    906 
    907 // Values supplied as key algorithm to WrapPublicKey method.
    908 const char kKeyAlgorithmRSA[] = "RSA";
    909 const char kKeyAlgorithmECDSA[] = "ECDSA";
    910 
    911 // Methods
    912 const char kPerformECDHKeyAgreementMethod[] = "PerformECDHKeyAgreement";
    913 const char kWrapPublicKeyMethod[] = "WrapPublicKey";
    914 const char kGenerateEcP256KeyPairMethod[] = "GenerateEcP256KeyPair";
    915 const char kCreateSecureMessageMethod[] = "CreateSecureMessage";
    916 const char kUnwrapSecureMessageMethod[] = "UnwrapSecureMessage";
    917 }  // namespace easy_unlock
    918 
    919 #endif  // SYSTEM_API_DBUS_SERVICE_CONSTANTS_H_
    920