Trees | Indices | Help |
---|
|
1 # -*- Mode: Python; test-case-name: flumotion.test.test_component_providers -*- 2 # vi:si:et:sw=4:sts=4:ts=4 3 4 # Flumotion - a streaming media server 5 # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. 6 # Copyright (C) 2010,2011 Flumotion Services, S.A. 7 # All rights reserved. 8 # 9 # This file may be distributed and/or modified under the terms of 10 # the GNU Lesser General Public License version 2.1 as published by 11 # the Free Software Foundation. 12 # This file is distributed without any warranty; without even the implied 13 # warranty of merchantability or fitness for a particular purpose. 14 # See "LICENSE.LGPL" in the source distribution for more information. 15 # 16 # Headers in this file shall remain intact. 17 18 from twisted.internet import defer 19 20 from flumotion.common import log 21 from flumotion.component.misc.httpserver import fileprovider 22 from flumotion.component.misc.httpserver import localpath 23 from flumotion.component.misc.httpserver.httpcached import file_reader 24 25 26 BASE_PATH = "/" 27 28 LOG_CATEGORY = "fileprovider-httpcached" 29 3032 """ 33 Implements the FileProviderPlug interface over a FileReader instance. 34 35 Needed because FileReader do not support file browsing. 36 """ 37 38 logCategory = LOG_CATEGORY 39 4268 69 8444 d = defer.Deferred() 45 d.addCallback(lambda _: self._reader.start()) 46 d.addCallback(lambda _: self) # Don't return internal references 47 d.callback(None) 48 return d4951 d = defer.Deferred() 52 d.addCallback(lambda _: self._reader.stop()) 53 d.addCallback(lambda _: self) # Don't return internal references 54 d.callback(None) 55 return d5658 #FIXME: This is temporary. Should be done with plug UI. 59 # Used for the UI to know which plug is used 60 updater.update("provider-name", "fileprovider-httpcached") 61 self._reader.stats.startUpdates(updater)62 65
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Aug 13 06:17:21 2013 | http://epydoc.sourceforge.net |