-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStream.py
More file actions
36 lines (30 loc) · 1.1 KB
/
Stream.py
File metadata and controls
36 lines (30 loc) · 1.1 KB
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
31
32
33
34
35
import Console
#import Voice
import Mobile
import threading
class Stream(object):
def __init__(self, oInterpret):
self.oConsole = Console.Console(oInterpret)
#self.oVoice = Voice.Voice(oInterpret)
self.oMobile = Mobile.Mobile(oInterpret)
self.consolethr = threading.Thread(target=self.oConsole.console)
#self.voicethr = threading.Thread(target=self.oVoice.voice)
self.mobilethr = threading.Thread(target=self.oMobile.mobile)
def initiate(self):
# Launching Console Thread
self.consolethr.start()
print 'Console Thread successfully launched.'
# Launching Voice Thread
#self.voicethr.start()
#print 'Voice Thread successfully launched.'
# Launching Mobile Thread
self.mobilethr.start()
print 'Mobile Thread successfully launched.'
def terminiate(self):
self.consolethr.join()
#self.voicethr.join()
self.mobilethr.join()
def addRequest(self, notif):
self.oConsole.addRequest(notif)
#self.oVoice.addRequest(notif)
self.oMobile.addRequest(notif)