Example #1
0
ServiceDesc *DeviceDesc::serviceAt(NPT_Ordinal index) const
{
	if (index < serviceCount()) {
		return *m_private->m_serviceList.GetItem(index);
	}
	return NULL;
}
Example #2
0
Service *Service::serviceByName(const QString &service_name)
{
	for (int i = 0; i < serviceCount(); ++i) {
		Service *svc = serviceAt(i);
		if(svc->name() == service_name) {
			return svc;
		}
	}
	return nullptr;
}