Esempio n. 1
0
void CEXIETHERNET::RecvStart()
{
#ifdef __linux__
  readEnabled.Set();
#else
  NOTIMPLEMENTED("RecvStart");
#endif
}
Esempio n. 2
0
void CEXIETHERNET::RecvStop()
{
#ifdef __linux__
  readEnabled.Clear();
#else
  NOTIMPLEMENTED("RecvStop");
#endif
}
Esempio n. 3
0
bool CEXIETHERNET::RecvInit()
{
#ifdef __linux__
	readThread.Run(ReadThreadHandler, this, "EXI Ethernet");
	return true;
#else
	NOTIMPLEMENTED("RecvInit");
	return false;
#endif
}
Esempio n. 4
0
bool CEXIETHERNET::RecvInit()
{
#ifdef __linux__
  readThread = std::thread(ReadThreadHandler, this);
  return true;
#else
  NOTIMPLEMENTED("RecvInit");
  return false;
#endif
}
Esempio n. 5
0
void CEXIETHERNET::Deactivate()
{
#ifdef __linux__
	close(fd);
	fd = -1;

	readEnabled = false;
	if (readThread.joinable())
		readThread.join();
#else
	NOTIMPLEMENTED("Deactivate");
#endif
}
Esempio n. 6
0
bool CEXIETHERNET::RecvStart()
{
#ifdef __linux__
	if (!readThread.joinable())
		RecvInit();

	readEnabled = true;
	return true;
#else
	NOTIMPLEMENTED("RecvStart");
	return false;
#endif
}
Esempio n. 7
0
void CEXIETHERNET::Deactivate()
{
#ifdef __linux__
  close(fd);
  fd = -1;

  readEnabled.Clear();
  readThreadShutdown.Set();
  if (readThread.joinable())
    readThread.join();
#else
  NOTIMPLEMENTED("Deactivate");
#endif
}
Esempio n. 8
0
bool CEXIETHERNET::Activate()
{
#ifdef __linux__
  if (IsActivated())
    return true;

  // Assumes that there is a TAP device named "Dolphin" preconfigured for
  // bridge/NAT/whatever the user wants it configured.

  if ((fd = open("/dev/net/tun", O_RDWR)) < 0)
  {
    ERROR_LOG(SP1, "Couldn't open /dev/net/tun, unable to init BBA");
    return false;
  }

  struct ifreq ifr;
  memset(&ifr, 0, sizeof(ifr));
  ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE;

  const int MAX_INTERFACES = 32;
  for (int i = 0; i < MAX_INTERFACES; ++i)
  {
    strncpy(ifr.ifr_name, StringFromFormat("Dolphin%d", i).c_str(), IFNAMSIZ);

    int err;
    if ((err = ioctl(fd, TUNSETIFF, (void*)&ifr)) < 0)
    {
      if (i == (MAX_INTERFACES - 1))
      {
        close(fd);
        fd = -1;
        ERROR_LOG(SP1, "TUNSETIFF failed: Interface=%s err=%d", ifr.ifr_name, err);
        return false;
      }
    }
    else
    {
      break;
    }
  }
  ioctl(fd, TUNSETNOCSUM, 1);

  INFO_LOG(SP1, "BBA initialized with associated tap %s", ifr.ifr_name);
  return RecvInit();
#else
  NOTIMPLEMENTED("Activate");
  return false;
#endif
}
    void NativeTextfieldWin::UpdateVerticalMargins()
    {
        int top, bottom;
        if(!textfield_->GetVerticalMargins(&top, &bottom))
        {
            return;
        }

        if(top==0 && bottom==0)
        {
            // Do nothing, default margins are 0 already.
            return;
        }
        // Non-zero margins case.
        NOTIMPLEMENTED();
    }
Esempio n. 10
0
bool CEXIETHERNET::SendFrame(const u8* frame, u32 size)
{
#ifdef __linux__
  DEBUG_LOG(SP1, "SendFrame %x\n%s", size, ArrayToString(frame, size, 0x10).c_str());

  int writtenBytes = write(fd, frame, size);
  if ((u32)writtenBytes != size)
  {
    ERROR_LOG(SP1, "SendFrame(): expected to write %d bytes, instead wrote %d", size, writtenBytes);
    return false;
  }
  else
  {
    SendComplete();
    return true;
  }
#else
  NOTIMPLEMENTED("SendFrame");
  return false;
#endif
}
Esempio n. 11
0
bool CEXIETHERNET::Activate()
{
#ifdef __linux__
	if (IsActivated())
		return true;

	// Assumes that there is a TAP device named "Dolphin" preconfigured for
	// bridge/NAT/whatever the user wants it configured.

	if ((fd = open("/dev/net/tun", O_RDWR)) < 0)
	{
		ERROR_LOG(SP1, "Couldn't open /dev/net/tun, unable to init BBA");
		return false;
	}

	struct ifreq ifr;
	memset(&ifr, 0, sizeof(ifr));
	ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE;

	strncpy(ifr.ifr_name, "Dolphin", IFNAMSIZ);

	int err;
	if ((err = ioctl(fd, TUNSETIFF, (void*)&ifr)) < 0)
	{
		close(fd);
		fd = -1;
		ERROR_LOG(SP1, "TUNSETIFF failed: err=%d", err);
		return false;
	}
	ioctl(fd, TUNSETNOCSUM, 1);

	readEnabled = false;

	INFO_LOG(SP1, "BBA initialized with associated tap %s", ifr.ifr_name);
	return true;
#else
	NOTIMPLEMENTED("Activate");
	return false;
#endif
}
Esempio n. 12
0
 void GetIngoingEdgesList(BorderCross const & /* v */,
                          vector<CrossWeightedEdge> & /* adj */) const
 {
   NOTIMPLEMENTED();
 }
Esempio n. 13
0
void Clipboard::ReadBookmark(base::string16* title, std::string* url) const
{
    NOTIMPLEMENTED();
}
Esempio n. 14
0
int
main(int argc, char *argv[]) {
  CControldClient the_controld;
  CControld::volume_type vt = CControld::TYPE_UNKNOWN;
  char *myname = argv[0];
  char arg = NO_ARG;
  char result = NO_RESULT;

  if ((argc >= 2) && (argv[1][0] == '-')) {
    switch (argv[1][1]) {
#ifdef HAVE_DBOX_HARDWARE
    case 'a':
      vt = CControld::TYPE_AVS;
      break;
#endif
    case 'o':
      vt = CControld::TYPE_OST;
      break;
#ifdef ENABLE_LIRC
    case 'l':
      vt = CControld::TYPE_LIRC;
      break;
#endif
    default:
      vt = CControld::TYPE_UNKNOWN;
    }
    argc--;
    argv++;
  }

  if (argc < 2) {
    usage(myname);
    return 1;
  }

  if (argc >= 3) {
    arg = char(atoi(argv[2]));
  }
    
  GETCOMMAND_VOLUME("getVolume", getVolume)
  SETCOMMAND_VOLUME("setVolume", setVolume)
  GETCOMMAND("getVideoOutput", getVideoOutput)
  SETCOMMAND("setVideoOutput", setVideoOutput)
  SETCOMMAND_VOLUME("setMute", setMute)
  GETCOMMAND_VOLUME("getMute", getMute)
  DOCOMMAND_VOLUME("Mute", Mute)
  DOCOMMAND_VOLUME("UnMute", UnMute)
  SETCOMMAND("setVideoFormat", setVideoFormat)
  GETCOMMAND("getVideoFormat", getVideoFormat)
  GETCOMMAND("getAspectRatio", getAspectRatio)
  SETCOMMAND("setVCROutput", setVCROutput)
  GETCOMMAND("getVCROutput", getVCROutput)
  NOTIMPLEMENTED("setBoxType", setBoxType)
  GETCOMMAND("getBoxType", getBoxType)
  SETCOMMAND("setScartMode", setScartMode)
  GETCOMMAND("getScartMode", getScartMode)
  SETCOMMAND("videoPowerDown", videoPowerDown)
  GETCOMMAND("getVideoPowerDown", getVideoPowerDown)
  SETCOMMAND("setRGBCsync", setRGBCsync)
  GETCOMMAND("getRGBCsync", getRGBCsync)
  DOCOMMAND("shutdown", shutdown)
  DOCOMMAND("saveSettings", saveSettings)
  NOTIMPLEMENTED("registerEvent", registerEvent)
  NOTIMPLEMENTED("unRegisterEvent", unRegisterEvent)
  
    usage(myname);

  if (result != NO_RESULT) 
    printf("%d\n", (int) result);
}