51 #include <nsIProxyObjectManager.h>
54 #include <nsAutoLock.h>
55 #include <nsAutoPtr.h>
83 nsAutoMonitor monitor(mCompleteNotifyMonitor);
87 PR_AtomicSet(&mIsComplete, PR_TRUE);
109 PRMonitor* aCompleteNotifyMonitor)
112 NS_ENSURE_ARG_POINTER(aDeviceStreamingHandler);
113 NS_ENSURE_ARG_POINTER(aMediaItem);
114 NS_ENSURE_ARG_POINTER(aCompleteNotifyMonitor);
117 nsRefPtr<sbDeviceStreamingHandler>
119 NS_ENSURE_TRUE(handler, NS_ERROR_OUT_OF_MEMORY);
122 handler.forget(aDeviceStreamingHandler);
137 nsCOMPtr<sbIMediaItemController> mediaItemController;
138 rv = mMediaItem->GetItemController(getter_AddRefs(mediaItemController));
139 NS_ENSURE_SUCCESS(rv, rv);
143 nsCOMPtr<sbIMediaItemController> proxiedMediaItemController;
147 NS_PROXY_SYNC | NS_PROXY_ALWAYS,
148 getter_AddRefs(proxiedMediaItemController));
149 NS_ENSURE_SUCCESS(rv, rv);
152 rv = proxiedMediaItemController->ValidateStreaming(mMediaItem,
156 NS_ENSURE_SUCCESS(rv, rv);
193 PRMonitor* aCompleteNotifyMonitor)
194 : mCompleteNotifyMonitor(aCompleteNotifyMonitor),
195 mMediaItem(aMediaItem),
196 mIsComplete(PR_FALSE),
197 mIsSupported(PR_FALSE)
virtual ~sbDeviceStreamingHandler()
sbDeviceStreamingHandler(sbIMediaItem *aMediaItem, PRMonitor *aCompleteNotifyMonitor)
nsresult do_GetProxyForObject(nsIEventTarget *aTarget, REFNSIID aIID, nsISupports *aObj, PRInt32 aProxyType, void **aProxyObject)
nsresult CheckTransferable()
PRBool IsStreamingItemSupported()
NS_IMPL_THREADSAFE_ISUPPORTS1(sbDeviceStreamingHandler, sbIMediaItemControllerListener) NS_IMETHODIMP sbDeviceStreamingHandler
NS_DECL_ISUPPORTS static NS_DECL_SBIMEDIAITEMCONTROLLERLISTENER nsresult New(sbDeviceStreamingHandler **aDeviceStreamingHandler, sbIMediaItem *aMediaItem, PRMonitor *aCompleteNotifyMonitor)
Songbird Device Streaming handler Definitions.