diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-12 13:02:02 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-12 13:02:02 -0800 |
| commit | 54d1b11b1981481ba177c8f7c84c179977f5652d (patch) | |
| tree | aa8eacfe1d0badfca3f9cb6e9856b9f458e1a785 /node/RuntimeEnvironment.hpp | |
| parent | f038ed9ca2f3e65e063571e77cd48f1072f2d3e3 (diff) | |
| parent | 68defd998008e83e5348d29cab5535dab3d444e8 (diff) | |
| download | infinitytier-54d1b11b1981481ba177c8f7c84c179977f5652d.tar.gz infinitytier-54d1b11b1981481ba177c8f7c84c179977f5652d.zip | |
Merge branch 'adamierymenko-dev'
Diffstat (limited to 'node/RuntimeEnvironment.hpp')
| -rw-r--r-- | node/RuntimeEnvironment.hpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/node/RuntimeEnvironment.hpp b/node/RuntimeEnvironment.hpp index 3d73ca56..05e10676 100644 --- a/node/RuntimeEnvironment.hpp +++ b/node/RuntimeEnvironment.hpp @@ -25,8 +25,8 @@ * LLC. Start here: http://www.zerotier.com/ */ -#ifndef _ZT_RUNTIMEENVIRONMENT_HPP -#define _ZT_RUNTIMEENVIRONMENT_HPP +#ifndef ZT_RUNTIMEENVIRONMENT_HPP +#define ZT_RUNTIMEENVIRONMENT_HPP #include <string> @@ -46,6 +46,7 @@ class CMWC4096; class Service; class Node; class Multicaster; +class SoftwareUpdater; /** * Holds global state for an instance of ZeroTier::Node @@ -71,26 +72,36 @@ public: demarc((Demarc *)0), topology((Topology *)0), sysEnv((SysEnv *)0), - nc((NodeConfig *)0) + nc((NodeConfig *)0), + updater((SoftwareUpdater *)0) #ifndef __WINDOWS__ ,netconfService((Service *)0) #endif { } + // Full path to home folder std::string homePath; - // signal() to prematurely interrupt main loop wait + // Main loop waits on this condition when it delays between runs, so + // signaling this will prematurely wake it. Condition mainLoopWaitCondition; + // This node's identity Identity identity; + // Indicates that we are shutting down -- this is hacky, want to factor out volatile bool shutdownInProgress; - // Order matters a bit here. These are constructed in this order - // and then deleted in the opposite order on Node exit. + /* + * Order matters a bit here. These are constructed in this order + * and then deleted in the opposite order on Node exit. The order ensures + * that things that are needed are there before they're needed. + * + * These are constant and never null after startup unless indicated. + */ - Logger *log; // may be null + Logger *log; // null if logging is disabled CMWC4096 *prng; Multicaster *mc; Switch *sw; @@ -99,8 +110,9 @@ public: SysEnv *sysEnv; NodeConfig *nc; Node *node; + SoftwareUpdater *updater; // null if software updates are not enabled #ifndef __WINDOWS__ - Service *netconfService; // may be null + Service *netconfService; // null if no netconf service running #endif }; |
