tpsession initial import
[tpsession] / tpsession-0.1 / tests / showaccounts / testprog.cpp
diff --git a/tpsession-0.1/tests/showaccounts/testprog.cpp b/tpsession-0.1/tests/showaccounts/testprog.cpp
new file mode 100644 (file)
index 0000000..eba7189
--- /dev/null
@@ -0,0 +1,17 @@
+#include "testprog.h"
+#include <TelepathyQt4/Message>
+
+TestProg::TestProg()
+{
+    qDebug() << __PRETTY_FUNCTION__ ;
+    tps =new TpSession("ring",true);
+    foreach (TpSessionAccount *tpacc, tps->accounts) {
+     qDebug() << "ConnectionManager" << tpacc->acc->cmName() << "protocol " << tpacc->acc->protocol() << "uniqueIdentifier" << tpacc->acc->uniqueIdentifier()
+             << "Connection=" << (tpacc->acc->haveConnection()? ( tpacc->acc->connection()->isReady() ? "Ready":"notReady"):"noConnection");
+     qDebug() << "normalizedName" << tpacc->acc->normalizedName() << "nickname " << tpacc->acc->nickname() << "DisplayName" << tpacc->acc->displayName();
+     qDebug() << "icon" << tpacc->acc->icon() << "validAccount " << tpacc->acc->isValidAccount() << "Enabled" << tpacc->acc->isEnabled();
+     qDebug() << "parameters" << tpacc->acc->parameters();
+     }
+
+}
+