~morphis/phablet-extras/ofono-sms-status-report

« back to all changes in this revision

Viewing changes to test/dial-number

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-08-22 19:59:08 UTC
  • mfrom: (1.3.3) (6.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20120822195908-0bmmk1hlh989bgk6
Tags: 1.9-1ubuntu1
* Merge with Debian experimental; remaining changes:
  - debian/control: explicitly Conflicts with modemmanager: having both
    installed / running at the same time causes issues causes issues with
    both claiming modem devices.
  - debian/patches/02-dont-handle-stacktraces.patch: stop catching stacktraces
    and printing the information internally, so apport can catch and report
    the possible bugs.
  - debian/ofono.postinst: on configure, notify the user that a reboot is
    required (so ofono can get started by upstart). (LP: #600501)
  - debian/rules: pass --no-restart-on-upgrade so ofono isn't automatically
    restarted when upgrades.
  - Adding upstart config / Removing standard init script
  - Adding Apport support
  - Patch for recognizing special Huawei devices with weird serial
  - Override lintian to avoid script-in-etc-init.d... warnings.
  - Update debian/compat to 7
* debian/series: add our patches to debian/patches/series now that the package
  uses quilt.
* debian/patches/02-dont-handle-stacktraces.patch: refreshed.
* debian/ofono-dev.install, debian/ofono.install:
  - Install usr/sbin/dundee and ofono.pc to the proper packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import sys
4
4
import dbus
5
5
 
 
6
if (len(sys.argv) < 2):
 
7
        print "Usage: %s [modem] <number> [hide_callerid]" % (sys.argv[0])
 
8
        sys.exit(1)
 
9
 
6
10
bus = dbus.SystemBus()
7
11
 
8
12
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
9
13
                                                'org.ofono.Manager')
10
14
 
11
15
modems = manager.GetModems()
12
 
 
13
 
path, properties = modems[0]
14
 
 
15
 
manager = dbus.Interface(bus.get_object('org.ofono', path),
 
16
modem = modems[0][0]
 
17
 
 
18
hide_callerid = "default"
 
19
 
 
20
if (len(sys.argv) == 2):
 
21
        number = sys.argv[1]
 
22
elif (len(sys.argv) == 3):
 
23
        if (sys.argv[2] == "default") or (sys.argv[2] == "enabled") or \
 
24
                        (sys.argv[2] == "disabled"):
 
25
                number = sys.argv[1]
 
26
                hide_callerid = sys.argv[2]
 
27
        else:
 
28
                modem = sys.argv[1]
 
29
                number = sys.argv[2]
 
30
else:
 
31
        modem = sys.argv[1]
 
32
        number = sys.argv[2]
 
33
        hide_callerid = sys.argv[3]
 
34
 
 
35
print "Using modem %s" % modem
 
36
 
 
37
vcm = dbus.Interface(bus.get_object('org.ofono', modem),
16
38
                                                'org.ofono.VoiceCallManager')
17
39
 
18
 
if len(sys.argv) > 2:
19
 
    path = manager.Dial(sys.argv[1], sys.argv[2])
20
 
else:
21
 
    path = manager.Dial(sys.argv[1], "")
 
40
path = vcm.Dial(number, hide_callerid)
22
41
 
23
42
print path