X-Git-Url: http://git.maemo.org/git/?p=vicar;a=blobdiff_plain;f=src%2Fvicar-utils%2Fcpp%2Fmain.cpp;fp=src%2Fvicar-utils%2Fcpp%2Fmain.cpp;h=cd295ff5e570a514d41f741263790d595f79ae6b;hp=545cb0327d6db35d8e0a0da8440ab128b93a27ad;hb=2beca638f4ba146e25320c9c07cc1f29d0b2bba2;hpb=2b82f07726d657dff4ad091f056b8685d5ba9930 diff --git a/src/vicar-utils/cpp/main.cpp b/src/vicar-utils/cpp/main.cpp index 545cb03..cd295ff 100755 --- a/src/vicar-utils/cpp/main.cpp +++ b/src/vicar-utils/cpp/main.cpp @@ -10,6 +10,7 @@ #include "connectioninterfacerequeststypes.h" #include "harmattanaccountutility.h" #include +<<<<<<< HEAD #include #include "dbusutility.h" #include @@ -29,6 +30,12 @@ #define DBUS_SERVICE "org.freedesktop.DBus.Properties" #define DBUS_OBJ_PATH "/org/freedesktop/DBus/Properties" #define DBUS_PROPS_IFACE "org.freedesktop.DBus.Properties" +======= +#include //DEBUG - Delete this +#include "dbusutility.h" +#include +#include +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e int main(int argc, char *argv[]) { @@ -107,6 +114,7 @@ int main(int argc, char *argv[]) qDebug() << "Creating account"; accountUtility->addAccount(); } +<<<<<<< HEAD else if (instruction == "--delete-account"){ qDebug() << "Deleting account"; accountUtility->removeAccount(); @@ -117,6 +125,66 @@ int main(int argc, char *argv[]) } } else{ +======= + else if (instruction == "TPACCOUNTSTATUS"){ + QString status = tpUtility->getAccountStatus(); + qDebug() << "Account Status is "<< status; + } + else if (instruction == "--create-account"){ +#if defined(Q_WS_MAEMO_6) + qDebug() << "Creating account"; + accountUtility->addAccount(); +#else + qDebug() << "This command is applicable only in harmattan"; +#endif + } + else if (instruction == "--delete-account"){ +#if defined(Q_WS_MAEMO_6) + qDebug() << "Deleting account"; + accountUtility->removeAccount(); +#else + qDebug() << "This command is applicable only in harmattan"; +#endif + } + else if (instruction == "TESTING"){ + tpUtility->callNumberWithRing(argv[2]); + } + } + else{ + + qDebug() << "Sending Introspect method call"; + + DbusUtility dbusUtility(&app); + QList argsToSend; + + + bool success = dbusUtility.sendMethodCall("org.freedesktop.Telepathy.Connection.ring.tel.ring", + "/org/freedesktop/Telepathy/Connection/ring/tel/ring", + "org.freedesktop.DBus.Introspectable", + "Introspect",argsToSend,false); + + success = dbusUtility.sendMethodCall("org.freedesktop.Telepathy.ConnectionManager.ring", + "/org/freedesktop/Telepathy/ConnectionManager/ring", + "org.freedesktop.DBus.Introspectable", + "Introspect",argsToSend,false); + + /* + + bool success = dbusUtility.sendMethodCall("org.freedesktop.Telepathy.AccountManager", + "/org/freedesktop/Telepathy/Account/ring/tel/ring", + "org.freedesktop.Telepathy.Account", + "Reconnect",argsToSend,false); + */ + + if (!success){ + qDebug() << dbusUtility.getErrorMessage(); + } + else{ + qDebug() << "Method call executed successfully"; + } + app.exec(); + } +>>>>>>> 74800375ecf7f41e290cf7cc7fa9ee8b230be68e qDebug() << QCryptographicHash::hash("VICaR",QCryptographicHash::Md5).toHex();