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 Fluendo, S.L. (www.fluendo.com). 6 # All rights reserved. 7 8 # This file may be distributed and/or modified under the terms of 9 # the GNU General Public License version 2 as published by 10 # the Free Software Foundation. 11 # This file is distributed without any warranty; without even the implied 12 # warranty of merchantability or fitness for a particular purpose. 13 # See "LICENSE.GPL" in the source distribution for more information. 14 15 # Licensees having purchased or holding a valid Flumotion Advanced 16 # Streaming Server license may use this file in accordance with the 17 # Flumotion Advanced Streaming Server Commercial License Agreement. 18 # See "LICENSE.Flumotion" in the source distribution for more information. 19 20 # Headers in this file shall remain intact. 21 22 from twisted.internet import defer 23 24 from flumotion.common import log 25 from flumotion.component.misc.httpserver import fileprovider 26 from flumotion.component.misc.httpserver import localpath 27 from flumotion.component.misc.httpserver.httpcached import file_reader 28 29 30 BASE_PATH = "/" 31 32 LOG_CATEGORY = "fileprovider-httpcached" 33 3436 """ 37 Implements the FileProviderPlug interface over a FileReader instance. 38 39 Needed because FileReader do not support file browsing. 40 """ 41 42 logCategory = LOG_CATEGORY 43 4672 73 8848 d = defer.Deferred() 49 d.addCallback(lambda _: self._reader.start()) 50 d.addCallback(lambda _: self) # Don't return internal references 51 d.callback(None) 52 return d5355 d = defer.Deferred() 56 d.addCallback(lambda _: self._reader.stop()) 57 d.addCallback(lambda _: self) # Don't return internal references 58 d.callback(None) 59 return d6062 #FIXME: This is temporary. Should be done with plug UI. 63 # Used for the UI to know which plug is used 64 updater.update("provider-name", "fileprovider-httpcached") 65 self._reader.stats.startUpdates(updater)66 69
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat Sep 10 08:59:30 2011 | http://epydoc.sourceforge.net |