Bug 1152667 - Remove NfcGonkMessage.h r=dimi

From 391484fa778ea08a5041bece49ef4ee14e13c7a4 Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/NfcGonkMessage.h      | 44 --------------------------------------
 dom/nfc/gonk/NfcMessageHandler.cpp |  8 ++++---
 dom/nfc/gonk/NfcService.cpp        |  1 -
 3 files changed, 5 insertions(+), 48 deletions(-)
 delete mode 100644 dom/nfc/gonk/NfcGonkMessage.h
This commit is contained in:
Yoshi Huang 2015-04-09 15:54:02 +08:00
parent ea8fc2b3ce
commit 0a6632197d
3 changed files with 5 additions and 48 deletions

View File

@ -1,44 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef NfcGonkMessage_h
#define NfcGonkMessage_h
namespace mozilla {
#define NFCD_MAJOR_VERSION 1
#define NFCD_MINOR_VERSION 22
enum NfcTechlogy {
NDEF = 0,
NDEFWritable,
NDEFFormattable,
P2P,
};
enum NfcErrorCode {
Success = 0,
IOErr = 1,
Timeout = 2,
BusyErr = 3,
ConnectErr = 4,
DisconnectErr = 5,
ReadErr = 6,
WriteErr = 7,
InvalidParam = 8,
InsufficientResources = 9,
SocketCreation = 10,
FailEnableDiscovery = 11,
FailDisableDiscovery = 12,
NotInitialized = 13,
InitializeFail = 14,
DeinitializeFail = 15,
NotSupported = 16,
FailEnableLowPowerMode = 17,
FailDisableLowPowerMode = 18,
};
} // namespace mozilla
#endif // NfcGonkMessage_h

View File

@ -6,13 +6,15 @@
#include <binder/Parcel.h>
#include "mozilla/dom/MozNDEFRecordBinding.h"
#include "nsDebug.h"
#include "NfcGonkMessage.h"
#include "NfcOptions.h"
#include "mozilla/unused.h"
#include <android/log.h>
#define NMH_LOG(args...) __android_log_print(ANDROID_LOG_INFO, "NfcMessageHandler", args)
#define NFCD_MAJOR_VERSION 1
#define NFCD_MINOR_VERSION 22
using namespace android;
using namespace mozilla;
using namespace mozilla::dom;
@ -168,7 +170,7 @@ NfcMessageHandler::ReadNDEFResponse(const Parcel& aParcel, EventOptions& aOption
aOptions.mRequestId = mRequestIdQueue[0];
mRequestIdQueue.RemoveElementAt(0);
if (aOptions.mErrorCode == NfcErrorCode::Success) {
if (aOptions.mErrorCode == 0) {
ReadNDEFMessage(aParcel, aOptions);
}
@ -202,7 +204,7 @@ NfcMessageHandler::TransceiveResponse(const Parcel& aParcel, EventOptions& aOpti
aOptions.mRequestId = mRequestIdQueue[0];
mRequestIdQueue.RemoveElementAt(0);
if (aOptions.mErrorCode == NfcErrorCode::Success) {
if (aOptions.mErrorCode == 0) {
ReadTransceiveResponse(aParcel, aOptions);
}

View File

@ -14,7 +14,6 @@
#include "nsAutoPtr.h"
#include "nsString.h"
#include "nsXULAppAPI.h"
#include "NfcGonkMessage.h"
#include "NfcOptions.h"
#define NS_NFCSERVICE_CID \