1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "mozilla/dom/MozMobileMessageManagerBinding.h"
6 #include "nsISmsService.h"
10 namespace mobilemessage
{
12 #define ASSERT_SMS_EQUALITY(webidlType, webidlState, xpidlState) \
13 static_assert(static_cast<uint32_t>(webidlType::webidlState) == nsISmsService::xpidlState, \
14 #webidlType "::" #webidlState " should equal to nsISmsService::" #xpidlState)
19 #define ASSERT_SMS_TYPE_OF_NUMBER_EQUALITY(webidlState, xpidlState) \
20 ASSERT_SMS_EQUALITY(TypeOfNumber, webidlState, xpidlState)
22 ASSERT_SMS_TYPE_OF_NUMBER_EQUALITY(Unknown
, TYPE_OF_NUMBER_UNKNOWN
);
23 ASSERT_SMS_TYPE_OF_NUMBER_EQUALITY(International
, TYPE_OF_NUMBER_INTERNATIONAL
);
24 ASSERT_SMS_TYPE_OF_NUMBER_EQUALITY(National
, TYPE_OF_NUMBER_NATIONAL
);
25 ASSERT_SMS_TYPE_OF_NUMBER_EQUALITY(Network_specific
, TYPE_OF_NUMBER_NETWORK_SPECIFIC
);
26 ASSERT_SMS_TYPE_OF_NUMBER_EQUALITY(Dedicated_access_short_code
, TYPE_OF_NUMBER_DEDICATED_ACCESS_SHORT_CODE
);
28 #undef ASSERT_SMS_TYPE_OF_NUMBER_EQUALITY
31 * Enum NumberPlanIdentification
33 #define ASSERT_SMS_NUMBER_PLAN_IDENTIFICATION_EQUALITY(webidlState, xpidlState) \
34 ASSERT_SMS_EQUALITY(NumberPlanIdentification, webidlState, xpidlState)
36 ASSERT_SMS_NUMBER_PLAN_IDENTIFICATION_EQUALITY(Unknown
, NUMBER_PLAN_IDENTIFICATION_UNKNOWN
);
37 ASSERT_SMS_NUMBER_PLAN_IDENTIFICATION_EQUALITY(Isdn
, NUMBER_PLAN_IDENTIFICATION_ISDN
);
38 ASSERT_SMS_NUMBER_PLAN_IDENTIFICATION_EQUALITY(Data
, NUMBER_PLAN_IDENTIFICATION_DATA
);
39 ASSERT_SMS_NUMBER_PLAN_IDENTIFICATION_EQUALITY(Telex
, NUMBER_PLAN_IDENTIFICATION_TELEX
);
40 ASSERT_SMS_NUMBER_PLAN_IDENTIFICATION_EQUALITY(National
, NUMBER_PLAN_IDENTIFICATION_NATIONAL
);
41 ASSERT_SMS_NUMBER_PLAN_IDENTIFICATION_EQUALITY(Private
, NUMBER_PLAN_IDENTIFICATION_PRIVATE
);
43 #undef ASSERT_SMS_EQUALITY
45 } // namespace mobilemessage
47 } // namespace mozilla