[Project_owners] Download manager observer

InBasic inb.cor at gmail.com
Tue Jul 31 10:16:49 PDT 2007


hi

any body can help

i want to add observer to download manager
i want to observer when all downloads are finished

var dl = Components.classes["@mozilla.org/download-manager;1"]
                   .getService(Components.interfaces.nsIDownloadManager);

var observerService = Components.classes["@mozilla.org/observer-service;1"]
                                .getService(
Components.interfaces.nsIObserverService);
observerService.addObserver(observer,     ?????    , false);

//    what can i put instead of ????? "i need observer when download
finished"

//     void observe ( nsISupports subject , char* topic , PRUnichar* data )

dl.observe ( observer , ?????    ,?????    )

// is it correct to put nsIDownloadManager.*DOWNLOAD_FINISHED  in *topic ?**
// PRUnichar* data

var observer = {
  observe:function(subject, topic, prefn) {

  }
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070731/08709f85/attachment.html 


More information about the Project_owners mailing list