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


Java UDADeviceType类代码示例

本文整理汇总了Java中org.teleal.cling.model.types.UDADeviceType的典型用法代码示例。如果您正苦于以下问题:Java UDADeviceType类的具体用法?Java UDADeviceType怎么用?Java UDADeviceType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UDADeviceType类属于org.teleal.cling.model.types包,在下文中一共展示了UDADeviceType类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: searchDevices

import org.teleal.cling.model.types.UDADeviceType; //导入依赖的package包/类
public void searchDevices(final OnSearchDeviceCallback callback) {
	if (ActionHandler.isAlive())
		ActionHandler.getHandler().post(new Runnable() {

			@Override
			public void run() {
				if (service == null) {
					service = ServiceManager.getService();
				}
				service.getRegistry().addListener(listener);
				DeviceManager.this.callback = callback;
				UDADeviceType udaType = new UDADeviceType("MediaRenderer");
				service.getControlPoint().search(
						new UDADeviceTypeHeader(udaType));
			}
		});
}
 
开发者ID:jasoncn90,项目名称:dlna-for-android,代码行数:18,代码来源:DeviceManager.java

示例2: createDevice

import org.teleal.cling.model.types.UDADeviceType; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public LocalDevice createDevice() throws ValidationException,
		LocalServiceBindingException {
	DeviceType type = new UDADeviceType("MediaServer", 1);

	DeviceDetails details = new DeviceDetails("MediaServer v1",
			new ManufacturerDetails("XXXXX��˾", "http://www.idaoben.com/"),
			new ModelDetails("MediaServer v1", "A simple media server.",
					"v1"));

	LocalService contentDirectory = new AnnotationLocalServiceBinder()
			.read(ContentDirectory.class);
	contentDirectory
			.setManager(new DefaultServiceManager<ContentDirectory>(
					contentDirectory, null) {
				@Override
				protected ContentDirectory createServiceInstance()
						throws Exception {
					return new ContentDirectory();
				}
			});

	LocalService connectionManager = new AnnotationLocalServiceBinder()
			.read(ConnectionManagerService.class);
	connectionManager
			.setManager(new DefaultServiceManager<ConnectionManagerService>(
					connectionManager, ConnectionManagerService.class));

	return new LocalDevice(new DeviceIdentity(udn), type, details,
			createDefaultDeviceIcon(), new LocalService[] {
					connectionManager, contentDirectory });
}
 
开发者ID:jasoncn90,项目名称:dlna-for-android,代码行数:33,代码来源:MediaServer.java

示例3: createDevice

import org.teleal.cling.model.types.UDADeviceType; //导入依赖的package包/类
LocalDevice createDevice()
            throws ValidationException, LocalServiceBindingException, IOException {

        DeviceIdentity identity =
                new DeviceIdentity(
                        UDN.uniqueSystemIdentifier("CMU Cloudlet Server")
                );

        DeviceType type =
                new UDADeviceType("CloudletServer", 1);

        DeviceDetails details =
                new DeviceDetails(
                        "CMU Cloudlet Service",
                        new ManufacturerDetails("CMU"),
                        new ModelDetails(
                                "Cloudlet V1.0",
                                "A Demo Cloudlet Server",
                                "v1"
                        )
                );

//        Icon icon =new Icon( "image/png", 48, 48, 8, getClass().getResource("icon.png"));

        LocalService<GabrielService> gabrielService = new AnnotationLocalServiceBinder().read(GabrielService.class);

        gabrielService.setManager(
                new DefaultServiceManager(gabrielService, GabrielService.class)
        );

        return new LocalDevice(identity, type, details, gabrielService);

        /* Several services can be bound to the same device:
        return new LocalDevice(
                identity, type, details, icon,
                new LocalService[] {switchPowerService, myOtherService}
        );
        */
        
    }
 
开发者ID:cmusatyalab,项目名称:gabriel,代码行数:41,代码来源:GabrielUPnPServer.java

示例4: remoteDeviceAdded

import org.teleal.cling.model.types.UDADeviceType; //导入依赖的package包/类
@Override
public void remoteDeviceAdded(Registry registry, final RemoteDevice device) {
   	if (device.findDevices(new UDADeviceType("MediaRenderer")).length > 0) {
   		logger.log(Level.INFO, "Adding remote device: " + device.getDetails().getFriendlyName() + "UUID: " + device.getIdentity().getUdn().toString());
   		final DeviceListItem deviceItem = adaptDevice(device);
   		SwingUtilities.invokeLater(new Runnable() {
   			@Override
   			public void run() {
   	    		listModel.addElement(deviceItem);
   			}
   		});
       }
}
 
开发者ID:Douglas6,项目名称:pipoint,代码行数:14,代码来源:DlnaRendererManager.java

示例5: refreshDevices

import org.teleal.cling.model.types.UDADeviceType; //导入依赖的package包/类
@Override
public void refreshDevices() {
   	UDADeviceType deviceType = new UDADeviceType ("MediaRenderer");
	controlPoint.search(new UDADeviceTypeHeader(deviceType));
}
 
开发者ID:Douglas6,项目名称:pipoint,代码行数:6,代码来源:DlnaRendererManager.java


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