2 * hfdialer - Hands Free Voice Call Manager
3 * Copyright (c) 2012, Intel Corporation.
5 * This program is licensed under the terms and conditions of the
6 * Apache License, version 2.0. The full text of the Apache License is at
7 * http://www.apache.org/licenses/LICENSE-2.0
11 #include "dialercontext.h"
12 #include "dialerapplication.h"
13 #include "qmlmainwindow.h"
17 #include <QApplication>
18 #include <QDeclarativeView>
21 int main(int argc, char *argv[])
24 QDBusConnection bus = QDBusConnection::systemBus();
25 QStringList serviceNames = bus.interface()->registeredServiceNames();
27 if (serviceNames.contains("com.hfdialer"))
29 QDBusMessage message = QDBusMessage::createMethodCall("com.hfdialer","/com/dialer","com.hfdialer", "raise");
30 bus.call(message,QDBus::NoBlock);
35 DialerApplication app(argc, argv);
37 QMLMainWindow *qmw = QMLMainWindow::instance();
39 QString argString(argv[1]);
41 if (argString != "noshow")
47 QString stripLineID(QString lineid)
50 static QRegExp rx = QRegExp("([^0-9*#])");
52 if (lineid.indexOf('+') == 0) {
53 lineid.replace(rx, "");
54 return lineid.insert(0,"+");
56 return lineid.replace(rx, "");
60 /* Local Variables: */
62 /* c-basic-offset:4 */
63 /* indent-tabs-mode: nil */