зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1146270 - Move HCI Event Origin into NfcOptions.webidl. r=smaug, dimi
This commit is contained in:
Родитель
6f23993dec
Коммит
a4d03f3431
|
@ -39,13 +39,6 @@ enum NfcErrorCode {
|
|||
FailDisableLowPowerMode = 18,
|
||||
};
|
||||
|
||||
enum SecureElementOrigin {
|
||||
SIM = 0,
|
||||
ESE = 1,
|
||||
ASSD = 2,
|
||||
OriginEndGuard = 3
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // NfcGonkMessage_h
|
||||
|
|
|
@ -25,12 +25,6 @@ using namespace android;
|
|||
using namespace mozilla::dom;
|
||||
using namespace mozilla::ipc;
|
||||
|
||||
static const nsLiteralString SEOriginString[] = {
|
||||
NS_LITERAL_STRING("SIM"),
|
||||
NS_LITERAL_STRING("eSE"),
|
||||
NS_LITERAL_STRING("ASSD")
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
static NfcService* gNfcService;
|
||||
|
@ -191,10 +185,10 @@ public:
|
|||
|
||||
// HCI Event Transaction parameters.
|
||||
if (mEvent.mOriginType != -1) {
|
||||
MOZ_ASSERT(mEvent.mOriginType < SecureElementOrigin::OriginEndGuard);
|
||||
MOZ_ASSERT(static_cast<HCIEventOrigin>(mEvent.mOriginType) < HCIEventOrigin::EndGuard_);
|
||||
|
||||
event.mOrigin.Construct();
|
||||
event.mOrigin.Value().Assign(SEOriginString[mEvent.mOriginType]);
|
||||
event.mOrigin.Value().AssignASCII(HCIEventOriginValues::strings[mEvent.mOriginType].value);
|
||||
event.mOrigin.Value().AppendInt(mEvent.mOriginIndex, 16 /* radix */);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,15 @@ enum NfcNotificationType {
|
|||
"hciEventTransaction"
|
||||
};
|
||||
|
||||
/**
|
||||
* The source of HCI Transaction Event.
|
||||
*/
|
||||
enum HCIEventOrigin {
|
||||
"SIM",
|
||||
"eSE",
|
||||
"ASSD"
|
||||
};
|
||||
|
||||
dictionary NfcCommandOptions
|
||||
{
|
||||
required NfcRequestType type;
|
||||
|
|
Загрузка…
Ссылка в новой задаче