mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 833278 - Part 1/2: move voicemail sources to dom/voicemail. r=mounir
--HG-- rename : dom/telephony/Makefile.in => dom/voicemail/Makefile.in rename : dom/telephony/Voicemail.cpp => dom/voicemail/Voicemail.cpp rename : dom/telephony/Voicemail.h => dom/voicemail/Voicemail.h rename : dom/telephony/VoicemailEvent.cpp => dom/voicemail/VoicemailEvent.cpp rename : dom/telephony/VoicemailEvent.h => dom/voicemail/VoicemailEvent.h rename : dom/telephony/nsIDOMVoicemail.idl => dom/voicemail/nsIDOMMozVoicemail.idl rename : dom/telephony/nsIDOMVoicemailEvent.idl => dom/voicemail/nsIDOMMozVoicemailEvent.idl rename : dom/telephony/nsIDOMVoicemailStatus.idl => dom/voicemail/nsIDOMMozVoicemailStatus.idl rename : dom/telephony/nsIDOMNavigatorTelephony.idl => dom/voicemail/nsINavigatorVoicemail.idl rename : dom/telephony/test/marionette/pdu_builder.js => dom/voicemail/test/marionette/pdu_builder.js rename : dom/telephony/test/marionette/test_voicemail_number.js => dom/voicemail/test/marionette/test_voicemail_number.js rename : dom/telephony/test/marionette/test_voicemail_statuschanged.js => dom/voicemail/test/marionette/test_voicemail_statuschanged.js rename : dom/telephony/test/marionette/test_voicemail_statuschanged.py => dom/voicemail/test/marionette/test_voicemail_statuschanged.py
This commit is contained in:
parent
b300134c65
commit
f749d57c57
@ -162,6 +162,7 @@
|
||||
@BINPATH@/components/dom_system.xpt
|
||||
#ifdef MOZ_B2G_RIL
|
||||
@BINPATH@/components/dom_telephony.xpt
|
||||
@BINPATH@/components/dom_voicemail.xpt
|
||||
@BINPATH@/components/dom_wifi.xpt
|
||||
@BINPATH@/components/dom_system_gonk.xpt
|
||||
@BINPATH@/components/dom_icc.xpt
|
||||
|
@ -167,6 +167,7 @@
|
||||
@BINPATH@/components/dom_system.xpt
|
||||
#ifdef MOZ_B2G_RIL
|
||||
@BINPATH@/components/dom_telephony.xpt
|
||||
@BINPATH@/components/dom_voicemail.xpt
|
||||
@BINPATH@/components/dom_wifi.xpt
|
||||
@BINPATH@/components/dom_system_gonk.xpt
|
||||
@BINPATH@/components/dom_icc.xpt
|
||||
|
@ -90,6 +90,7 @@ PARALLEL_DIRS += \
|
||||
wifi \
|
||||
icc \
|
||||
cellbroadcast \
|
||||
voicemail \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
#ifdef MOZ_B2G_RIL
|
||||
#include "MobileConnection.h"
|
||||
#include "mozilla/dom/CellBroadcast.h"
|
||||
#include "mozilla/dom/Voicemail.h"
|
||||
#endif
|
||||
#include "nsIIdleObserver.h"
|
||||
#include "nsIPermissionManager.h"
|
||||
@ -135,6 +136,7 @@ NS_INTERFACE_MAP_BEGIN(Navigator)
|
||||
#ifdef MOZ_B2G_RIL
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMozNavigatorMobileConnection)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMozNavigatorCellBroadcast)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMozNavigatorVoicemail)
|
||||
#endif
|
||||
#ifdef MOZ_B2G_BT
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMNavigatorBluetooth)
|
||||
@ -1246,6 +1248,10 @@ Navigator::GetMozTelephony(nsIDOMTelephony** aTelephony)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsNavigator::nsINavigatorVoicemail
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP
|
||||
Navigator::GetMozVoicemail(nsIDOMMozVoicemail** aVoicemail)
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
#ifdef MOZ_B2G_RIL
|
||||
#include "nsINavigatorMobileConnection.h"
|
||||
#include "nsINavigatorCellBroadcast.h"
|
||||
#include "nsINavigatorVoicemail.h"
|
||||
#endif
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIDOMNavigatorTime.h"
|
||||
@ -42,7 +43,6 @@ class nsIDOMMozConnection;
|
||||
#ifdef MOZ_B2G_RIL
|
||||
#include "nsIDOMNavigatorTelephony.h"
|
||||
class nsIDOMTelephony;
|
||||
class nsIDOMMozVoicemail;
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_B2G_BT
|
||||
@ -109,6 +109,7 @@ class Navigator : public nsIDOMNavigator
|
||||
#ifdef MOZ_B2G_RIL
|
||||
, public nsIMozNavigatorMobileConnection
|
||||
, public nsIMozNavigatorCellBroadcast
|
||||
, public nsIMozNavigatorVoicemail
|
||||
#endif
|
||||
#ifdef MOZ_B2G_BT
|
||||
, public nsIDOMNavigatorBluetooth
|
||||
@ -146,6 +147,7 @@ public:
|
||||
#ifdef MOZ_B2G_RIL
|
||||
NS_DECL_NSIMOZNAVIGATORMOBILECONNECTION
|
||||
NS_DECL_NSIMOZNAVIGATORCELLBROADCAST
|
||||
NS_DECL_NSIMOZNAVIGATORVOICEMAIL
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_B2G_BT
|
||||
|
@ -437,8 +437,8 @@ using mozilla::dom::workers::ResolveWorkerClasses;
|
||||
#ifdef MOZ_B2G_RIL
|
||||
#include "Telephony.h"
|
||||
#include "TelephonyCall.h"
|
||||
#include "nsIDOMVoicemail.h"
|
||||
#include "nsIDOMVoicemailEvent.h"
|
||||
#include "nsIDOMMozVoicemail.h"
|
||||
#include "nsIDOMMozVoicemailEvent.h"
|
||||
#include "nsIDOMIccManager.h"
|
||||
#include "StkCommandEvent.h"
|
||||
#include "nsIDOMMozCellBroadcast.h"
|
||||
@ -2210,6 +2210,7 @@ nsDOMClassInfo::Init()
|
||||
#ifdef MOZ_B2G_RIL
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIMozNavigatorMobileConnection)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIMozNavigatorCellBroadcast)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIMozNavigatorVoicemail)
|
||||
#endif
|
||||
#ifdef MOZ_B2G_BT
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNavigatorBluetooth)
|
||||
|
@ -21,8 +21,6 @@ include $(topsrcdir)/dom/dom-config.mk
|
||||
CPPSRCS = \
|
||||
Telephony.cpp \
|
||||
TelephonyCall.cpp \
|
||||
Voicemail.cpp \
|
||||
VoicemailEvent.cpp \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
@ -30,9 +28,6 @@ XPIDLSRCS = \
|
||||
nsIDOMTelephony.idl \
|
||||
nsIDOMTelephonyCall.idl \
|
||||
nsIDOMCallEvent.idl \
|
||||
nsIDOMVoicemail.idl \
|
||||
nsIDOMVoicemailEvent.idl \
|
||||
nsIDOMVoicemailStatus.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -8,15 +8,11 @@
|
||||
#define mozilla_dom_telephony_telephonyfactory_h__
|
||||
|
||||
#include "nsIDOMTelephony.h"
|
||||
#include "nsIDOMVoicemail.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
||||
// Implemented in Telephony.cpp / Voicemail.cpp.
|
||||
// Implemented in Telephony.cpp.
|
||||
|
||||
nsresult
|
||||
NS_NewTelephony(nsPIDOMWindow* aWindow, nsIDOMTelephony** aTelephony);
|
||||
|
||||
nsresult
|
||||
NS_NewVoicemail(nsPIDOMWindow* aWindow, nsIDOMMozVoicemail** aVoicemail);
|
||||
|
||||
#endif // mozilla_dom_telephony_telephonyfactory_h__
|
||||
|
@ -7,11 +7,9 @@
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMTelephony;
|
||||
interface nsIDOMMozVoicemail;
|
||||
|
||||
[scriptable, builtinclass, uuid(4a297d39-2730-47b8-b406-666b3737aacb)]
|
||||
[scriptable, builtinclass, uuid(214d3480-ef7b-45f2-9e21-c6763d7ff613)]
|
||||
interface nsIDOMNavigatorTelephony : nsISupports
|
||||
{
|
||||
readonly attribute nsIDOMTelephony mozTelephony;
|
||||
readonly attribute nsIDOMMozVoicemail mozVoicemail;
|
||||
};
|
||||
|
@ -16,9 +16,6 @@ disabled = Bug 761533
|
||||
[test_outgoing_busy.js]
|
||||
disabled = Bug 761533
|
||||
[test_outgoing_reject.js]
|
||||
[test_voicemail_statuschanged.py]
|
||||
disabled = Bug 806138
|
||||
[test_voicemail_number.js]
|
||||
[test_incoming_hold_resume.js]
|
||||
[test_outgoing_hold_resume.js]
|
||||
[test_incoming_already_connected.js]
|
||||
|
44
dom/voicemail/Makefile.in
Normal file
44
dom/voicemail/Makefile.in
Normal file
@ -0,0 +1,44 @@
|
||||
# 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/.
|
||||
|
||||
DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = dom
|
||||
LIBRARY_NAME = domvoicemail_s
|
||||
XPIDL_MODULE = dom_voicemail
|
||||
LIBXUL_LIBRARY = 1
|
||||
FORCE_STATIC_LIB = 1
|
||||
FAIL_ON_WARNINGS := 1
|
||||
|
||||
include $(topsrcdir)/dom/dom-config.mk
|
||||
|
||||
EXPORTS_NAMESPACES = mozilla/dom
|
||||
EXPORTS_mozilla/dom = \
|
||||
Voicemail.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
Voicemail.cpp \
|
||||
VoicemailEvent.cpp \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsINavigatorVoicemail.idl \
|
||||
nsIDOMMozVoicemail.idl \
|
||||
nsIDOMMozVoicemailEvent.idl \
|
||||
nsIDOMMozVoicemailStatus.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
XPIDL_FLAGS += \
|
||||
-I$(topsrcdir)/dom/base \
|
||||
-I$(topsrcdir)/dom/interfaces/base \
|
||||
-I$(topsrcdir)/dom/interfaces/events \
|
||||
$(NULL)
|
@ -5,7 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Voicemail.h"
|
||||
#include "nsIDOMVoicemailStatus.h"
|
||||
#include "nsIDOMMozVoicemailStatus.h"
|
||||
|
||||
#include "mozilla/Services.h"
|
||||
#include "nsContentUtils.h"
|
||||
@ -15,9 +15,10 @@
|
||||
|
||||
#include "VoicemailEvent.h"
|
||||
|
||||
DOMCI_DATA(MozVoicemail, mozilla::dom::telephony::Voicemail)
|
||||
DOMCI_DATA(MozVoicemail, mozilla::dom::Voicemail)
|
||||
|
||||
USING_TELEPHONY_NAMESPACE
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED_0(Voicemail, nsDOMEventTargetHelper)
|
||||
|
||||
@ -100,6 +101,9 @@ Voicemail::VoicemailNotification(nsIDOMMozVoicemailStatus* aStatus)
|
||||
return DispatchTrustedEvent(static_cast<nsIDOMMozVoicemailEvent*>(event));
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
nsresult
|
||||
NS_NewVoicemail(nsPIDOMWindow* aWindow, nsIDOMMozVoicemail** aVoicemail)
|
||||
{
|
||||
@ -111,7 +115,8 @@ NS_NewVoicemail(nsPIDOMWindow* aWindow, nsIDOMMozVoicemail** aVoicemail)
|
||||
do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
|
||||
NS_ENSURE_STATE(ril);
|
||||
|
||||
nsRefPtr<Voicemail> voicemail = new Voicemail(innerWindow, ril);
|
||||
nsRefPtr<mozilla::dom::Voicemail> voicemail =
|
||||
new mozilla::dom::Voicemail(innerWindow, ril);
|
||||
voicemail.forget(aVoicemail);
|
||||
return NS_OK;
|
||||
}
|
@ -4,20 +4,20 @@
|
||||
* 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 mozilla_dom_telephony_voicemail_h__
|
||||
#define mozilla_dom_telephony_voicemail_h__
|
||||
|
||||
#include "TelephonyCommon.h"
|
||||
#ifndef mozilla_dom_voicemail_voicemail_h__
|
||||
#define mozilla_dom_voicemail_voicemail_h__
|
||||
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "nsIDOMVoicemail.h"
|
||||
#include "nsIDOMMozVoicemail.h"
|
||||
#include "nsIRadioInterfaceLayer.h"
|
||||
|
||||
class nsPIDOMWindow;
|
||||
class nsIRILContentHelper;
|
||||
class nsIDOMMozVoicemailStatus;
|
||||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class Voicemail : public nsDOMEventTargetHelper,
|
||||
public nsIDOMMozVoicemail
|
||||
@ -54,6 +54,10 @@ private:
|
||||
};
|
||||
};
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_voicemail_h__
|
||||
nsresult
|
||||
NS_NewVoicemail(nsPIDOMWindow* aWindow, nsIDOMMozVoicemail** aVoicemail);
|
||||
|
||||
#endif // mozilla_dom_voicemail_voicemail_h__
|
@ -5,11 +5,12 @@
|
||||
|
||||
#include "VoicemailEvent.h"
|
||||
#include "nsDOMClassInfo.h"
|
||||
#include "nsIDOMVoicemailStatus.h"
|
||||
#include "nsIDOMMozVoicemailStatus.h"
|
||||
|
||||
DOMCI_DATA(MozVoicemailEvent, mozilla::dom::telephony::VoicemailEvent)
|
||||
DOMCI_DATA(MozVoicemailEvent, mozilla::dom::VoicemailEvent)
|
||||
|
||||
USING_TELEPHONY_NAMESPACE
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(VoicemailEvent, nsDOMEvent)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mStatus)
|
||||
@ -47,6 +48,9 @@ VoicemailEvent::GetStatus(nsIDOMMozVoicemailStatus** aStatus)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
namespace {
|
||||
|
||||
nsresult
|
||||
@ -55,7 +59,7 @@ NS_NewDOMVoicemailEvent(nsIDOMEvent** aInstancePtrResult,
|
||||
nsEvent* aEvent)
|
||||
{
|
||||
return CallQueryInterface(
|
||||
new mozilla::dom::telephony::VoicemailEvent(aPresContext, aEvent),
|
||||
new mozilla::dom::VoicemailEvent(aPresContext, aEvent),
|
||||
aInstancePtrResult);
|
||||
}
|
||||
|
@ -3,17 +3,16 @@
|
||||
* 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 mozilla_dom_telephony_VoicemailEvent_h__
|
||||
#define mozilla_dom_telephony_VoicemailEvent_h__
|
||||
#ifndef mozilla_dom_voicemail_VoicemailEvent_h__
|
||||
#define mozilla_dom_voicemail_VoicemailEvent_h__
|
||||
|
||||
#include "TelephonyCommon.h"
|
||||
|
||||
#include "nsIDOMVoicemailEvent.h"
|
||||
#include "nsIDOMMozVoicemailEvent.h"
|
||||
#include "nsDOMEvent.h"
|
||||
|
||||
class nsIDOMMozVoicemailStatus;
|
||||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class VoicemailEvent : public nsIDOMMozVoicemailEvent,
|
||||
public nsDOMEvent
|
||||
@ -37,6 +36,7 @@ private:
|
||||
nsCOMPtr<nsIDOMMozVoicemailStatus> mStatus;
|
||||
};
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_VoicemailEvent_h__
|
||||
#endif // mozilla_dom_voicemail_VoicemailEvent_h__
|
15
dom/voicemail/nsINavigatorVoicemail.idl
Normal file
15
dom/voicemail/nsINavigatorVoicemail.idl
Normal file
@ -0,0 +1,15 @@
|
||||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=40: */
|
||||
/* 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/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMMozVoicemail;
|
||||
|
||||
[scriptable, builtinclass, uuid(d4a37ee6-d265-480d-8757-6a7b9aafc4f3)]
|
||||
interface nsIMozNavigatorVoicemail : nsISupports
|
||||
{
|
||||
readonly attribute nsIDOMMozVoicemail mozVoicemail;
|
||||
};
|
8
dom/voicemail/test/marionette/manifest.ini
Normal file
8
dom/voicemail/test/marionette/manifest.ini
Normal file
@ -0,0 +1,8 @@
|
||||
[DEFAULT]
|
||||
b2g = true
|
||||
browser = false
|
||||
qemu = true
|
||||
|
||||
[test_voicemail_statuschanged.py]
|
||||
disabled = Bug 806138
|
||||
[test_voicemail_number.js]
|
@ -150,6 +150,7 @@ SHARED_LIBRARY_LIBS += \
|
||||
$(DEPTH)/dom/telephony/$(LIB_PREFIX)domtelephony_s.$(LIB_SUFFIX) \
|
||||
$(DEPTH)/dom/icc/src/$(LIB_PREFIX)dom_icc_s.$(LIB_SUFFIX) \
|
||||
$(DEPTH)/dom/cellbroadcast/src/$(LIB_PREFIX)dom_cellbroadcast_s.$(LIB_SUFFIX) \
|
||||
$(DEPTH)/dom/voicemail/$(LIB_PREFIX)domvoicemail_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
endif #}
|
||||
|
||||
|
@ -157,6 +157,7 @@
|
||||
@BINPATH@/components/dom_base.xpt
|
||||
#ifdef MOZ_B2G_RIL
|
||||
@BINPATH@/components/dom_telephony.xpt
|
||||
@BINPATH@/components/dom_voicemail.xpt
|
||||
@BINPATH@/components/dom_wifi.xpt
|
||||
@BINPATH@/components/dom_system_gonk.xpt
|
||||
#endif
|
||||
|
@ -16,6 +16,7 @@ skip = false
|
||||
|
||||
; webapi tests
|
||||
[include:../../../../../dom/telephony/test/marionette/manifest.ini]
|
||||
[include:../../../../../dom/voicemail/test/marionette/manifest.ini]
|
||||
[include:../../../../../dom/battery/test/marionette/manifest.ini]
|
||||
[include:../../../../../dom/sms/tests/marionette/manifest.ini]
|
||||
[include:../../../../../dom/network/tests/marionette/manifest.ini]
|
||||
|
@ -1207,6 +1207,7 @@ fi
|
||||
if [ "$MOZ_B2G_RIL" ]; then
|
||||
add_makefiles "
|
||||
dom/telephony/Makefile
|
||||
dom/voicemail/Makefile
|
||||
dom/wifi/Makefile
|
||||
ipc/ril/Makefile
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user