本文整理汇总了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;
}
}
示例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();
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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"));
}
}
示例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);
}
}
示例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();
}