MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
controller_storage.h
Go to the documentation of this file.
1 #include <string>
2 #include <mist/json.h>
3 #include <mist/config.h>
4 #include <mist/tinythread.h>
5 
6 namespace Controller {
7  extern Util::Config conf;
8  extern JSON::Value Storage;
9  extern tthread::mutex logMutex;
10  extern tthread::mutex configMutex;
11 
13  void Log(std::string kind, std::string message);
14 
16  bool WriteFile(std::string Filename, std::string contents);
17 
18  void handleMsg(void * err);
19 
20  void writeConfig();
21 
22 }
bool WriteFile(std::string Filename, std::string contents)
Write contents to Filename.
Definition: controller_storage.cpp:42
Holds everything unique to the controller.
Definition: controller_api.h:4
void handleMsg(void *err)
Handles output of a Mist application, detecting and catching debug messages.
Definition: controller_storage.cpp:54
A JSON::Value is either a string or an integer, but may also be an object, array or null...
Definition: json.h:21
Util::Config conf
Global storage of configuration.
Definition: controller_storage.cpp:15
void writeConfig()
Writes the current config to shared memory to be used in other processes.
Definition: controller_storage.cpp:83
Deals with parsing configuration from commandline options.
Definition: config.h:18
void Log(std::string kind, std::string message)
Store and print a log message.
Definition: controller_storage.cpp:22
JSON::Value Storage
Global storage of data.
Definition: controller_storage.cpp:16
tthread::mutex configMutex
Mutex for server config access.
Definition: controller_storage.cpp:17
tthread::mutex logMutex
Mutex for log thread.
Definition: controller_storage.cpp:18