projects
/
meabook
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ad1b9a
)
added caller module
author
Max Usachev
<maxusachev@gmail.com>
Tue, 22 Jun 2010 12:21:25 +0000
(15:21 +0300)
committer
Max Usachev
<maxusachev@gmail.com>
Tue, 22 Jun 2010 12:21:25 +0000
(15:21 +0300)
caller.py
[new file with mode: 0644]
patch
|
blob
diff --git a/caller.py
b/caller.py
new file mode 100644
(file)
index 0000000..
6ec15f7
--- /dev/null
+++ b/
caller.py
@@ -0,0
+1,18
@@
+import dbus
+
+class PhoneCaller:
+ def __init__(self):
+ self.caller = None
+
+ def call(self, number):
+ """Make Phone call."""
+
+ # lazy creation
+ if self.caller is None:
+ import dbus
+ try:
+ self.caller = dbus.Interface(dbus.SystemBus().get_object( \
+ 'com.nokia.csd', '/com/nokia/csd/call'), 'com.nokia.csd.Call')
+ except dbus.exceptions.DBusException:
+ return
+ self.caller.CreateWith(number, dbus.UInt32(0))