plebble
busyled.h
Go to the documentation of this file.
1 /*
2 -------------------------------------------------------------------------------
3  PLEBBLE
4 -------------------------------------------------------------------------------
5  Copyright (C) 2019-2020 KATLAS Technology. (http://katlastechnology.com)
6  Copyright (C) 2017-2020 Marcos Mayorga. (mm@mm-studios.com)
7 
8  This file is part of our Plebble(R) Platform.
9 
10  The code below cannot be copied, used for any purpose other than the one
11  agreed and/or distributed without the express permission of
12  KATLAS Technology.
13 -------------------------------------------------------------------------------
14 
15 
16 */
17 #ifndef USGOV_5bb1df6a6b21d8ae0e5f38a7d87ad8b1f7948309ff6afd364572d915c57c4454
18 #define USGOV_5bb1df6a6b21d8ae0e5f38a7d87ad8b1f7948309ff6afd364572d915c57c4454
19 
20 #include <atomic>
21 
22 namespace us{ namespace gov {
23 namespace socket {
24 
25  using namespace std;
26 
27  struct busyled_t {
28  struct handler_t {
29  virtual void on_busy()=0;
30  virtual void on_idle()=0;
31  };
32 
33  void set();
34  void reset();
36 
37  private:
38  handler_t* handler{0};
39  atomic<int> ref{0};
40  };
41 
42 }
43 }}
44 
45 #endif
46 
47 
48 
us::gov::socket::busyled_t::handler_t::on_busy
virtual void on_busy()=0
us
Definition: daemon.h:22
us::gov::socket::busyled_t
Definition: busyled.h:27
us::gov::socket::busyled_t::set
void set()
us::gov::socket::busyled_t::handler_t::on_idle
virtual void on_idle()=0
us::gov::socket::busyled_t::handler_t
Definition: busyled.h:28
c
us::gov::socket::busyled_t c
Definition: busyled.cpp:22
us::gov::socket::busyled_t::reset
void reset()
std
Definition: app.h:380
busyled.h
us::gov::socket::busyled_t::set_handler
void set_handler(handler_t *)
gov.h
log
#define log
Definition: gov.h:83