Boris Nagaev avatar Boris Nagaev committed 080759c

Planning: add rules to exclude WIOService-related methods if not available

Comments (0)

Files changed (2)

     return *state_ptr_;
 }
 
+#ifdef WC_HAVE_WIOSERVICE
 PlanningServer::PlanningServer(WIOService* io_service, WObject* p):
     WObject(p),
     server_(0),
     default_notify_needed_(true) {
     set_io_service(io_service);
 }
+#endif
 
 PlanningServer::PlanningServer(WObject* p):
     WObject(p),
     scheduler_ = scheduler;
 }
 
+#ifdef WC_HAVE_WIOSERVICE
 WIOService* PlanningServer::io_service() {
 #if USE_WIOSERVICE
     return &WServer::instance()->ioService();
 #else
     return 0;
-#endif
+#endif // USE_WIOSERVICE
 }
 
 static void WIOService_schedule(WIOService* io_service,
 void PlanningServer::set_io_service(WIOService* io_service) {
     set_scheduler(boost::bind(WIOService_schedule, io_service, _1, _2));
 }
+#endif // WC_HAVE_WIOSERVICE
 
 void PlanningServer::schedule(const td::TimeDuration& wait,
                               const boost::function<void()>& func) {
 
 #include "Notify.hpp"
 #include "TimeDuration.hpp"
+#include "config.hpp"
 
 namespace Wt {
 
+#ifdef WC_HAVE_WIOSERVICE
 class WIOService; // FIXME http://redmine.emweb.be/issues/1189
+#endif
 
 namespace Wc {
 
     typedef boost::function < void(const td::TimeDuration&,
                                    const boost::function<void()>&) > Scheduler;
 
+#ifdef WC_HAVE_WIOSERVICE
     /** Constructor.
     \see set_io_service()
     */
     PlanningServer(WIOService* io_service, WObject* p = 0);
+#endif
 
     /** Constructor */
     PlanningServer(WObject* p = 0);
     */
     void set_scheduler(const Scheduler& scheduler);
 
+#ifdef WC_HAVE_WIOSERVICE
     /** Get IO service.
     \deprecated Return WIOService, used for Wt server, if available, else 0.
     */
     \see set_scheduler
     */
     void set_io_service(WIOService* io_service);
+#endif
 
     /** Utility method used to schedule a function.
     This is a method for convenience.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.