ifdef fix for service API exposed to SDK
This commit is contained in:
@@ -973,6 +973,11 @@ public:
|
|||||||
return _taps;
|
return _taps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual Node * getNode()
|
||||||
|
{
|
||||||
|
return _node;
|
||||||
|
}
|
||||||
|
|
||||||
// Begin private implementation methods
|
// Begin private implementation methods
|
||||||
|
|
||||||
inline void phyOnDatagram(PhySocket *sock,void **uptr,const struct sockaddr *localAddr,const struct sockaddr *from,void *data,unsigned long len)
|
inline void phyOnDatagram(PhySocket *sock,void **uptr,const struct sockaddr *localAddr,const struct sockaddr *from,void *data,unsigned long len)
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
#include "../node/Node.hpp"
|
||||||
|
|
||||||
// Include the right tap device driver for this platform -- add new platforms here
|
// Include the right tap device driver for this platform -- add new platforms here
|
||||||
#ifdef SDK
|
#ifdef SDK
|
||||||
// In network containers builds, use the virtual netcon endpoint instead of a tun/tap port driver
|
// In network containers builds, use the virtual netcon endpoint instead of a tun/tap port driver
|
||||||
@@ -138,6 +140,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual void terminate() = 0;
|
virtual void terminate() = 0;
|
||||||
|
|
||||||
|
#ifdef SDK
|
||||||
/**
|
/**
|
||||||
* Joins a network
|
* Joins a network
|
||||||
*/
|
*/
|
||||||
@@ -159,10 +162,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual std::map< uint64_t,EthernetTap * > getTaps() = 0;
|
virtual std::map< uint64_t,EthernetTap * > getTaps() = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
virtual Node * getNode() = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return True if service is still running
|
* @return True if service is still running
|
||||||
*/
|
*/
|
||||||
inline bool isRunning() const { return (this->reasonForTermination() == ONE_STILL_RUNNING); }
|
inline bool isRunning() const { return (this->reasonForTermination() == ONE_STILL_RUNNING); }
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
OneService() {}
|
OneService() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user