(self, idl, allow_existing=False)
Registers an IDL file with this instance.

        The IDL file will be built, installed, etc.
Registers an IDL file with this instance.
Registers an IDL file with this instance .
def register_idl(self, idl, allow_existing=False):
        """Registers an IDL file with this instance.

        The IDL file will be built, installed, etc.
        """
        basename = mozpath.basename(idl.source_path)
        root = mozpath.splitext(basename)[0]
        xpt = '%s.xpt' % idl.module
        manifest = mozpath.join(idl.install_target, 'components', 'interfaces.manifest')
        chrome_manifest = mozpath.join(idl.install_target, 'chrome.manifest')

        entry = {
            'source': idl.source_path,
            'module': idl.module,
            'basename': basename,
            'root': root,
            'manifest': manifest,
        }

        if not allow_existing and entry['basename'] in self.idls:
            raise Exception('IDL already registered: %s' % entry['basename'])

        self.idls[entry['basename']] = entry
        t = self.modules.setdefault(entry['module'], (idl.install_target, set()))
        t[1].add(entry['root'])

        if idl.add_to_manifest:
            self.interface_manifests.setdefault(manifest, set()).add(xpt)
            self.chrome_manifests.add(chrome_manifest)
def register_idl ( self , idl , allow_existing = False ) : basename = mozpath . basename ( idl . source_path ) root = mozpath . splitext ( basename ) [ 0 ] xpt = '%s.xpt' % idl . module manifest = mozpath . join ( idl . install_target , 'components' , 'interfaces.manifest' ) chrome_manifest = mozpath . join ( idl . install_target , 'chrome.manifest' ) entry = { 'source' : idl . source_path , 'module' : idl . module , 'basename' : basename , 'root' : root , 'manifest' : manifest , } if not allow_existing and entry [ 'basename' ] in self . idls : raise Exception ( 'IDL already registered: %s' % entry [ 'basename' ] ) self . idls [ entry [ 'basename' ] ] = entry t = self . modules . setdefault ( entry [ 'module' ] , ( idl . install_target , set ( ) ) ) t [ 1 ] . add ( entry [ 'root' ] ) if idl . add_to_manifest : self . interface_manifests . setdefault ( manifest , set ( ) ) . add ( xpt ) self . chrome_manifests . add ( chrome_manifest )