Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/model/ShellModel.py
blob: 5872b0277d213556bd9f256ddcbd4df440eaa5d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from sugar.presence import PresenceService
from model.Friends import Friends
from model.Owner import ShellOwner

class ShellModel:
	def __init__(self):
		self._current_activity = None

		PresenceService.start()
		self._pservice = PresenceService.get_instance()

		self._owner = ShellOwner()
		self._owner.announce()
		self._friends = Friends()

	def get_friends(self):
		return self._friends

	def get_invites(self):
		return self._owner.get_invites()

	def get_owner(self):
		return self._owner

	def set_current_activity(self, activity_id):
		self._current_activity = activity_id
		self._owner.set_current_activity(activity_id)

	def get_current_activity(self):
		return self._current_activity