<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>flumotion.common.bundleclient.BundleLoader</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <th class="navbar" width="100%"></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> Package flumotion :: <a href="flumotion.common-module.html">Package common</a> :: <a href="flumotion.common.bundleclient-module.html">Module bundleclient</a> :: Class BundleLoader </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" onclick="toggle_private();">hide private</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class BundleLoader</h1><p class="nomargin-top"><span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader">source code</a></span></p> <pre class="base-tree"> <a href="flumotion.extern.log.log.Loggable-class.html">extern.log.log.Loggable</a> --+ | <strong class="uidshort">BundleLoader</strong> </pre> <hr /> <p>I am an object that can get and set up bundles from a PB server.</p> <!-- ==================== INSTANCE METHODS ==================== --> <a name="section-InstanceMethods"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Instance Methods</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-InstanceMethods" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.common.bundleclient.BundleLoader-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">callRemote</span>)</span></td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.__init__">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.common.bundleclient.BundleLoader-class.html#getBundles" class="summary-sig-name">getBundles</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">**kwargs</span>)</span><br /> Get, extract and register all bundles needed.</td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.getBundles">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">twisted.internet.defer.Deferred</code></span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.common.bundleclient.BundleLoader-class.html#loadModule" class="summary-sig-name">loadModule</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">moduleName</span>)</span><br /> Load the module given by name.</td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.loadModule">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"><code class="link">twisted.internet.defer.Deferred</code></span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.common.bundleclient.BundleLoader-class.html#getBundleByName" class="summary-sig-name">getBundleByName</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">bundleName</span>)</span><br /> Get the given bundle locally.</td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.getBundleByName">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.common.bundleclient.BundleLoader-class.html#getFile" class="summary-sig-name">getFile</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">fileName</span>)</span><br /> Do everything needed to get the given bundled file.</td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.getFile">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="flumotion.extern.log.log.Loggable-class.html">extern.log.log.Loggable</a></code></b>: <code><a href="flumotion.extern.log.log.Loggable-class.html#__providedBy__">__providedBy__</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#__provides__">__provides__</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#debug">debug</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#doLog">doLog</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#error">error</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#info">info</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#log">log</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#logFunction">logFunction</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#logObjectName">logObjectName</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#warning">warning</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#warningFailure">warningFailure</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#writeMarker">writeMarker</a></code> </p> </td> </tr> </table> <!-- ==================== CLASS VARIABLES ==================== --> <a name="section-ClassVariables"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Class Variables</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-ClassVariables" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a name="remote"></a><span class="summary-name">remote</span> = <code title="None">None</code><br /> a remote reference to an avatar on the PB server. </td> </tr> <tr class="private"> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a name="_unbundler"></a><span class="summary-name">_unbundler</span> = <code title="None">None</code><br /> hash(x) </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="flumotion.extern.log.log.Loggable-class.html">extern.log.log.Loggable</a></code></b>: <code><a href="flumotion.extern.log.log.Loggable-class.html#__implemented__">__implemented__</a></code>, <code><a href="flumotion.extern.log.log.Loggable-class.html#logCategory">logCategory</a></code> </p> </td> </tr> </table> <!-- ==================== METHOD DETAILS ==================== --> <a name="section-MethodDetails"></a> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Method Details</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-MethodDetails" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> </table> <a name="__init__"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, <span class="sig-arg">callRemote</span>)</span> <br /><em class="fname">(Constructor)</em> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.__init__">source code</a></span> </td> </tr></table> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>callRemote</code></strong> (callable)</li> </ul></dd> </dl> </td></tr></table> </div> <a name="getBundles"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">getBundles</span>(<span class="sig-arg">self</span>, <span class="sig-arg">**kwargs</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.getBundles">source code</a></span> </td> </tr></table> <p>Get, extract and register all bundles needed. Either one of bundleName, fileName or moduleName should be specified in **kwargs, which should be strings or lists of strings.</p> <dl class="fields"> <dt>Returns:</dt> <dd>a deferred firing a a list of (bundleName, bundlePath) tuples, with lowest dependency first. bundlePath is the directory to register for this package.</dd> </dl> </td></tr></table> </div> <a name="loadModule"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">loadModule</span>(<span class="sig-arg">self</span>, <span class="sig-arg">moduleName</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.loadModule">source code</a></span> </td> </tr></table> <p>Load the module given by name. Sets up all necessary bundles to be able to load the module.</p> <dl class="fields"> <dt>Returns: <code class="link">twisted.internet.defer.Deferred</code></dt> <dd>a deferred that will fire when the given module is loaded, giving the loaded module.</dd> </dl> </td></tr></table> </div> <a name="getBundleByName"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">getBundleByName</span>(<span class="sig-arg">self</span>, <span class="sig-arg">bundleName</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.getBundleByName">source code</a></span> </td> </tr></table> <p>Get the given bundle locally.</p> <dl class="fields"> <dt>Returns: <code class="link">twisted.internet.defer.Deferred</code></dt> <dd>a deferred returning the absolute path under which the bundle is extracted.</dd> </dl> </td></tr></table> </div> <a name="getFile"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">getFile</span>(<span class="sig-arg">self</span>, <span class="sig-arg">fileName</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.common.bundleclient-pysrc.html#BundleLoader.getFile">source code</a></span> </td> </tr></table> <p>Do everything needed to get the given bundled file.</p> <dl class="fields"> <dt>Returns:</dt> <dd>a deferred returning the absolute path to a local copy of the given file.</dd> </dl> </td></tr></table> </div> <br /> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <th class="navbar" width="100%"></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> Generated by Epydoc 3.0.1 on Wed Aug 11 21:33:13 2010 </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>