michael@0: /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_bluetooth_bluetoothservicebluedroid_h__ michael@0: #define mozilla_dom_bluetooth_bluetoothservicebluedroid_h__ michael@0: michael@0: #include michael@0: michael@0: #include "BluetoothCommon.h" michael@0: #include "BluetoothService.h" michael@0: michael@0: BEGIN_BLUETOOTH_NAMESPACE michael@0: michael@0: class BluetoothServiceBluedroid : public BluetoothService michael@0: { michael@0: public: michael@0: static const bt_interface_t* GetBluetoothInterface(); michael@0: michael@0: BluetoothServiceBluedroid(); michael@0: ~BluetoothServiceBluedroid(); michael@0: michael@0: virtual nsresult StartInternal(); michael@0: virtual nsresult StopInternal(); michael@0: michael@0: virtual nsresult GetDefaultAdapterPathInternal( michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual nsresult GetConnectedDevicePropertiesInternal(uint16_t aProfileId, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual nsresult GetPairedDevicePropertiesInternal( michael@0: const nsTArray& aDeviceAddress, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual nsresult StartDiscoveryInternal(BluetoothReplyRunnable* aRunnable); michael@0: virtual nsresult StopDiscoveryInternal(BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual nsresult michael@0: SetProperty(BluetoothObjectType aType, michael@0: const BluetoothNamedValue& aValue, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual nsresult michael@0: GetServiceChannel(const nsAString& aDeviceAddress, michael@0: const nsAString& aServiceUuid, michael@0: BluetoothProfileManagerBase* aManager); michael@0: michael@0: virtual bool michael@0: UpdateSdpRecords(const nsAString& aDeviceAddress, michael@0: BluetoothProfileManagerBase* aManager); michael@0: michael@0: virtual nsresult michael@0: CreatePairedDeviceInternal(const nsAString& aDeviceAddress, michael@0: int aTimeout, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual nsresult michael@0: RemoveDeviceInternal(const nsAString& aDeviceObjectPath, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual bool michael@0: SetPinCodeInternal(const nsAString& aDeviceAddress, const nsAString& aPinCode, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual bool michael@0: SetPasskeyInternal(const nsAString& aDeviceAddress, uint32_t aPasskey, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual bool michael@0: SetPairingConfirmationInternal(const nsAString& aDeviceAddress, bool aConfirm, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual bool michael@0: SetAuthorizationInternal(const nsAString& aDeviceAddress, bool aAllow, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual nsresult michael@0: PrepareAdapterInternal(); michael@0: michael@0: virtual void michael@0: Connect(const nsAString& aDeviceAddress, michael@0: uint32_t aCod, michael@0: uint16_t aServiceUuid, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual bool michael@0: IsConnected(uint16_t aProfileId); michael@0: michael@0: virtual void michael@0: Disconnect(const nsAString& aDeviceAddress, uint16_t aServiceUuid, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: SendFile(const nsAString& aDeviceAddress, michael@0: BlobParent* aBlobParent, michael@0: BlobChild* aBlobChild, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: SendFile(const nsAString& aDeviceAddress, michael@0: nsIDOMBlob* aBlob, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: StopSendingFile(const nsAString& aDeviceAddress, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: ConfirmReceivingFile(const nsAString& aDeviceAddress, bool aConfirm, michael@0: BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: ConnectSco(BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: DisconnectSco(BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: IsScoConnected(BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: AnswerWaitingCall(BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: IgnoreWaitingCall(BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: ToggleCalls(BluetoothReplyRunnable* aRunnable); michael@0: michael@0: virtual void michael@0: SendMetaData(const nsAString& aTitle, michael@0: const nsAString& aArtist, michael@0: const nsAString& aAlbum, michael@0: int64_t aMediaNumber, michael@0: int64_t aTotalMediaCount, michael@0: int64_t aDuration, michael@0: BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE; michael@0: michael@0: virtual void michael@0: SendPlayStatus(int64_t aDuration, michael@0: int64_t aPosition, michael@0: const nsAString& aPlayStatus, michael@0: BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE; michael@0: michael@0: virtual void michael@0: UpdatePlayStatus(uint32_t aDuration, michael@0: uint32_t aPosition, michael@0: ControlPlayStatus aPlayStatus) MOZ_OVERRIDE; michael@0: michael@0: virtual nsresult michael@0: SendSinkMessage(const nsAString& aDeviceAddresses, michael@0: const nsAString& aMessage) MOZ_OVERRIDE; michael@0: michael@0: virtual nsresult michael@0: SendInputMessage(const nsAString& aDeviceAddresses, michael@0: const nsAString& aMessage) MOZ_OVERRIDE; michael@0: }; michael@0: michael@0: END_BLUETOOTH_NAMESPACE michael@0: michael@0: #endif michael@0: