Bitcoin ABC 0.30.7
P2P Digital Currency
Macros | Functions
events.h File Reference
#include <ios>
#include <memory>
#include <event2/event.h>
#include <event2/http.h>
Include dependency graph for events.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAKE_RAII(type)
 

Functions

 MAKE_RAII (event_base)
 
 MAKE_RAII (event)
 
 MAKE_RAII (evhttp)
 
 MAKE_RAII (evhttp_request)
 
 MAKE_RAII (evhttp_connection)
 
raii_event_base obtain_event_base ()
 
raii_event obtain_event (struct event_base *base, evutil_socket_t s, short events, event_callback_fn cb, void *arg)
 
raii_evhttp obtain_evhttp (struct event_base *base)
 
raii_evhttp_request obtain_evhttp_request (void(*cb)(struct evhttp_request *, void *), void *arg)
 
raii_evhttp_connection obtain_evhttp_connection_base (struct event_base *base, std::string host, uint16_t port)
 

Macro Definition Documentation

◆ MAKE_RAII

#define MAKE_RAII (   type)
Value:
/* deleter */ \
struct type##_deleter { \
void operator()(struct type *ob) { \
type##_free(ob); \
} \
}; \
/* unique ptr typedef */ \
typedef std::unique_ptr<struct type, type##_deleter> raii_##type

Definition at line 14 of file events.h.

Function Documentation

◆ MAKE_RAII() [1/5]

MAKE_RAII ( event  )

◆ MAKE_RAII() [2/5]

MAKE_RAII ( event_base  )

◆ MAKE_RAII() [3/5]

MAKE_RAII ( evhttp  )

◆ MAKE_RAII() [4/5]

MAKE_RAII ( evhttp_connection  )

◆ MAKE_RAII() [5/5]

MAKE_RAII ( evhttp_request  )

◆ obtain_event()

raii_event obtain_event ( struct event_base *  base,
evutil_socket_t  s,
short  events,
event_callback_fn  cb,
void *  arg 
)
inline

Definition at line 38 of file events.h.

◆ obtain_event_base()

raii_event_base obtain_event_base ( )
inline

Definition at line 30 of file events.h.

Here is the caller graph for this function:

◆ obtain_evhttp()

raii_evhttp obtain_evhttp ( struct event_base *  base)
inline

Definition at line 43 of file events.h.

Here is the caller graph for this function:

◆ obtain_evhttp_connection_base()

raii_evhttp_connection obtain_evhttp_connection_base ( struct event_base *  base,
std::string  host,
uint16_t  port 
)
inline

Definition at line 53 of file events.h.

◆ obtain_evhttp_request()

raii_evhttp_request obtain_evhttp_request ( void(*)(struct evhttp_request *, void *)  cb,
void *  arg 
)
inline

Definition at line 48 of file events.h.