#ifndef APPLICATION_H
#define APPLICATION_H
-#include <map>
-
namespace icinga {
-using std::vector;
-using std::map;
-using std::string;
-
class Component;
class Application : public Object {
#ifndef CONFIGHIVE_H
#define CONFIGHIVE_H
-#include <map>
-
namespace icinga
{
-using std::map;
-
struct ConfigHiveEventArgs : public EventArgs
{
typedef shared_ptr<ConfigHiveEventArgs> RefType;
namespace icinga
{
-using std::map;
-using std::string;
-
class ConfigHive;
class ConfigObject : public Object
namespace icinga
{
-using std::tr1::function;
-using namespace std::tr1::placeholders;
-
template<class TObject, class TArgs>
int delegate_fwd(int (TObject::*function)(TArgs), weak_ptr<TObject> wref, const TArgs& args)
{
namespace icinga
{
-using std::list;
-
struct EventArgs : public Object
{
typedef shared_ptr<EventArgs> RefType;
#include <iostream>
#include <list>
#include <typeinfo>
-
+#include <map>
#include <list>
+
+using namespace std;
+
#ifdef _MSC_VER
# include <memory>
# include <functional>
+
+using namespace std::placeholders;
#else
# include <tr1/memory>
# include <tr1/functional>
+
+using namespace std::tr1;
+using namespace std::tr1::placeholders;
#endif
#define PLATFORM_WINDOWS 1
namespace icinga
{
-using std::exception;
-
class OutOfMemoryException : public exception { };
class Memory
namespace icinga
{
-using std::tr1::shared_ptr;
-using std::tr1::weak_ptr;
-using std::tr1::enable_shared_from_this;
-using std::tr1::static_pointer_cast;
-using std::tr1::function;
-
class Object : public enable_shared_from_this<Object>
{
private:
-#include <functional>
-#include <algorithm>
#include "i2-base.h"
using namespace icinga;
-using std::bind2nd;
-using std::equal_to;
list<Socket::WeakRefType> Socket::Sockets;
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = hostname ? inet_addr(hostname) : htonl(INADDR_ANY);
sin.sin_port = htons(port);
- bind(GetFD(), (sockaddr *)&sin, sizeof(sin));
+ ::bind(GetFD(), (sockaddr *)&sin, sizeof(sin));
}
#include "i2-base.h"
using namespace icinga;
-using std::list;
-using std::bind2nd;
-using std::equal_to;
time_t Timer::NextCall;
list<Timer::WeakRefType> Timer::Timers;
#include <fstream>
using namespace icinga;
-using std::ifstream;
string ConfigFileComponent::GetName(void)
{
#include "i2-configrpccomponent.h"
using namespace icinga;
-using std::tr1::dynamic_pointer_cast;
IcingaApplication::RefType ConfigRpcComponent::GetIcingaApplication(void)
{
using namespace icinga;
-using std::cout;
-using std::endl;
-
IcingaApplication::IcingaApplication(void)
{
m_ConnectionManager = new_object<ConnectionManager>();
namespace icinga
{
-using std::map;
-
class ConnectionManager : public Object
{
list<JsonRpcServer::RefType> m_Servers;
#include "i2-jsonrpc.h"
using namespace icinga;
-using std::sprintf;
/* based on https://github.com/PeterScott/netstring-c/blob/master/netstring.c */
cJSON *Netstring::ReadJSONFromFIFO(FIFO::RefType fifo)