本文整理汇总了C++中DvDevice类的典型用法代码示例。如果您正苦于以下问题:C++ DvDevice类的具体用法?C++ DvDevice怎么用?C++ DvDevice使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DvDevice类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TryDisable
TBool ExampleMediaPlayer::TryDisable(DvDevice& aDevice)
{
if (aDevice.Enabled())
{
aDevice.SetDisabled(MakeFunctor(*this, &ExampleMediaPlayer::Disabled));
return true;
}
return false;
}
示例2: DvProvider
DvProviderOpenhomeOrgTestDimmableLight1::DvProviderOpenhomeOrgTestDimmableLight1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "openhome.org", "TestDimmableLight", 1)
{
iPropertyA_ARG_Level = new PropertyUint(new ParameterUint("A_ARG_Level"));
iService->AddProperty(iPropertyA_ARG_Level); // passes ownership
}
示例3: DvProvider
DvProviderUpnpOrgRenderingControl1::DvProviderUpnpOrgRenderingControl1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "upnp.org", "RenderingControl", 1)
{
iPropertyLastChange = new PropertyString(new ParameterString("LastChange"));
iService->AddProperty(iPropertyLastChange); // passes ownership
}
示例4: DvProvider
DvProviderAvOpenhomeOrgVolume1::DvProviderAvOpenhomeOrgVolume1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "av.openhome.org", "Volume", 1)
{
iPropertyVolume = new PropertyUint(new ParameterUint("Volume"));
iService->AddProperty(iPropertyVolume); // passes ownership
iPropertyMute = new PropertyBool(new ParameterBool("Mute"));
iService->AddProperty(iPropertyMute); // passes ownership
iPropertyBalance = new PropertyInt(new ParameterInt("Balance"));
iService->AddProperty(iPropertyBalance); // passes ownership
iPropertyFade = new PropertyInt(new ParameterInt("Fade"));
iService->AddProperty(iPropertyFade); // passes ownership
iPropertyVolumeLimit = new PropertyUint(new ParameterUint("VolumeLimit"));
iService->AddProperty(iPropertyVolumeLimit); // passes ownership
iPropertyVolumeMax = new PropertyUint(new ParameterUint("VolumeMax"));
iService->AddProperty(iPropertyVolumeMax); // passes ownership
iPropertyVolumeUnity = new PropertyUint(new ParameterUint("VolumeUnity"));
iService->AddProperty(iPropertyVolumeUnity); // passes ownership
iPropertyVolumeSteps = new PropertyUint(new ParameterUint("VolumeSteps"));
iService->AddProperty(iPropertyVolumeSteps); // passes ownership
iPropertyVolumeMilliDbPerStep = new PropertyUint(new ParameterUint("VolumeMilliDbPerStep"));
iService->AddProperty(iPropertyVolumeMilliDbPerStep); // passes ownership
iPropertyBalanceMax = new PropertyUint(new ParameterUint("BalanceMax"));
iService->AddProperty(iPropertyBalanceMax); // passes ownership
iPropertyFadeMax = new PropertyUint(new ParameterUint("FadeMax"));
iService->AddProperty(iPropertyFadeMax); // passes ownership
}
示例5: DvProvider
DvProviderUpnpOrgAVTransport1::DvProviderUpnpOrgAVTransport1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "upnp.org", "AVTransport", 1)
{
iPropertyLastChange = new PropertyString(new ParameterString("LastChange"));
iService->AddProperty(iPropertyLastChange); // passes ownership
}
示例6: DvProvider
DvProviderAvOpenhomeOrgPlaylist1::DvProviderAvOpenhomeOrgPlaylist1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "av.openhome.org", "Playlist", 1)
{
TChar** allowedValues;
TUint index;
index = 0;
allowedValues = new TChar*[4];
allowedValues[index++] = (TChar*)"Playing";
allowedValues[index++] = (TChar*)"Paused";
allowedValues[index++] = (TChar*)"Stopped";
allowedValues[index++] = (TChar*)"Buffering";
iPropertyTransportState = new PropertyString(new ParameterString("TransportState", allowedValues, 4));
delete[] allowedValues;
iService->AddProperty(iPropertyTransportState); // passes ownership
iPropertyRepeat = new PropertyBool(new ParameterBool("Repeat"));
iService->AddProperty(iPropertyRepeat); // passes ownership
iPropertyShuffle = new PropertyBool(new ParameterBool("Shuffle"));
iService->AddProperty(iPropertyShuffle); // passes ownership
iPropertyId = new PropertyUint(new ParameterUint("Id"));
iService->AddProperty(iPropertyId); // passes ownership
iPropertyIdArray = new PropertyBinary(new ParameterBinary("IdArray"));
iService->AddProperty(iPropertyIdArray); // passes ownership
iPropertyTracksMax = new PropertyUint(new ParameterUint("TracksMax"));
iService->AddProperty(iPropertyTracksMax); // passes ownership
iPropertyProtocolInfo = new PropertyString(new ParameterString("ProtocolInfo"));
iService->AddProperty(iPropertyProtocolInfo); // passes ownership
}
示例7: DvProvider
DvProviderUpnpOrgContentDirectory1::DvProviderUpnpOrgContentDirectory1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "upnp.org", "ContentDirectory", 1)
{
iPropertyTransferIDs = new PropertyString(new ParameterString("TransferIDs"));
iService->AddProperty(iPropertyTransferIDs); // passes ownership
iPropertySystemUpdateID = new PropertyUint(new ParameterUint("SystemUpdateID"));
iService->AddProperty(iPropertySystemUpdateID); // passes ownership
iPropertyContainerUpdateIDs = new PropertyString(new ParameterString("ContainerUpdateIDs"));
iService->AddProperty(iPropertyContainerUpdateIDs); // passes ownership
}
示例8: DvProvider
DvProviderUpnpOrgDimming1::DvProviderUpnpOrgDimming1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "upnp.org", "Dimming", 1)
{
iPropertyLoadLevelStatus = new PropertyUint(new ParameterUint("LoadLevelStatus", 0, 100));
iService->AddProperty(iPropertyLoadLevelStatus); // passes ownership
iPropertyStepDelta = new PropertyUint(new ParameterUint("StepDelta", 1, 100));
iService->AddProperty(iPropertyStepDelta); // passes ownership
iPropertyRampRate = new PropertyUint(new ParameterUint("RampRate", 0, 100));
iService->AddProperty(iPropertyRampRate); // passes ownership
iPropertyIsRamping = new PropertyBool(new ParameterBool("IsRamping"));
iService->AddProperty(iPropertyIsRamping); // passes ownership
iPropertyRampPaused = new PropertyBool(new ParameterBool("RampPaused"));
iService->AddProperty(iPropertyRampPaused); // passes ownership
}
示例9: DvProvider
DvProviderUpnpOrgContentDirectory2::DvProviderUpnpOrgContentDirectory2(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "upnp.org", "ContentDirectory", 2)
{
Construct();
}
示例10: iStandbyHandler
CProduct::CProduct(DvDevice& aDevice
, IStandbyHandler& aStandbyHandler
, ISourceIndexHandler& aSourceIndexHandler
, TBool aStandby
, const TChar* aAttributes
, const TChar* aManufacturerName
, const TChar* aManufacturerInfo
, const TChar* aManufacturerUrl
, const TChar* aManufacturerImageUri
, const TChar* aModelName
, const TChar* aModelInfo
, const TChar* aModelUrl
, const TChar* aModelImageUri
, const TChar* aProductRoom
, const TChar* aProductName
, const TChar* aProductInfo
, const TChar* aProductUrl
, const TChar* aProductImageUri)
: DvProviderAvOpenhomeOrgProduct1(aDevice)
, iStandbyHandler(aStandbyHandler)
, iSourceIndexHandler(aSourceIndexHandler)
, iSourceXmlChangeCount(0)
, iMutex("PROD")
{
aDevice.SetAttribute("Upnp.Domain", "av.openhome.org");
aDevice.SetAttribute("Upnp.Type", "Product");
aDevice.SetAttribute("Upnp.Version", "1");
aDevice.SetAttribute("Upnp.FriendlyName", "Product");
aDevice.SetAttribute("Upnp.Manufacturer", aManufacturerName);
aDevice.SetAttribute("Upnp.ManufacturerUrl", aManufacturerUrl);
aDevice.SetAttribute("Upnp.ModelDescription", aModelInfo);
aDevice.SetAttribute("Upnp.ModelName", aModelName);
aDevice.SetAttribute("Upnp.ModelNumber", "");
aDevice.SetAttribute("Upnp.ModelUrl", aModelUrl);
aDevice.SetAttribute("Upnp.SerialNumber", "");
aDevice.SetAttribute("Upnp.Upc", "");
EnableActionManufacturer();
EnableActionModel();
EnableActionProduct();
EnableActionStandby();
EnableActionSetStandby();
EnableActionSourceCount();
EnableActionSourceXml();
EnableActionSourceIndex();
EnableActionSetSourceIndex();
EnableActionSetSourceIndexByName();
EnableActionSource();
EnableActionAttributes();
EnableActionSourceXmlChangeCount();
SetPropertyStandby(aStandby);
SetPropertyAttributes(Brn(aAttributes));
SetPropertyManufacturerName(Brn(aManufacturerName));
SetPropertyManufacturerInfo(Brn(aManufacturerInfo));
SetPropertyManufacturerUrl(Brn(aManufacturerUrl));
SetPropertyManufacturerImageUri(Brn(aManufacturerImageUri));
SetPropertyModelName(Brn(aModelName));
SetPropertyModelInfo(Brn(aModelInfo));
SetPropertyModelUrl(Brn(aModelUrl));
SetPropertyModelImageUri(Brn(aModelImageUri));
SetPropertyProductRoom(Brn(aProductRoom));
SetPropertyProductName(Brn(aProductName));
SetPropertyProductInfo(Brn(aProductInfo));
SetPropertyProductUrl(Brn(aProductUrl));
SetPropertyProductImageUri(Brn(aProductImageUri));
SetPropertySourceIndex(0);
SetPropertySourceCount(0);
SetPropertySourceXml(Brn(""));
}
示例11: DvProvider
DvProviderUpnpOrgAVTransport2::DvProviderUpnpOrgAVTransport2(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "upnp.org", "AVTransport", 2)
{
Construct();
}
示例12: DvProvider
DvProviderOpenhomeOrgTestBasic1::DvProviderOpenhomeOrgTestBasic1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "openhome.org", "TestBasic", 1)
{
Construct();
}
示例13: DvProvider
DvProviderUpnpOrgScheduledRecording1::DvProviderUpnpOrgScheduledRecording1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "upnp.org", "ScheduledRecording", 1)
{
Construct();
}
示例14: DvProvider
DvProviderUpnpOrgSwitchPower1::DvProviderUpnpOrgSwitchPower1(DvDevice& aDevice)
: DvProvider(aDevice.Device(), "upnp.org", "SwitchPower", 1)
{
Construct();
}
示例15: DvProviderCreate
DvProviderC DvProviderCreate(DvDeviceC aDevice, const char* aDomain, const char* aType, uint32_t aVersion)
{
DvDevice* d = DviDeviceC::DeviceFromHandle(aDevice);
DviDevice& device = d->Device();
return (DvProviderC)new DvProviderWrapper(device, aDomain, aType, aVersion);
}