~mmcg069/software-center/Bug830691

« back to all changes in this revision

Viewing changes to softwarecenter/backend/channel.py

  • Committer: Matthew McGowan
  • Date: 2011-08-22 09:26:30 UTC
  • mfrom: (2131.1.28 software-center)
  • Revision ID: matthew.joseph.mcgowan@gmail.com-20110822092630-yqbaa7zhljgo4zqe
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        self.distro = get_distro()
37
37
        self.db = db
38
38
 
 
39
    # public
39
40
    @property
40
41
    def channels(self):
41
42
        return self._get_channels_from_db()
42
 
        
 
43
 
43
44
    @property
44
45
    def channels_installed_only(self):
45
46
        return self._get_channels_from_db(True)
48
49
    def channel_available(kls, channelname):
49
50
        pass
50
51
 
 
52
    def get_available_channels(self):
 
53
        return (AllAvailableChannel(),) + tuple(self.channels)
 
54
 
 
55
    def get_installed_channels(self):
 
56
        return (AllInstalledChannel(),) + tuple(self.channels_installed_only)
 
57
 
 
58
    # private
51
59
    def _get_channels_from_db(self, installed_only=False):
52
60
        """
53
61
        (internal) implements 'channels()' and 'channels_installed_only()' properties