All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
element-listener-lite.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
22 #ifndef NDN_ELEMENT_LISTENER_LITE_HPP
23 #define NDN_ELEMENT_LISTENER_LITE_HPP
24 
25 #include "../../c/encoding/element-reader-types.h"
26 
27 namespace ndn {
28 
29 class ElementListenerLite;
30 typedef void (*OnReceivedElementLite)
31  (ElementListenerLite *self, const uint8_t *element, size_t elementLength);
32 
38 public:
48  ElementListenerLite(OnReceivedElementLite onReceivedElement);
49 
50 private:
51  // Declare friends who can downcast to the private base.
52  friend class TcpTransportLite;
53  friend class UdpTransportLite;
54  friend class UnixTransportLite;
55  friend class ArduinoYunTcpTransportLite;
56  friend class Esp8266TcpTransportLite;
57 };
58 
59 }
60 
61 #endif
An ElementListenerLite holds an OnReceivedElementLite function pointer.
Definition: element-listener-lite.hpp:37
ndn_OnReceivedElement onReceivedElement
see ndn_ElementListener_initialize
Definition: element-reader-types.h:38
A UnixTransportLite object is used to send packets and to listen for incoming packets over a Unix soc...
Definition: unix-transport-lite.hpp:37
An ndn_ElementListener struct holds a function pointer onReceivedElement.
Definition: element-reader-types.h:37
ElementListenerLite(OnReceivedElementLite onReceivedElement)
Create an ElementListenerLite to use the onReceivedElement function pointer.
Definition: element-listener-lite.cpp:27
A UdpTransportLite object is used to send packets and to listen for incoming packets over a UDP socke...
Definition: udp-transport-lite.hpp:36
A TcpTransportLite object is used to send packets and to listen for incoming packets over a TCP socke...
Definition: tcp-transport-lite.hpp:36