зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1180555 - Handle PBAP replies and pass the results through IPC to PbapManager. r=btian
This commit is contained in:
Родитель
704ef5eefd
Коммит
2c7a6e9d19
|
@ -10,6 +10,7 @@
|
|||
#include "BluetoothService.h"
|
||||
|
||||
#include "mozilla/dom/BluetoothPbapRequestHandleBinding.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace dom;
|
||||
|
@ -49,8 +50,42 @@ already_AddRefed<DOMRequest>
|
|||
BluetoothPbapRequestHandle::ReplyTovCardPulling(Blob& aBlob,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
// TODO: Implement this function (Bug 1180555)
|
||||
return nullptr;
|
||||
nsCOMPtr<nsPIDOMWindow> win = GetParentObject();
|
||||
if (!win) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<DOMRequest> request = new DOMRequest(win);
|
||||
nsRefPtr<BluetoothVoidReplyRunnable> result =
|
||||
new BluetoothVoidReplyRunnable(request);
|
||||
|
||||
BluetoothService* bs = BluetoothService::Get();
|
||||
if (!bs) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// In-process reply
|
||||
bs->ReplyTovCardPulling(&aBlob, result);
|
||||
} else {
|
||||
ContentChild *cc = ContentChild::GetSingleton();
|
||||
if (!cc) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BlobChild* actor = cc->GetOrCreateActorForBlob(&aBlob);
|
||||
if (!actor) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bs->ReplyTovCardPulling(nullptr, actor, result);
|
||||
}
|
||||
|
||||
return request.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<DOMRequest>
|
||||
|
@ -58,8 +93,42 @@ BluetoothPbapRequestHandle::ReplyToPhonebookPulling(Blob& aBlob,
|
|||
uint16_t phonebookSize,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
// TODO: Implement this function (Bug 1180555)
|
||||
return nullptr;
|
||||
nsCOMPtr<nsPIDOMWindow> win = GetParentObject();
|
||||
if (!win) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<DOMRequest> request = new DOMRequest(win);
|
||||
nsRefPtr<BluetoothVoidReplyRunnable> result =
|
||||
new BluetoothVoidReplyRunnable(request);
|
||||
|
||||
BluetoothService* bs = BluetoothService::Get();
|
||||
if (!bs) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// In-process reply
|
||||
bs->ReplyToPhonebookPulling(&aBlob, phonebookSize, result);
|
||||
} else {
|
||||
ContentChild *cc = ContentChild::GetSingleton();
|
||||
if (!cc) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BlobChild* actor = cc->GetOrCreateActorForBlob(&aBlob);
|
||||
if (!actor) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bs->ReplyToPhonebookPulling(nullptr, actor, phonebookSize, result);
|
||||
}
|
||||
|
||||
return request.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<DOMRequest>
|
||||
|
@ -67,8 +136,42 @@ BluetoothPbapRequestHandle::ReplyTovCardListing(Blob& aBlob,
|
|||
uint16_t phonebookSize,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
// TODO: Implement this function (Bug 1180555)
|
||||
return nullptr;
|
||||
nsCOMPtr<nsPIDOMWindow> win = GetParentObject();
|
||||
if (!win) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<DOMRequest> request = new DOMRequest(win);
|
||||
nsRefPtr<BluetoothVoidReplyRunnable> result =
|
||||
new BluetoothVoidReplyRunnable(request);
|
||||
|
||||
BluetoothService* bs = BluetoothService::Get();
|
||||
if (!bs) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// In-process reply
|
||||
bs->ReplyTovCardListing(&aBlob, phonebookSize, result);
|
||||
} else {
|
||||
ContentChild *cc = ContentChild::GetSingleton();
|
||||
if (!cc) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BlobChild* actor = cc->GetOrCreateActorForBlob(&aBlob);
|
||||
if (!actor) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bs->ReplyTovCardListing(nullptr, actor, phonebookSize, result);
|
||||
}
|
||||
|
||||
return request.forget();
|
||||
}
|
||||
|
||||
JSObject*
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "BluetoothUuid.h"
|
||||
#include "ObexBase.h"
|
||||
|
||||
#include "mozilla/dom/ipc/BlobParent.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
|
@ -752,6 +753,16 @@ BluetoothPbapManager::PackPropertiesMask(uint8_t* aData, int aSize)
|
|||
return propSelector;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyToPullPhonebook(BlobParent* aActor,
|
||||
uint16_t aPhonebookSize)
|
||||
{
|
||||
nsRefPtr<BlobImpl> impl = aActor->GetBlobImpl();
|
||||
nsRefPtr<Blob> blob = Blob::Create(nullptr, impl);
|
||||
|
||||
ReplyToPullPhonebook(blob.get(), aPhonebookSize);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyToPullPhonebook(Blob* aBlob, uint16_t aPhonebookSize)
|
||||
{
|
||||
|
@ -759,13 +770,31 @@ BluetoothPbapManager::ReplyToPullPhonebook(Blob* aBlob, uint16_t aPhonebookSize)
|
|||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyToPullvCardListing(
|
||||
Blob* aBlob,
|
||||
uint16_t aPhonebookSize)
|
||||
BluetoothPbapManager::ReplyToPullvCardListing(BlobParent* aActor,
|
||||
uint16_t aPhonebookSize)
|
||||
{
|
||||
nsRefPtr<BlobImpl> impl = aActor->GetBlobImpl();
|
||||
nsRefPtr<Blob> blob = Blob::Create(nullptr, impl);
|
||||
|
||||
ReplyToPullvCardListing(blob.get(), aPhonebookSize);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyToPullvCardListing(Blob* aBlob,
|
||||
uint16_t aPhonebookSize)
|
||||
{
|
||||
// TODO: Implement this function (Bug 1180556)
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyToPullvCardEntry(BlobParent* aActor)
|
||||
{
|
||||
nsRefPtr<BlobImpl> impl = aActor->GetBlobImpl();
|
||||
nsRefPtr<Blob> blob = Blob::Create(nullptr, impl);
|
||||
|
||||
ReplyToPullvCardEntry(blob.get());
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyToPullvCardEntry(Blob* aBlob)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
class Blob;
|
||||
class BlobParent;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,8 +63,51 @@ public:
|
|||
|
||||
static BluetoothPbapManager* Get();
|
||||
bool Listen();
|
||||
|
||||
/**
|
||||
* Reply vCard object to the *IPC* 'pullphonebook' request.
|
||||
*
|
||||
* @param aActor [in] a blob actor containing the vCard objects
|
||||
* @param aPhonebookSize [in] the number of vCard indexes in the blob
|
||||
*/
|
||||
void ReplyToPullPhonebook(BlobParent* aActor, uint16_t aPhonebookSize);
|
||||
|
||||
/**
|
||||
* Reply vCard object to the *in-process* 'pullphonebook' request.
|
||||
*
|
||||
* @param aBlob [in] a blob contained the vCard objects
|
||||
* @param aPhonebookSize [in] the number of vCard indexes in the blob
|
||||
*/
|
||||
void ReplyToPullPhonebook(Blob* aBlob, uint16_t aPhonebookSize);
|
||||
|
||||
/**
|
||||
* Reply vCard object to the *IPC* 'pullvcardlisting' request.
|
||||
*
|
||||
* @param aActor [in] a blob actor containing the vCard objects
|
||||
* @param aPhonebookSize [in] the number of vCard indexes in the blob
|
||||
*/
|
||||
void ReplyToPullvCardListing(BlobParent* aActor, uint16_t aPhonebookSize);
|
||||
|
||||
/**
|
||||
* Reply vCard object to the *in-process* 'pullvcardlisting' request.
|
||||
*
|
||||
* @param aBlob [in] a blob contained the vCard objects
|
||||
* @param aPhonebookSize [in] the number of vCard indexes in the blob
|
||||
*/
|
||||
void ReplyToPullvCardListing(Blob* aBlob, uint16_t aPhonebookSize);
|
||||
|
||||
/**
|
||||
* Reply vCard object to the *IPC* 'pullvcardentry' request.
|
||||
*
|
||||
* @param aActor [in] a blob actor containing the vCard objects
|
||||
*/
|
||||
void ReplyToPullvCardEntry(BlobParent* aActor);
|
||||
|
||||
/**
|
||||
* Reply vCard object to the *in-process* 'pullvcardentry' request.
|
||||
*
|
||||
* @param aBlob [in] a blob contained the vCard objects
|
||||
*/
|
||||
void ReplyToPullvCardEntry(Blob* aBlob);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -1125,6 +1125,109 @@ BluetoothServiceBluedroid::IsScoConnected(BluetoothReplyRunnable* aRunnable)
|
|||
DispatchReplySuccess(aRunnable, BluetoothValue(hfp->IsScoConnected()));
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceBluedroid::ReplyTovCardPulling(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
BluetoothPbapManager* pbap = BluetoothPbapManager::Get();
|
||||
if (!pbap) {
|
||||
DispatchReplyError(aRunnable,
|
||||
NS_LITERAL_STRING("Reply to vCardPulling failed"));
|
||||
return;
|
||||
}
|
||||
|
||||
pbap->ReplyToPullvCardEntry(aBlobParent);
|
||||
DispatchReplySuccess(aRunnable);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceBluedroid::ReplyTovCardPulling(
|
||||
Blob* aBlob,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
BluetoothPbapManager* pbap = BluetoothPbapManager::Get();
|
||||
if (!pbap) {
|
||||
DispatchReplyError(aRunnable,
|
||||
NS_LITERAL_STRING("Reply to vCardPulling failed"));
|
||||
return;
|
||||
}
|
||||
|
||||
pbap->ReplyToPullvCardEntry(aBlob);
|
||||
DispatchReplySuccess(aRunnable);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceBluedroid::ReplyToPhonebookPulling(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
BluetoothPbapManager* pbap = BluetoothPbapManager::Get();
|
||||
if (!pbap) {
|
||||
DispatchReplyError(aRunnable,
|
||||
NS_LITERAL_STRING("Reply to Phonebook Pulling failed"));
|
||||
return;
|
||||
}
|
||||
|
||||
pbap->ReplyToPullPhonebook(aBlobParent, aPhonebookSize);
|
||||
DispatchReplySuccess(aRunnable);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceBluedroid::ReplyToPhonebookPulling(
|
||||
Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
BluetoothPbapManager* pbap = BluetoothPbapManager::Get();
|
||||
if (!pbap) {
|
||||
DispatchReplyError(aRunnable,
|
||||
NS_LITERAL_STRING("Reply to Phonebook Pulling failed"));
|
||||
return;
|
||||
}
|
||||
|
||||
pbap->ReplyToPullPhonebook(aBlob, aPhonebookSize);
|
||||
DispatchReplySuccess(aRunnable);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceBluedroid::ReplyTovCardListing(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
BluetoothPbapManager* pbap = BluetoothPbapManager::Get();
|
||||
if (!pbap) {
|
||||
DispatchReplyError(aRunnable,
|
||||
NS_LITERAL_STRING("Reply to vCard Listing failed"));
|
||||
return;
|
||||
}
|
||||
|
||||
pbap->ReplyToPullvCardListing(aBlobParent, aPhonebookSize);
|
||||
DispatchReplySuccess(aRunnable);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceBluedroid::ReplyTovCardListing(
|
||||
Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
BluetoothPbapManager* pbap = BluetoothPbapManager::Get();
|
||||
if (!pbap) {
|
||||
DispatchReplyError(aRunnable,
|
||||
NS_LITERAL_STRING("Reply to vCard Listing failed"));
|
||||
return;
|
||||
}
|
||||
|
||||
pbap->ReplyToPullvCardListing(aBlob, aPhonebookSize);
|
||||
DispatchReplySuccess(aRunnable);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceBluedroid::SendMetaData(const nsAString& aTitle,
|
||||
const nsAString& aArtist,
|
||||
|
|
|
@ -142,6 +142,37 @@ public:
|
|||
virtual void
|
||||
IsScoConnected(BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
virtual void
|
||||
ReplyTovCardPulling(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
virtual void
|
||||
ReplyTovCardPulling(Blob* aBlob,
|
||||
BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
virtual void
|
||||
ReplyToPhonebookPulling(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
virtual void
|
||||
ReplyToPhonebookPulling(Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
virtual void
|
||||
ReplyTovCardListing(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
virtual void
|
||||
ReplyTovCardListing(Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
virtual void
|
||||
AnswerWaitingCall(BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "mozilla/dom/bluetooth/BluetoothDiscoveryHandle.h"
|
||||
#include "mozilla/dom/bluetooth/BluetoothGattServer.h"
|
||||
#include "mozilla/dom/bluetooth/BluetoothPairingListener.h"
|
||||
#include "mozilla/dom/bluetooth/BluetoothPbapRequestHandle.h"
|
||||
#include "mozilla/dom/bluetooth/BluetoothTypes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
@ -1234,6 +1235,8 @@ BluetoothAdapter::HandlePullPhonebookReq(const BluetoothValue& aValue)
|
|||
}
|
||||
}
|
||||
|
||||
init.mHandle = BluetoothPbapRequestHandle::Create(GetOwner());
|
||||
|
||||
nsRefPtr<BluetoothPhonebookPullingEvent> event =
|
||||
BluetoothPhonebookPullingEvent::Constructor(this,
|
||||
NS_LITERAL_STRING(PULL_PHONEBOOK_REQ_ID), init);
|
||||
|
@ -1266,6 +1269,8 @@ BluetoothAdapter::HandlePullVCardEntryReq(const BluetoothValue& aValue)
|
|||
}
|
||||
}
|
||||
|
||||
init.mHandle = BluetoothPbapRequestHandle::Create(GetOwner());
|
||||
|
||||
nsRefPtr<BluetoothVCardPullingEvent> event =
|
||||
BluetoothVCardPullingEvent::Constructor(this,
|
||||
NS_LITERAL_STRING(PULL_VCARD_ENTRY_REQ_ID), init);
|
||||
|
@ -1308,6 +1313,8 @@ BluetoothAdapter::HandlePullVCardListingReq(const BluetoothValue& aValue)
|
|||
}
|
||||
}
|
||||
|
||||
init.mHandle = BluetoothPbapRequestHandle::Create(GetOwner());
|
||||
|
||||
nsRefPtr<BluetoothVCardListingEvent> event =
|
||||
BluetoothVCardListingEvent::Constructor(this,
|
||||
NS_LITERAL_STRING(PULL_VCARD_LISTING_REQ_ID), init);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "BluetoothCommon.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothPbapRequestHandle.h"
|
||||
#include "BluetoothProfileManagerBase.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsClassHashtable.h"
|
||||
|
@ -310,6 +311,37 @@ public:
|
|||
virtual void
|
||||
IsScoConnected(BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardPulling(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardPulling(Blob* aBlob,
|
||||
BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
virtual void
|
||||
ReplyToPhonebookPulling(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
virtual void
|
||||
ReplyToPhonebookPulling(Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardListing(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardListing(Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
virtual void
|
||||
AnswerWaitingCall(BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
|
|
@ -246,6 +246,12 @@ BluetoothParent::RecvPBluetoothRequestConstructor(
|
|||
return actor->DoRequest(aRequest.get_DisconnectScoRequest());
|
||||
case Request::TIsScoConnectedRequest:
|
||||
return actor->DoRequest(aRequest.get_IsScoConnectedRequest());
|
||||
case Request::TReplyTovCardPullingRequest:
|
||||
return actor->DoRequest(aRequest.get_ReplyTovCardPullingRequest());
|
||||
case Request::TReplyToPhonebookPullingRequest:
|
||||
return actor->DoRequest(aRequest.get_ReplyToPhonebookPullingRequest());
|
||||
case Request::TReplyTovCardListingRequest:
|
||||
return actor->DoRequest(aRequest.get_ReplyTovCardListingRequest());
|
||||
#ifdef MOZ_B2G_RIL
|
||||
case Request::TAnswerWaitingCallRequest:
|
||||
return actor->DoRequest(aRequest.get_AnswerWaitingCallRequest());
|
||||
|
@ -703,6 +709,44 @@ BluetoothRequestParent::DoRequest(const IsScoConnectedRequest& aRequest)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothRequestParent::DoRequest(const ReplyTovCardPullingRequest& aRequest)
|
||||
{
|
||||
MOZ_ASSERT(mService);
|
||||
MOZ_ASSERT(mRequestType == Request::TReplyTovCardPullingRequest);
|
||||
|
||||
mService->ReplyTovCardPulling((BlobParent*)aRequest.blobParent(),
|
||||
(BlobChild*)aRequest.blobChild(),
|
||||
mReplyRunnable.get());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothRequestParent::DoRequest(const ReplyToPhonebookPullingRequest& aRequest)
|
||||
{
|
||||
MOZ_ASSERT(mService);
|
||||
MOZ_ASSERT(mRequestType == Request::TReplyToPhonebookPullingRequest);
|
||||
|
||||
mService->ReplyToPhonebookPulling((BlobParent*)aRequest.blobParent(),
|
||||
(BlobChild*)aRequest.blobChild(),
|
||||
aRequest.phonebookSize(),
|
||||
mReplyRunnable.get());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothRequestParent::DoRequest(const ReplyTovCardListingRequest& aRequest)
|
||||
{
|
||||
MOZ_ASSERT(mService);
|
||||
MOZ_ASSERT(mRequestType == Request::TReplyTovCardListingRequest);
|
||||
|
||||
mService->ReplyTovCardListing((BlobParent*)aRequest.blobParent(),
|
||||
(BlobChild*)aRequest.blobChild(),
|
||||
aRequest.phonebookSize(),
|
||||
mReplyRunnable.get());
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
bool
|
||||
BluetoothRequestParent::DoRequest(const AnswerWaitingCallRequest& aRequest)
|
||||
|
|
|
@ -212,6 +212,15 @@ protected:
|
|||
bool
|
||||
DoRequest(const IsScoConnectedRequest& aRequest);
|
||||
|
||||
bool
|
||||
DoRequest(const ReplyTovCardPullingRequest& aRequest);
|
||||
|
||||
bool
|
||||
DoRequest(const ReplyToPhonebookPullingRequest& aRequest);
|
||||
|
||||
bool
|
||||
DoRequest(const ReplyTovCardListingRequest& aRequest);
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
bool
|
||||
DoRequest(const AnswerWaitingCallRequest& aRequest);
|
||||
|
|
|
@ -366,6 +366,66 @@ BluetoothServiceChildProcess::IsScoConnected(BluetoothReplyRunnable* aRunnable)
|
|||
SendRequest(aRunnable, IsScoConnectedRequest());
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceChildProcess::ReplyTovCardPulling(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
SendRequest(aRunnable, ReplyTovCardPullingRequest(nullptr, aBlobChild));
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceChildProcess::ReplyTovCardPulling(
|
||||
Blob* aBlobChild,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
// Parent-process-only method
|
||||
MOZ_CRASH("This should never be called!");
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceChildProcess::ReplyToPhonebookPulling(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
SendRequest(aRunnable,
|
||||
ReplyToPhonebookPullingRequest(nullptr, aBlobChild, aPhonebookSize));
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceChildProcess::ReplyToPhonebookPulling(
|
||||
Blob* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
// Parent-process-only method
|
||||
MOZ_CRASH("This should never be called!");
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceChildProcess::ReplyTovCardListing(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
SendRequest(aRunnable,
|
||||
ReplyTovCardListingRequest(nullptr, aBlobChild, aPhonebookSize));
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceChildProcess::ReplyTovCardListing(
|
||||
Blob* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
// Parent-process-only method
|
||||
MOZ_CRASH("This should never be called!");
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
void
|
||||
BluetoothServiceChildProcess::AnswerWaitingCall(
|
||||
|
|
|
@ -158,6 +158,37 @@ public:
|
|||
virtual void
|
||||
IsScoConnected(BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardPulling(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardPulling(Blob* aBlob,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyToPhonebookPulling(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyToPhonebookPulling(Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardListing(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardListing(Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
virtual void
|
||||
AnswerWaitingCall(BluetoothReplyRunnable* aRunnable) override;
|
||||
|
|
|
@ -171,6 +171,23 @@ struct IsScoConnectedRequest
|
|||
{
|
||||
};
|
||||
|
||||
struct ReplyTovCardPullingRequest
|
||||
{
|
||||
PBlob blob;
|
||||
};
|
||||
|
||||
struct ReplyToPhonebookPullingRequest
|
||||
{
|
||||
PBlob blob;
|
||||
uint16_t phonebookSize;
|
||||
};
|
||||
|
||||
struct ReplyTovCardListingRequest
|
||||
{
|
||||
PBlob blob;
|
||||
uint16_t phonebookSize;
|
||||
};
|
||||
|
||||
struct AnswerWaitingCallRequest
|
||||
{
|
||||
};
|
||||
|
@ -306,6 +323,9 @@ union Request
|
|||
ConnectScoRequest;
|
||||
DisconnectScoRequest;
|
||||
IsScoConnectedRequest;
|
||||
ReplyTovCardPullingRequest;
|
||||
ReplyToPhonebookPullingRequest;
|
||||
ReplyTovCardListingRequest;
|
||||
AnswerWaitingCallRequest;
|
||||
IgnoreWaitingCallRequest;
|
||||
ToggleCallsRequest;
|
||||
|
|
|
@ -4378,3 +4378,52 @@ BluetoothDBusService::GattClientWriteDescriptorValueInternal(
|
|||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothDBusService::ReplyTovCardPulling(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothDBusService::ReplyTovCardPulling(
|
||||
Blob* aBlob,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothDBusService::ReplyToPhonebookPulling(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothDBusService::ReplyToPhonebookPulling(
|
||||
Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothDBusService::ReplyTovCardListing(
|
||||
BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothDBusService::ReplyTovCardListing(
|
||||
Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -157,6 +157,37 @@ public:
|
|||
virtual void
|
||||
IsScoConnected(BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardPulling(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardPulling(Blob* aBlob,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyToPhonebookPulling(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyToPhonebookPulling(Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardListing(BlobParent* aBlobParent,
|
||||
BlobChild* aBlobChild,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable) override;
|
||||
|
||||
virtual void
|
||||
ReplyTovCardListing(Blob* aBlob,
|
||||
uint16_t aPhonebookSize,
|
||||
BluetoothReplyRunnable* aRunnable);
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
virtual void
|
||||
AnswerWaitingCall(BluetoothReplyRunnable* aRunnable);
|
||||
|
|
Загрузка…
Ссылка в новой задаче