/* * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include #include #include #include namespace Swift { class Timer; class TimerFactory; class SWIFTEN_API WhitespacePingLayer : public StreamLayer, boost::noncopyable { public: WhitespacePingLayer(TimerFactory* timerFactory); void setActive(); void setInactive(); void writeData(const SafeByteArray& data); void handleDataRead(const SafeByteArray& data); bool getIsActive() const { return isActive; } private: void handleTimerTick(); private: bool isActive; boost::shared_ptr timer; }; }