~ubuntu-branches/ubuntu/natty/miro/natty

« back to all changes in this revision

Viewing changes to lib/models.py

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2011-01-22 02:46:33 UTC
  • mfrom: (1.4.10 upstream) (1.7.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20110122024633-kjme8u93y2il5nmf
Tags: 3.5.1-1ubuntu1
* Merge from debian.  Remaining ubuntu changes:
  - Use python 2.7 instead of python 2.6
  - Relax dependency on python-dbus to >= 0.83.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- mode: python -*-
 
2
 
 
3
# Miro - an RSS based video player application
 
4
# Copyright (C) 2005-2010 Participatory Culture Foundation
 
5
#
 
6
# This program is free software; you can redistribute it and/or modify
 
7
# it under the terms of the GNU General Public License as published by
 
8
# the Free Software Foundation; either version 2 of the License, or
 
9
# (at your option) any later version.
 
10
#
 
11
# This program is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
# GNU General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License
 
17
# along with this program; if not, write to the Free Software
 
18
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
19
#
 
20
# In addition, as a special exception, the copyright holders give
 
21
# permission to link the code of portions of this program with the OpenSSL
 
22
# library.
 
23
#
 
24
# You must obey the GNU General Public License in all respects for all of
 
25
# the code used other than OpenSSL. If you modify file(s) with this
 
26
# exception, you may extend this exception to your version of the file(s),
 
27
# but you are not obligated to do so. If you do not wish to do so, delete
 
28
# this exception statement from your version. If you delete this exception
 
29
# statement from all source files in the program, then also delete it here.
 
30
 
 
31
"""models.py -- Contains DDBObject subclasses.
 
32
 
 
33
This module basically just imports DDBObject subclasses like Feed, Item, etc.
 
34
from other modules.  It exists as a central location that any other module can
 
35
import.
 
36
 
 
37
One reason this module exists is circular imports.  For example Item
 
38
references Feed and Feed refereces Item, which is a potential problem.  To get
 
39
around this, this module waits to import things until initialize() is called.
 
40
"""
 
41
 
 
42
def initialize():
 
43
    global RemoteDownloader, Feed, FeedImpl, RSSFeedImpl
 
44
    global SavedSearchFeedImpl, ScraperFeedImpl, SearchFeedImpl
 
45
    global DirectoryWatchFeedImpl, DirectoryFeedImpl, SearchDownloadsFeedImpl
 
46
    global ManualFeedImpl, SingleFeedImpl, ChannelFolder, PlaylistFolder
 
47
    global PlaylistFolderItemMap, ChannelGuide, Item, FileItem, IconCache
 
48
    global SavedPlaylist, PlaylistItemMap, TabOrder, ThemeHistory
 
49
 
 
50
    from miro.downloader import RemoteDownloader
 
51
    from miro.feed import Feed, FeedImpl, RSSFeedImpl, SavedSearchFeedImpl, \
 
52
            ScraperFeedImpl, SearchFeedImpl, DirectoryWatchFeedImpl, \
 
53
            DirectoryFeedImpl, SearchDownloadsFeedImpl, ManualFeedImpl, \
 
54
            SingleFeedImpl
 
55
    from miro.folder import ChannelFolder, PlaylistFolder, \
 
56
            PlaylistFolderItemMap
 
57
    from miro.guide import ChannelGuide
 
58
    from miro.item import Item, FileItem
 
59
    from miro.iconcache import IconCache
 
60
    from miro.playlist import SavedPlaylist, PlaylistItemMap
 
61
    from miro.tabs import TabOrder
 
62
    from miro.theme import ThemeHistory