Esempio n. 1
0
File: cli.py Progetto: hoh/Vega
def main():
    interface = CLIInterface()
    generator = FixedIntervalGenerator()
    mixer = AdditionMixer(generator)
    encryption = DummyEncryption()
    emitter = DummyEmitter()

    contacts = TestContacts()

    interface.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter

    interface.contacts = contacts
    generator.contacts = contacts

    mixer.start_loop()
    interface.run()
Esempio n. 2
0
def main():
    adapter = PidginDBusAdapter()

    generator = FixedIntervalGenerator()
    mixer = AdditionMixer(generator)
    encryption = ClearTextEncryption()
    emitter = adapter

    contacts = TestContacts()

    adapter.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter

    adapter.contacts = contacts
    generator.contacts = contacts

    print('foo')
    mixer.loop()
    #mixer.start_loop()
    adapter.run()