Beispiel #1
0
void
RibManager::enableLocalControlHeader()
{
  m_nfdController.start<ndn::nfd::FaceEnableLocalControlCommand>(
    ControlParameters()
      .setLocalControlFeature(ndn::nfd::LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID),
    bind(&RibManager::onControlHeaderSuccess, this),
    bind(&RibManager::onControlHeaderError, this, _1, _2));
}
Beispiel #2
0
void
RibManager::startListening(const Name& commandPrefix, const ndn::OnInterest& onRequest)
{
  NFD_LOG_INFO("Listening on: " << commandPrefix);

  m_nfdController.start<ndn::nfd::FibAddNextHopCommand>(
    ControlParameters()
      .setName(commandPrefix)
      .setFaceId(0),
    bind(&RibManager::onNrdCommandPrefixAddNextHopSuccess, this, cref(commandPrefix), _1),
    bind(&RibManager::onNrdCommandPrefixAddNextHopError, this, cref(commandPrefix), _2));

  m_face.setInterestFilter(commandPrefix, onRequest);
}
Beispiel #3
0
#include "gui/defaults.h"
#include "logger.h"
#include "gui/sdl_canvas.h"

#include "gui/screen.h"

ControlParameters Screen::parms = ControlParameters (0, 0, STANDARD_WIDTH, STANDARD_HEIGHT, 10);

Screen::Screen () :
    Control (parms), be_clicked (NULL), mouse_target (NULL), popup (NULL),
            popup_owner (NULL) {
}

Screen::~Screen () {
    remove_popup (false);
}

void Screen::init_control (Control* par) {
    set_background (C_SCREEN_BACKGROUND);
    set_foreground (C_FOREGROUND);
    set_font_color (C_FOREGROUND);
    set_frame (0);
    reinitialize ();
}

void Screen::process_event (const SDL_Event& event) {
    Control* under_cursor;
    Control* par;

    switch (event.type) {
    case SDL_KEYDOWN: