First commit
[hidecallerid] / src / tpsession.h
diff --git a/src/tpsession.h b/src/tpsession.h
new file mode 100644 (file)
index 0000000..9281e13
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef TPSESSION_H
+#define TPSESSION_H
+
+#include <QObject>
+#include <TelepathyQt4/AccountManager>
+
+using namespace Tp;
+
+class tpSession : public QObject
+{
+    Q_OBJECT
+
+public:
+    tpSession();
+    ~tpSession() {}
+    void setPrivacy(bool showId);
+    void retrievePrivacy();
+
+private Q_SLOTS:
+    void onAMReady(Tp::PendingOperation *op);
+    void onAccountHaveConnectionChanged(bool value);
+    void onSetPrivacyFinished(Tp::PendingOperation *op);
+    void onGotPrivacy(QDBusPendingCallWatcher *op);
+    void onPropertyChanged(const QVariantMap& properties);
+
+private:
+    AccountManagerPtr mAM;
+    AccountPtr mAccount;
+    ConnectionPtr mConnection;
+    bool showId;
+
+signals:
+    void privacyUpdated(bool showId);
+};
+
+#endif // TPSESSION_H