当前位置: 首页>>代码示例>>C++>>正文


C++ DeviceList::getDevice方法代码示例

本文整理汇总了C++中DeviceList::getDevice方法的典型用法代码示例。如果您正苦于以下问题:C++ DeviceList::getDevice方法的具体用法?C++ DeviceList::getDevice怎么用?C++ DeviceList::getDevice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DeviceList的用法示例。


在下文中一共展示了DeviceList::getDevice方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: print

void ControlPoint::print() {
    DeviceList *devList = getDeviceList();
    int devCnt = devList->size();
    cout << "Device Num = " << devCnt << endl;
    for (int n = 0; n < devCnt; n++) {
      Device *dev = devList->getDevice(n);
      cout << "[" << n <<  "] " << dev->getFriendlyName() << ", " << dev->getLeaseTime() << ", " << dev->getElapsedTime() << endl;
    }    
}
开发者ID:SrihariLibre,项目名称:CyberLink4CC,代码行数:9,代码来源:ControlPoint.cpp

示例2: renewSubscriberService

void ControlPoint::renewSubscriberService(long timeout) {
  lock();
  DeviceList *devList = getDeviceList();
  int devCnt = devList->size();
  for (int n = 0; n < devCnt; n++) {
    Device *dev = devList->getDevice(n);
    renewSubscriberService(dev, timeout);
  }
  unlock();
}
开发者ID:SrihariLibre,项目名称:CyberLink4CC,代码行数:10,代码来源:ControlPoint.cpp

示例3: PrintDevice

void PrintDevice(Device *dev, int indent)
{
	PrintDeviceInfo(dev, indent);

	DeviceList *childDevList = dev->getDeviceList();
	int nChildDevs = childDevList->size();
	for (int n=0; n<nChildDevs; n++) {
		Device *childDev = childDevList->getDevice(n);
		PrintDevice(childDev, indent);
	}
}
开发者ID:Debanjan07,项目名称:CyberLink4CC,代码行数:11,代码来源:TestCtrlPoint.cpp

示例4: print

void TestCtrlPoint::print()
{
	DeviceList *rootDevList = getDeviceList();
	int nRootDevs = rootDevList->size();
	cout << "Device Num = " << nRootDevs << endl;
	for (int n=0; n<nRootDevs; n++) {
		Device *dev = rootDevList->getDevice(n);
		const char *devName = dev->getFriendlyName();
		cout << "[" << n << "] = " << devName << endl;
		PrintDevice(dev, 1);
	}
}
开发者ID:Debanjan07,项目名称:CyberLink4CC,代码行数:12,代码来源:TestCtrlPoint.cpp

示例5: getDeviceList

Device *ControlPoint::getDevice(const std::string &name) {
  DeviceList *devList = getDeviceList();
  int nDevs = devList->size();
  for (int n = 0; n < nDevs; n++) {
    Device *dev = devList->getDevice(n);
    if (dev->isDevice(name) == true)
      return dev;
    Device *cdev = dev->getDevice(name);
    if (cdev != NULL)
      return cdev;
  } 
  return NULL;
}
开发者ID:SrihariLibre,项目名称:CyberLink4CC,代码行数:13,代码来源:ControlPoint.cpp

示例6: DumpInfo

void CAVMediaPlayer::DumpInfo()
{
	DeviceList *devList = this->getDeviceList();
	int devCnt = devList->size();
	int mediaServerCnt = 0;
	for (int n=0; n<devCnt; n++) {
		Device *dev = devList->getDevice(n);
		if (dev->isDeviceType(MediaServer::DEVICE_TYPE) == false)
			continue;
		FTLTRACEA("[%d],Name=%s,LeaseTime=%d,ElpaseTime=%d", n, dev->getFriendlyName(), dev->getLeaseTime() , dev->getElapsedTime());
		//PrintContentDirectory(mplayer, dev);
		mediaServerCnt++;
	}		
	if (mediaServerCnt == 0) {
		FTLTRACE(TEXT("MediaServer is not found\n"));
	}

}
开发者ID:moon-sky,项目名称:fishjam-template-library,代码行数:18,代码来源:AVMediaPlayer.cpp

示例7: unsubscribe

void ControlPoint::unsubscribe(Device *device) {
  int n;

  ServiceList *serviceList = device->getServiceList();
  int serviceCnt = serviceList->size();
  for (n = 0; n < serviceCnt; n++) {
    Service *service = serviceList->getService(n);
    if (service->hasSID() == true)
      unsubscribe(service);
  }

  DeviceList *childDevList = device->getDeviceList();
  int childDevCnt = childDevList->size();
  for (n = 0; n < childDevCnt; n++) {
    Device *cdev = childDevList->getDevice(n);
    unsubscribe(cdev);
  }    
}
开发者ID:SrihariLibre,项目名称:CyberLink4CC,代码行数:18,代码来源:ControlPoint.cpp

示例8: removeExpiredDevices

void ControlPoint::removeExpiredDevices() {
  int n;
  DeviceList *devList = getDeviceList();
  size_t devCnt = devList->size();
  Device **dev = new Device*[devCnt];
  for (n = 0; n < devCnt; n++)
    dev[n] = devList->getDevice(n);
  for (n = 0; n < devCnt; n++) {
    if (dev[n]->isExpired() == true) {
      string msg = "Expired device = ";
      msg += dev[n]->getFriendlyName();
      Debug::message(msg.c_str());
      Node *rootNode = dev[n]->getRootNode();
      removeDevice(rootNode);
    }
  }
  delete []dev;
  initDeviceList();
}
开发者ID:SrihariLibre,项目名称:CyberLink4CC,代码行数:19,代码来源:ControlPoint.cpp


注:本文中的DeviceList::getDevice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。