30 #include <nsIAppStartupNotifier.h>
31 #include <nsIClassInfoImpl.h>
32 #include <nsIMutableArray.h>
33 #include <nsIObserverService.h>
34 #include <nsIProgrammingLanguage.h>
35 #include <nsISupportsPrimitives.h>
37 #include <nsArrayUtils.h>
38 #include <nsAutoLock.h>
39 #include <nsAutoPtr.h>
40 #include <nsComponentManagerUtils.h>
42 #include <nsServiceManagerUtils.h>
43 #include <nsIDOMWindow.h>
44 #include <nsIPromptService.h>
48 #include "sbIDeviceController.h"
53 #include <sbIPrompter.h>
54 #include <sbILibraryManager.h>
55 #include <sbIServiceManager.h>
58 #define NS_PROFILE_STARTUP_OBSERVER_ID "profile-after-change"
59 #define NS_QUIT_APPLICATION_REQUESTED_OBSERVER_ID "quit-application-requested"
60 #define NS_QUIT_APPLICATION_GRANTED_OBSERVER_ID "quit-application-granted"
61 #define NS_PROFILE_SHUTDOWN_OBSERVER_ID "profile-before-change"
62 #define SB_MAIN_LIBRARY_READY_OBSERVER_ID "songbird-main-library-ready"
76 sbIDeviceControllerRegistrar,
79 nsISupportsWeakReference)
84 sbDeviceManager::sbDeviceManager()
86 mHasAllowedShutdown(PR_FALSE)
90 sbDeviceManager::~sbDeviceManager()
96 PLDHashOperator sbDeviceManager::EnumerateIntoArray(
const nsID& aKey,
100 nsIMutableArray *
array = (nsIMutableArray*)aArray;
102 nsCOMPtr<nsISupports> supports = do_QueryInterface(aData, &rv);
103 NS_ENSURE_SUCCESS(rv, PL_DHASH_STOP);
105 rv = array->AppendElement(aData,
false);
106 NS_ENSURE_SUCCESS(rv, PL_DHASH_STOP);
108 return PL_DHASH_NEXT;
112 NS_IMETHODIMP sbDeviceManager::GetMarshalls(nsIArray * *aMarshalls)
114 NS_ENSURE_ARG_POINTER(aMarshalls);
122 NS_ENSURE_SUCCESS(rv, rv);
125 nsCOMPtr<nsIMutableArray> array =
126 do_CreateInstance(
"@songbirdnest.com/moz/xpcom/threadsafe-array;1", &rv);
127 NS_ENSURE_SUCCESS(rv, rv);
130 count =
mMarshalls.EnumerateRead(sbDeviceManager::EnumerateIntoArray,
135 rv = array->GetLength(&count);
136 NS_ENSURE_SUCCESS(rv, rv);
138 return NS_ERROR_FAILURE;
141 return CallQueryInterface(array, aMarshalls);
145 NS_IMETHODIMP sbDeviceManager::GetMarshallByID(
const nsID * aIDPtr,
148 NS_ENSURE_ARG_POINTER(_retval);
149 NS_ENSURE_ARG_POINTER(aIDPtr);
154 nsresult rv =
Init();
155 NS_ENSURE_SUCCESS(rv, rv);
158 PRBool succeded =
mMarshalls.Get(*aIDPtr, _retval);
159 return succeded ?
NS_OK : NS_ERROR_NOT_AVAILABLE;
163 NS_IMETHODIMP sbDeviceManager::UpdateDevices()
166 nsresult rv = this->GetControllers(getter_AddRefs(controllers));
167 NS_ENSURE_SUCCESS(rv, rv);
170 rv = controllers->GetLength(&length);
171 NS_ENSURE_SUCCESS(rv, rv);
173 for (PRUint32
i = 0;
i < length; ++
i) {
174 nsCOMPtr<sbIDeviceController> controller;
176 getter_AddRefs(controller));
177 NS_ENSURE_SUCCESS(rv, rv);
178 rv = controller->ConnectDevices();
179 NS_ENSURE_SUCCESS(rv, rv);
188 NS_IMETHODIMP sbDeviceManager::CreateEvent(PRUint32 aType,
191 PRUint32 aDeviceState,
192 PRUint32 aDeviceSubState,
204 NS_IMETHODIMP sbDeviceManager::CreateBeforeAddedData(
213 NS_IMETHODIMP sbDeviceManager::GetDeviceForItem(
sbIMediaItem* aMediaItem,
216 NS_ENSURE_ARG_POINTER(aMediaItem);
217 NS_ENSURE_ARG_POINTER(_retval);
222 nsCOMPtr<nsIArray> deviceList;
223 rv = GetDevices(getter_AddRefs(deviceList));
224 NS_ENSURE_SUCCESS(rv, rv);
227 PRUint32 deviceCount;
228 rv = deviceList->GetLength(&deviceCount);
229 NS_ENSURE_SUCCESS(rv, rv);
230 for (PRUint32
i = 0;
i < deviceCount;
i++) {
232 nsCOMPtr<sbIDevice> device = do_QueryElementAt(deviceList,
i, &rv);
233 NS_ENSURE_SUCCESS(rv, rv);
237 nsCOMPtr<sbIDeviceLibrary> library;
240 getter_AddRefs(library));
241 if (NS_SUCCEEDED(rv)) {
242 device.swap(*_retval);
253 NS_IMETHODIMP sbDeviceManager::GetControllers(nsIArray * *aControllers)
255 NS_ENSURE_ARG_POINTER(aControllers);
263 NS_ENSURE_SUCCESS(rv, rv);
266 nsCOMPtr<nsIMutableArray> array =
267 do_CreateInstance(
"@songbirdnest.com/moz/xpcom/threadsafe-array;1", &rv);
268 NS_ENSURE_SUCCESS(rv, rv);
271 count =
mControllers.EnumerateRead(sbDeviceManager::EnumerateIntoArray,
276 rv = array->GetLength(&count);
277 NS_ENSURE_SUCCESS(rv, rv);
279 return NS_ERROR_FAILURE;
282 return CallQueryInterface(array, aControllers);
289 NS_ENSURE_ARG_POINTER(aController);
297 NS_ENSURE_SUCCESS(rv, rv);
301 rv = aController->GetId(&
id);
302 NS_ENSURE_SUCCESS(rv, rv);
303 NS_ENSURE_ARG_POINTER(
id);
307 return succeeded ?
NS_OK : NS_ERROR_OUT_OF_MEMORY;
313 NS_ENSURE_ARG_POINTER(aController);
321 NS_ENSURE_SUCCESS(rv, rv);
325 rv = aController->GetId(&
id);
326 NS_ENSURE_SUCCESS(rv, rv);
327 NS_ENSURE_ARG_POINTER(
id);
335 NS_IMETHODIMP sbDeviceManager::GetController(
const nsID * aControllerId,
338 NS_ENSURE_ARG_POINTER(_retval);
339 NS_ENSURE_ARG_POINTER(aControllerId);
344 nsresult rv =
Init();
345 NS_ENSURE_SUCCESS(rv, rv);
349 PRBool succeded =
mControllers.Get(*aControllerId, _retval);
350 return succeded ?
NS_OK : NS_ERROR_NOT_AVAILABLE;
354 NS_IMETHODIMP sbDeviceManager::GetDevices(nsIArray * *aDevices)
356 NS_ENSURE_ARG_POINTER(aDevices);
364 NS_ENSURE_SUCCESS(rv, rv);
367 nsCOMPtr<nsIMutableArray> array =
368 do_CreateInstance(
"@songbirdnest.com/moz/xpcom/threadsafe-array;1", &rv);
369 NS_ENSURE_SUCCESS(rv, rv);
372 count =
mDevices.EnumerateRead(sbDeviceManager::EnumerateIntoArray,
377 rv = array->GetLength(&count);
378 NS_ENSURE_SUCCESS(rv, rv);
380 return NS_ERROR_FAILURE;
383 return CallQueryInterface(array, aDevices);
387 NS_IMETHODIMP sbDeviceManager::RegisterDevice(
sbIDevice *aDevice)
389 NS_ENSURE_ARG_POINTER(aDevice);
390 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
397 rv = aDevice->GetId(&
id);
398 NS_ENSURE_SUCCESS(rv, rv);
399 NS_ENSURE_ARG_POINTER(
id);
401 PRBool succeeded =
mDevices.Put(*
id, aDevice);
404 return NS_ERROR_OUT_OF_MEMORY;
407 rv = aDevice->Connect();
411 NS_ENSURE_SUCCESS(rv, rv);
417 NS_IMETHODIMP sbDeviceManager::UnregisterDevice(
sbIDevice *aDevice)
419 NS_ENSURE_ARG_POINTER(aDevice);
427 NS_ENSURE_SUCCESS(rv, rv);
431 rv = aDevice->GetId(&
id);
432 NS_ENSURE_SUCCESS(rv, rv);
433 NS_ENSURE_ARG_POINTER(
id);
441 NS_IMETHODIMP sbDeviceManager::GetDevice(
const nsID * aDeviceId,
444 NS_ENSURE_ARG_POINTER(_retval);
445 NS_ENSURE_ARG_POINTER(aDeviceId);
450 nsresult rv =
Init();
451 NS_ENSURE_SUCCESS(rv, rv);
454 PRBool succeeded =
mDevices.Get(*aDeviceId, _retval);
455 return succeeded ?
NS_OK : NS_ERROR_NOT_AVAILABLE;
459 NS_IMETHODIMP sbDeviceManager::Observe(
nsISupports *aSubject,
461 const PRUnichar *aData)
464 if (!strcmp(aTopic, APPSTARTUP_CATEGORY)) {
466 nsCOMPtr<nsIObserverService> obsSvc =
467 do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv);
468 NS_ENSURE_SUCCESS(rv, rv);
471 do_QueryInterface(NS_ISUPPORTS_CAST(
nsIObserver*,
this), &rv);
472 NS_ENSURE_SUCCESS(rv, rv);
475 NS_ENSURE_SUCCESS(rv, rv);
477 rv = obsSvc->AddObserver(observer,
480 NS_ENSURE_SUCCESS(rv, rv);
483 NS_ENSURE_SUCCESS(rv, rv);
486 NS_ENSURE_SUCCESS(rv, rv);
489 NS_ENSURE_SUCCESS(rv, rv);
492 NS_ENSURE_SUCCESS(rv, rv);
497 NS_ENSURE_SUCCESS(rv, rv);
502 NS_ENSURE_SUCCESS(rv, rv);
507 PRBool shouldQuit = PR_FALSE;
509 NS_ENSURE_SUCCESS(rv, rv);
512 nsCOMPtr<nsISupportsPRBool> stopShutdown =
513 do_QueryInterface(aSubject, &rv);
514 NS_ENSURE_SUCCESS(rv, rv);
515 rv = stopShutdown->SetData(PR_TRUE);
516 NS_ENSURE_SUCCESS(rv, rv);
524 NS_ENSURE_SUCCESS(rv, rv);
528 nsCOMPtr<nsIObserverService> obsSvc =
529 do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv);
530 NS_ENSURE_SUCCESS(rv, rv);
532 nsCOMPtr<nsIObserver> observer =
533 do_QueryInterface(NS_ISUPPORTS_CAST(
nsIObserver*,
this), &rv);
534 NS_ENSURE_SUCCESS(rv, rv);
537 NS_ENSURE_SUCCESS(rv, rv);
542 NS_ENSURE_SUCCESS(rv, rv);
546 NS_ENSURE_SUCCESS(rv, rv);
549 nsCOMPtr<nsIObserverService> obsSvc =
550 do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv);
551 NS_ENSURE_SUCCESS(rv, rv);
553 nsCOMPtr<nsIObserver> observer =
554 do_QueryInterface(NS_ISUPPORTS_CAST(
nsIObserver*,
this), &rv);
555 NS_ENSURE_SUCCESS(rv, rv);
558 NS_ENSURE_SUCCESS(rv, rv);
561 NS_ENSURE_SUCCESS(rv, rv);
564 NS_ENSURE_SUCCESS(rv, rv);
567 NS_ENSURE_SUCCESS(rv, rv);
576 NS_ENSURE_FALSE(
mMonitor, NS_ERROR_ALREADY_INITIALIZED);
578 mMonitor = nsAutoMonitor::NewMonitor(__FILE__);
579 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_OUT_OF_MEMORY);
586 NS_ENSURE_TRUE(succeeded, NS_ERROR_OUT_OF_MEMORY);
589 NS_ENSURE_TRUE(succeeded, NS_ERROR_OUT_OF_MEMORY);
592 NS_ENSURE_TRUE(succeeded, NS_ERROR_OUT_OF_MEMORY);
595 nsCOMPtr<nsICategoryManager> catMgr =
596 do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
597 NS_ENSURE_SUCCESS(rv, rv);
599 nsCOMPtr<nsISimpleEnumerator> enumerator;
600 rv = catMgr->EnumerateCategory(
"songbird-device-marshall",
601 getter_AddRefs(enumerator));
602 NS_ENSURE_SUCCESS(rv, rv);
605 rv = enumerator->HasMoreElements(&hasMore);
606 NS_ENSURE_SUCCESS(rv, rv);
609 nsCOMPtr<nsISupports> supports;
610 rv = enumerator->GetNext(getter_AddRefs(supports));
611 NS_ENSURE_SUCCESS(rv, rv);
613 nsCOMPtr<nsISupportsCString>
data = do_QueryInterface(supports, &rv);
614 NS_ENSURE_SUCCESS(rv, rv);
617 rv = data->GetData(entryName);
618 NS_ENSURE_SUCCESS(rv, rv);
621 rv = catMgr->GetCategoryEntry(
"songbird-device-marshall", entryName.get(), &contractId);
622 NS_ENSURE_SUCCESS(rv, rv);
624 nsCOMPtr<sbIDeviceMarshall> marshall =
625 do_CreateInstance(contractId, &rv);
627 NS_ENSURE_SUCCESS(rv, rv);
630 rv = marshall->GetId(&
id);
631 NS_ENSURE_SUCCESS(rv, rv);
635 NS_ENSURE_TRUE(succeeded, NS_ERROR_OUT_OF_MEMORY);
638 nsCOMPtr<sbIDeviceControllerRegistrar>
registrar =
640 NS_ENSURE_SUCCESS(rv, rv);
642 rv = marshall->LoadControllers(registrar);
643 NS_ENSURE_SUCCESS(rv, rv);
645 rv = enumerator->HasMoreElements(&hasMore);
646 NS_ENSURE_SUCCESS(rv, rv);
654 nsCOMPtr<sbIServiceManager>
656 NS_ENSURE_SUCCESS(rv, rv);
659 NS_ENSURE_SUCCESS(rv, rv);
664 nsresult sbDeviceManager::GetCanDisconnect(PRBool* aCanDisconnect)
666 NS_ENSURE_ARG_POINTER(aCanDisconnect);
667 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
674 rv = GetDevices(getter_AddRefs(devices));
675 NS_ENSURE_SUCCESS(rv, rv);
678 rv = devices->GetLength(&length);
679 NS_ENSURE_SUCCESS(rv, rv);
683 for (PRUint32
i = 0;
i < length; ++
i) {
684 nsCOMPtr<sbIDevice> device;
685 rv = devices->QueryElementAt(
i, NS_GET_IID(
sbIDevice),
686 getter_AddRefs(device));
687 NS_ENSURE_SUCCESS(rv, rv);
689 rv = device->GetCanDisconnect(&canDisconnect);
690 NS_ENSURE_SUCCESS(rv, rv);
692 if (!canDisconnect) {
706 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
711 rv = this->GetMarshalls(getter_AddRefs(marshalls));
712 NS_ENSURE_SUCCESS(rv, rv);
716 rv = marshalls->GetLength(&length);
717 NS_ENSURE_SUCCESS(rv, rv);
718 for (PRUint32
i = 0;
i < length;
i++) {
720 nsCOMPtr<sbIDeviceMarshall> marshall;
721 rv = marshalls->QueryElementAt(
i,
723 getter_AddRefs(marshall));
725 NS_WARNING(
"sbDeviceManager::BeginMarshallMonitoring: "
726 "marshall failed to QI to sbIDeviceMarshall");
731 rv = marshall->BeginMonitoring();
732 NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
733 "sbDeviceManager::BeginMarshallMonitoring: "
734 "BeginMonitoring failed");
742 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
750 rv = GetCanDisconnect(&canDisconnect);
751 NS_ENSURE_SUCCESS(rv, rv);
753 if (!canDisconnect) {
755 nsCOMPtr<nsIPromptService> prompter =
756 do_CreateInstance(
"@songbirdnest.com/Songbird/Prompter;1", &rv);
757 NS_ENSURE_SUCCESS(rv, rv);
760 nsString title = bundle.
Get(
"device.dialog.quitwhileactive.title");
761 nsString
message = bundle.
Get(
"device.dialog.quitwhileactive.message");
762 nsString label0 = bundle.
Get(
"device.dialog.quitwhileactive.quit");
763 nsString label1 = bundle.
Get(
"device.dialog.quitwhileactive.noquit");
764 PRUint32 buttonFlags = nsIPromptService::BUTTON_POS_0 *
765 nsIPromptService::BUTTON_TITLE_IS_STRING +
766 nsIPromptService::BUTTON_POS_1 *
767 nsIPromptService::BUTTON_TITLE_IS_STRING;
768 PRInt32 buttonPressed;
770 rv = prompter->ConfirmEx
781 NS_ENSURE_SUCCESS(rv, rv);
784 *aShouldQuit = buttonPressed == 0;
787 *aShouldQuit = PR_TRUE;
798 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
811 rv = GetCanDisconnect(&canDisconnect);
812 NS_ENSURE_SUCCESS(rv, rv);
814 if (!canDisconnect) {
816 nsCOMPtr<sbIPrompter> prompter =
817 do_CreateInstance(
"@songbirdnest.com/Songbird/Prompter;1", &rv);
818 NS_ENSURE_SUCCESS(rv, rv);
823 nsCOMPtr<nsIDOMWindow> dialogWindow;
826 NS_LITERAL_STRING(
"chrome://songbird/content/xul/waitForCompletion.xul"),
827 NS_LITERAL_STRING(
"waitForCompletion"),
828 NS_LITERAL_STRING(
""),
830 getter_AddRefs(dialogWindow));
844 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
848 nsCOMPtr<sbIServiceManager>
850 NS_ENSURE_SUCCESS(rv, rv);
853 NS_ENSURE_SUCCESS(rv, rv);
857 rv = this->GetMarshalls(getter_AddRefs(marshalls));
858 NS_ENSURE_SUCCESS(rv, rv);
861 rv = marshalls->GetLength(&length);
862 NS_ENSURE_SUCCESS(rv, rv);
864 for (PRUint32
i = 0;
i < length; ++
i) {
865 nsCOMPtr<sbIDeviceMarshall> marshall;
867 getter_AddRefs(marshall));
868 NS_ENSURE_SUCCESS(rv, rv);
869 rv = marshall->StopMonitoring();
870 NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
871 "StopMonitoring returned an error, monitoring of devices may not be completely stopped.");
876 rv = this->GetControllers(getter_AddRefs(controllers));
877 NS_ENSURE_SUCCESS(rv, rv);
879 rv = controllers->GetLength(&length);
880 NS_ENSURE_SUCCESS(rv, rv);
882 for (PRUint32
i = 0;
i < length; ++
i) {
883 nsCOMPtr<sbIDeviceController> controller;
885 getter_AddRefs(controller));
887 NS_WARNING(
"Failed to disconnect device.");
890 rv = controller->DisconnectDevices();
892 NS_WARNING(
"Failed to disconnect device.");
898 NS_WARNING(
"Failed to remove all devices.");
907 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
913 rv = this->GetControllers(getter_AddRefs(controllers));
914 NS_ENSURE_SUCCESS(rv, rv);
917 rv = controllers->GetLength(&length);
918 NS_ENSURE_SUCCESS(rv, rv);
920 for (PRUint32
i = 0;
i < length; ++
i) {
921 nsCOMPtr<sbIDeviceController> controller;
923 getter_AddRefs(controller));
924 NS_ENSURE_SUCCESS(rv, rv);
925 rv = controller->ReleaseDevices();
926 NS_ENSURE_SUCCESS(rv, rv);
941 rv = this->GetDevices(getter_AddRefs(devices));
942 NS_ENSURE_SUCCESS(rv, rv);
946 rv = devices->GetLength(&length);
947 NS_ENSURE_SUCCESS(rv, rv);
948 for (PRInt32
i = length - 1;
i >= 0;
i--) {
950 nsCOMPtr<sbIDevice> device = do_QueryElementAt(devices,
i, &rv);
951 NS_ENSURE_SUCCESS(rv, rv);
954 nsCOMPtr<sbIDeviceController> controller;
955 nsID* controllerID = nsnull;
956 rv = device->GetControllerId(&controllerID);
957 NS_ENSURE_SUCCESS(rv, rv);
959 rv = GetController(controllerID, getter_AddRefs(controller));
960 NS_ENSURE_SUCCESS(rv, rv);
963 nsCOMPtr<sbIDeviceMarshall> marshall;
964 nsID* marshallID = nsnull;
965 rv = controller->GetMarshallId(&marshallID);
966 NS_ENSURE_SUCCESS(rv, rv);
968 rv = GetMarshallByID(marshallID, getter_AddRefs(marshall));
969 NS_ENSURE_SUCCESS(rv, rv);
972 rv = marshall->RemoveDevice(device);
973 NS_ENSURE_SUCCESS(rv, rv);
#define NS_QUIT_APPLICATION_REQUESTED_OBSERVER_ID
static sbDeviceEvent * CreateEvent()
nsresult RemoveAllDevices()
#define SB_MAIN_LIBRARY_READY_OBSERVER_ID
function succeeded(ch, cx, status, data)
#define NS_QUIT_APPLICATION_GRANTED_OBSERVER_ID
nsresult QuitApplicationGranted()
nsString Get(const nsAString &aKey, const nsAString &aDefault=SBVoidString())
static nsresult GetDeviceLibraryForItem(sbIDevice *aDevice, sbIMediaItem *aItem, sbIDeviceLibrary **_retval)
NS_IMPL_QUERY_INTERFACE7_CI(sbDeviceManager, sbIDeviceManager2, sbIDeviceControllerRegistrar, sbIDeviceRegistrar, sbIDeviceEventTarget, nsISupportsWeakReference, nsIClassInfo, nsIObserver) NS_IMPL_CI_INTERFACE_GETTER5(sbDeviceManager
NS_IMPL_THREADSAFE_RELEASE(sbRequestItem)
NS_IMPL_THREADSAFE_ADDREF(sbRequestItem)
readonly attribute nsIArray marshalls
[UNIMPLEMENTED UNTIL AFTER 0.3]
PRBool mHasAllowedShutdown
#define NS_PROFILE_SHUTDOWN_OBSERVER_ID
nsInterfaceHashtableMT< nsIDHashKey, sbIDeviceController > mControllers
nsInterfaceHashtableMT< nsIDHashKey, sbIDevice > mDevices
#define SB_SERVICE_MANAGER_CONTRACTID
Songbird String Bundle Definitions.
[UNIMPLEMENTED UNTIL AFTER 0.3]
nsresult BeginMarshallMonitoring()
StringArrayEnumerator prototype hasMore
static nsresult CreateEventBeforeAddedData(sbIDevice *aDevice, sbIDeviceEventBeforeAddedData **aBeforeAddedData)
readonly attribute nsIArray devices
#define SONGBIRD_DEVICEMANAGER2_CONTRACTID
nsresult QuitApplicationRequested(PRBool *aShouldQuit)
nsInterfaceHashtableMT< nsIDHashKey, sbIDeviceMarshall > mMarshalls
nsresult PrepareShutdown()
[UNIMPLEMENTED UNTIL AFTER 0.3]
_getSelectedPageStyle s i
readonly attribute boolean canDisconnect
#define NS_PROFILE_STARTUP_OBSERVER_ID
const SB_LIBRARY_MANAGER_BEFORE_SHUTDOWN_TOPIC
_updateTextAndScrollDataForFrame aData
readonly attribute nsIArray controllers