Adding the ignore file
[gc-dialer] / src / led_handler.py
1 #!/usr/bin/env python
2
3 import dbus
4
5
6 class LedHandler(object):
7
8         def __init__(self):
9                 self._bus = dbus.SystemBus()
10                 self._rawMceRequest = self._bus.get_object("com.nokia.mce", "/com/nokia/mce/request")
11                 self._mceRequest = dbus.Interface(self._rawMceRequest, dbus_interface="com.nokia.mce.request")
12
13                 self._ledPattern = "PatternCommunicationChat"
14
15         def on(self):
16                 self._mceRequest.req_led_pattern_activate(self._ledPattern)
17
18         def off(self):
19                 self._mceRequest.req_led_pattern_deactivate(self._ledPattern)
20
21
22 if __name__ == "__main__":
23         leds = LedHandler()
24         leds.off()