diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-11-13 16:02:31 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-11-13 16:02:31 -0800 |
| commit | 03e35b25b809a9e3c2b046449b72bc4a8440f449 (patch) | |
| tree | 897d0b463c4136ffc19fa8bde524c97140269c3e /controller/PostgreSQL.hpp | |
| parent | e2b0fb26b18a5e824e94e61b3404833db9d3a6d8 (diff) | |
| parent | 01c18cc442c03ac9ec18feffba3c97f6a1f4072f (diff) | |
| download | infinitytier-03e35b25b809a9e3c2b046449b72bc4a8440f449.tar.gz infinitytier-03e35b25b809a9e3c2b046449b72bc4a8440f449.zip | |
Merge branch 'dev' of http://git.int.zerotier.com/zerotier/ZeroTierOne into dev
Diffstat (limited to 'controller/PostgreSQL.hpp')
| -rw-r--r-- | controller/PostgreSQL.hpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/controller/PostgreSQL.hpp b/controller/PostgreSQL.hpp index 36fe8c9f..86aac80d 100644 --- a/controller/PostgreSQL.hpp +++ b/controller/PostgreSQL.hpp @@ -23,12 +23,16 @@ #include "DB.hpp" +#include <pqxx/pqxx> + extern "C" { typedef struct pg_conn PGconn; } namespace ZeroTier { +class _MemberNotificationReceiver; +class _NetworkNotificationReceiver; /** * A controller database driver that talks to PostgreSQL @@ -56,8 +60,8 @@ protected: }; private: - void initializeNetworks(PGconn *conn); - void initializeMembers(PGconn *conn); + void initializeNetworks(pqxx::connection &conn); + void initializeMembers(pqxx::connection &conn); void heartbeat(); void membersDbWatcher(); void networksDbWatcher(); @@ -81,6 +85,9 @@ private: mutable std::mutex _readyLock; std::atomic<int> _ready, _connected, _run; mutable volatile bool _waitNoticePrinted; + + friend class _MemberNotificationReceiver; + friend class _NetworkNotificationReceiver; }; } |
