dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
michael@0 2 /* vim: set ts=2 et sw=2 tw=80: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #ifndef mozilla_dom_bluetooth_bluetoothservicebluedroid_h__
michael@0 8 #define mozilla_dom_bluetooth_bluetoothservicebluedroid_h__
michael@0 9
michael@0 10 #include <hardware/bluetooth.h>
michael@0 11
michael@0 12 #include "BluetoothCommon.h"
michael@0 13 #include "BluetoothService.h"
michael@0 14
michael@0 15 BEGIN_BLUETOOTH_NAMESPACE
michael@0 16
michael@0 17 class BluetoothServiceBluedroid : public BluetoothService
michael@0 18 {
michael@0 19 public:
michael@0 20 static const bt_interface_t* GetBluetoothInterface();
michael@0 21
michael@0 22 BluetoothServiceBluedroid();
michael@0 23 ~BluetoothServiceBluedroid();
michael@0 24
michael@0 25 virtual nsresult StartInternal();
michael@0 26 virtual nsresult StopInternal();
michael@0 27
michael@0 28 virtual nsresult GetDefaultAdapterPathInternal(
michael@0 29 BluetoothReplyRunnable* aRunnable);
michael@0 30
michael@0 31 virtual nsresult GetConnectedDevicePropertiesInternal(uint16_t aProfileId,
michael@0 32 BluetoothReplyRunnable* aRunnable);
michael@0 33
michael@0 34 virtual nsresult GetPairedDevicePropertiesInternal(
michael@0 35 const nsTArray<nsString>& aDeviceAddress,
michael@0 36 BluetoothReplyRunnable* aRunnable);
michael@0 37
michael@0 38 virtual nsresult StartDiscoveryInternal(BluetoothReplyRunnable* aRunnable);
michael@0 39 virtual nsresult StopDiscoveryInternal(BluetoothReplyRunnable* aRunnable);
michael@0 40
michael@0 41 virtual nsresult
michael@0 42 SetProperty(BluetoothObjectType aType,
michael@0 43 const BluetoothNamedValue& aValue,
michael@0 44 BluetoothReplyRunnable* aRunnable);
michael@0 45
michael@0 46 virtual nsresult
michael@0 47 GetServiceChannel(const nsAString& aDeviceAddress,
michael@0 48 const nsAString& aServiceUuid,
michael@0 49 BluetoothProfileManagerBase* aManager);
michael@0 50
michael@0 51 virtual bool
michael@0 52 UpdateSdpRecords(const nsAString& aDeviceAddress,
michael@0 53 BluetoothProfileManagerBase* aManager);
michael@0 54
michael@0 55 virtual nsresult
michael@0 56 CreatePairedDeviceInternal(const nsAString& aDeviceAddress,
michael@0 57 int aTimeout,
michael@0 58 BluetoothReplyRunnable* aRunnable);
michael@0 59
michael@0 60 virtual nsresult
michael@0 61 RemoveDeviceInternal(const nsAString& aDeviceObjectPath,
michael@0 62 BluetoothReplyRunnable* aRunnable);
michael@0 63
michael@0 64 virtual bool
michael@0 65 SetPinCodeInternal(const nsAString& aDeviceAddress, const nsAString& aPinCode,
michael@0 66 BluetoothReplyRunnable* aRunnable);
michael@0 67
michael@0 68 virtual bool
michael@0 69 SetPasskeyInternal(const nsAString& aDeviceAddress, uint32_t aPasskey,
michael@0 70 BluetoothReplyRunnable* aRunnable);
michael@0 71
michael@0 72 virtual bool
michael@0 73 SetPairingConfirmationInternal(const nsAString& aDeviceAddress, bool aConfirm,
michael@0 74 BluetoothReplyRunnable* aRunnable);
michael@0 75
michael@0 76 virtual bool
michael@0 77 SetAuthorizationInternal(const nsAString& aDeviceAddress, bool aAllow,
michael@0 78 BluetoothReplyRunnable* aRunnable);
michael@0 79
michael@0 80 virtual nsresult
michael@0 81 PrepareAdapterInternal();
michael@0 82
michael@0 83 virtual void
michael@0 84 Connect(const nsAString& aDeviceAddress,
michael@0 85 uint32_t aCod,
michael@0 86 uint16_t aServiceUuid,
michael@0 87 BluetoothReplyRunnable* aRunnable);
michael@0 88
michael@0 89 virtual bool
michael@0 90 IsConnected(uint16_t aProfileId);
michael@0 91
michael@0 92 virtual void
michael@0 93 Disconnect(const nsAString& aDeviceAddress, uint16_t aServiceUuid,
michael@0 94 BluetoothReplyRunnable* aRunnable);
michael@0 95
michael@0 96 virtual void
michael@0 97 SendFile(const nsAString& aDeviceAddress,
michael@0 98 BlobParent* aBlobParent,
michael@0 99 BlobChild* aBlobChild,
michael@0 100 BluetoothReplyRunnable* aRunnable);
michael@0 101
michael@0 102 virtual void
michael@0 103 SendFile(const nsAString& aDeviceAddress,
michael@0 104 nsIDOMBlob* aBlob,
michael@0 105 BluetoothReplyRunnable* aRunnable);
michael@0 106
michael@0 107 virtual void
michael@0 108 StopSendingFile(const nsAString& aDeviceAddress,
michael@0 109 BluetoothReplyRunnable* aRunnable);
michael@0 110
michael@0 111 virtual void
michael@0 112 ConfirmReceivingFile(const nsAString& aDeviceAddress, bool aConfirm,
michael@0 113 BluetoothReplyRunnable* aRunnable);
michael@0 114
michael@0 115 virtual void
michael@0 116 ConnectSco(BluetoothReplyRunnable* aRunnable);
michael@0 117
michael@0 118 virtual void
michael@0 119 DisconnectSco(BluetoothReplyRunnable* aRunnable);
michael@0 120
michael@0 121 virtual void
michael@0 122 IsScoConnected(BluetoothReplyRunnable* aRunnable);
michael@0 123
michael@0 124 virtual void
michael@0 125 AnswerWaitingCall(BluetoothReplyRunnable* aRunnable);
michael@0 126
michael@0 127 virtual void
michael@0 128 IgnoreWaitingCall(BluetoothReplyRunnable* aRunnable);
michael@0 129
michael@0 130 virtual void
michael@0 131 ToggleCalls(BluetoothReplyRunnable* aRunnable);
michael@0 132
michael@0 133 virtual void
michael@0 134 SendMetaData(const nsAString& aTitle,
michael@0 135 const nsAString& aArtist,
michael@0 136 const nsAString& aAlbum,
michael@0 137 int64_t aMediaNumber,
michael@0 138 int64_t aTotalMediaCount,
michael@0 139 int64_t aDuration,
michael@0 140 BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
michael@0 141
michael@0 142 virtual void
michael@0 143 SendPlayStatus(int64_t aDuration,
michael@0 144 int64_t aPosition,
michael@0 145 const nsAString& aPlayStatus,
michael@0 146 BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
michael@0 147
michael@0 148 virtual void
michael@0 149 UpdatePlayStatus(uint32_t aDuration,
michael@0 150 uint32_t aPosition,
michael@0 151 ControlPlayStatus aPlayStatus) MOZ_OVERRIDE;
michael@0 152
michael@0 153 virtual nsresult
michael@0 154 SendSinkMessage(const nsAString& aDeviceAddresses,
michael@0 155 const nsAString& aMessage) MOZ_OVERRIDE;
michael@0 156
michael@0 157 virtual nsresult
michael@0 158 SendInputMessage(const nsAString& aDeviceAddresses,
michael@0 159 const nsAString& aMessage) MOZ_OVERRIDE;
michael@0 160 };
michael@0 161
michael@0 162 END_BLUETOOTH_NAMESPACE
michael@0 163
michael@0 164 #endif
michael@0 165

mercurial