public static ISdpService CreateCustom(ServiceRecord record, WidcommBluetoothFactoryBase factory) { ISdpService sdpService = factory.GetWidcommSdpService(); WidcommSdpServiceCreator creator = new WidcommSdpServiceCreator(); creator.CreateServiceRecord(record, sdpService); return(sdpService); }
//-------- public static ISdpService CreateRfcomm( Guid serviceClass, string serviceName, byte scn, WidcommBluetoothFactoryBase factory) { if (scn < BluetoothEndPoint.MinScn || scn > BluetoothEndPoint.MaxScn) { throw new ArgumentOutOfRangeException("scn" #if !NETCF , scn, null #endif ); } ISdpService sdpService = factory.GetWidcommSdpService(); sdpService.AddServiceClassIdList(serviceClass); sdpService.AddRFCommProtocolDescriptor(scn); if (serviceName != null) { sdpService.AddServiceName(serviceName); } sdpService.CommitRecord(); return(sdpService); }