C# 클래스 OpenHome.Net.Device.DvProvider

Base class for a service provider.
Derivations will typically be by service-specific auto-generated code which will offer 0..n actions and 0..n properties.
파일 보기 프로젝트 열기: openhome/ohNet

보호된 프로퍼티들

프로퍼티 타입 설명
iHandle System.IntPtr

공개 메소드들

메소드 설명
PropertiesLock ( ) : void

Lock the provider's properties, blocking publication of updates.

This is not necessary when updating a single property but is used by providers that have >1 properties whose values are related. Without locking, updates to some properties may be published, leaving related properties in their old (now incompatible) states. Every call to this must be followed by (exactly) one call to PropertiesUnlock().

PropertiesUnlock ( ) : void

Unlock the provider's properties, allowing publication of updates.

Any pending updates will automatically be scheduled. This must only be called following a call to PropertiesLock().

보호된 메소드들

메소드 설명
AddProperty ( OpenHome aProperty ) : void

Add a property to this provider

Any later updates to the value of the property will be automatically published to any subscribers

DisposeProvider ( ) : bool

Must be called by each sub-class, preferably from their Dispose() method

DvProvider ( OpenHome.Net.Device.DvDevice aDevice, String aDomain, String aType, uint aVersion ) : System

Constructor

EnableAction ( OpenHome aAction, ActionDelegate aDelegate, IntPtr aPtr ) : void

Register an action as available. The action will be published as part of the owning device's service xml

SetPropertyBinary ( PropertyBinary aProperty, byte aValue ) : bool

Utility function which updates the value of a PropertyBinary. (Not intended for external use)

If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled

SetPropertyBool ( PropertyBool aProperty, bool aValue ) : bool

Utility function which updates the value of a PropertyBool. (Not intended for external use)

If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled

SetPropertyInt ( PropertyInt aProperty, int aValue ) : bool

Utility function which updates the value of a PropertyInt. (Not intended for external use)

If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled. Throws ParameterValidationError if the property has a range of allowed values and the new value is not in this range

SetPropertyString ( PropertyString aProperty, String aValue ) : bool

Utility function which updates the value of a PropertyString. (Not intended for external use)

If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled. Throws ParameterValidationError if the property has a range of allowed values and the new value is not in this range

SetPropertyUint ( PropertyUint aProperty, uint aValue ) : bool

Utility function which updates the value of a PropertyUint. (Not intended for external use)

If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled. Throws ParameterValidationError if the property has a range of allowed values and the new value is not in this range

비공개 메소드들

메소드 설명
DvProviderAddAction ( IntPtr aProvider, IntPtr aAction, ActionDelegate aCallback, IntPtr aPtr ) : void
DvProviderAddProperty ( IntPtr aProvider, IntPtr aProperty ) : void
DvProviderCreate ( IntPtr aDevice, IntPtr aDomain, IntPtr aType, uint aVersion ) : IntPtr
DvProviderDestroy ( IntPtr aProvider ) : void
DvProviderPropertiesLock ( IntPtr aHandle ) : void
DvProviderPropertiesUnlock ( IntPtr aHandle ) : void
DvProviderSetPropertyBinary ( IntPtr aProvider, IntPtr aProperty, IntPtr aData, uint aLen, uint &aChanged ) : int
DvProviderSetPropertyBool ( IntPtr aProvider, IntPtr aProperty, uint aValue, uint &aChanged ) : int
DvProviderSetPropertyInt ( IntPtr aProvider, IntPtr aProperty, int aValue, uint &aChanged ) : int
DvProviderSetPropertyString ( IntPtr aProvider, IntPtr aProperty, IntPtr aValue, uint &aChanged ) : int
DvProviderSetPropertyUint ( IntPtr aProvider, IntPtr aProperty, uint aValue, uint &aChanged ) : int

메소드 상세

AddProperty() 보호된 메소드

Add a property to this provider
Any later updates to the value of the property will be automatically published to any subscribers
protected AddProperty ( OpenHome aProperty ) : void
aProperty OpenHome Property being added
리턴 void

DisposeProvider() 보호된 메소드

Must be called by each sub-class, preferably from their Dispose() method
protected DisposeProvider ( ) : bool
리턴 bool

DvProvider() 보호된 메소드

Constructor
protected DvProvider ( OpenHome.Net.Device.DvDevice aDevice, String aDomain, String aType, uint aVersion ) : System
aDevice OpenHome.Net.Device.DvDevice Device the service is being added to and will be offered by
aDomain String Domain of the vendor who defined the service
aType String Name of the service
aVersion uint Version number of the service
리턴 System

EnableAction() 보호된 메소드

Register an action as available. The action will be published as part of the owning device's service xml
protected EnableAction ( OpenHome aAction, ActionDelegate aDelegate, IntPtr aPtr ) : void
aAction OpenHome Action being registered as availabke
aDelegate ActionDelegate Delegate to call when the action is invoked
aPtr System.IntPtr Data to pass to the delegate
리턴 void

PropertiesLock() 공개 메소드

Lock the provider's properties, blocking publication of updates.
This is not necessary when updating a single property but is used by providers that have >1 properties whose values are related. Without locking, updates to some properties may be published, leaving related properties in their old (now incompatible) states. Every call to this must be followed by (exactly) one call to PropertiesUnlock().
public PropertiesLock ( ) : void
리턴 void

PropertiesUnlock() 공개 메소드

Unlock the provider's properties, allowing publication of updates.
Any pending updates will automatically be scheduled. This must only be called following a call to PropertiesLock().
public PropertiesUnlock ( ) : void
리턴 void

SetPropertyBinary() 보호된 메소드

Utility function which updates the value of a PropertyBinary. (Not intended for external use)
If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled
protected SetPropertyBinary ( PropertyBinary aProperty, byte aValue ) : bool
aProperty OpenHome.Net.Core.PropertyBinary Property to be updated
aValue byte New value for the property
리턴 bool

SetPropertyBool() 보호된 메소드

Utility function which updates the value of a PropertyBool. (Not intended for external use)
If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled
protected SetPropertyBool ( PropertyBool aProperty, bool aValue ) : bool
aProperty OpenHome.Net.Core.PropertyBool Property to be updated
aValue bool New value for the property
리턴 bool

SetPropertyInt() 보호된 메소드

Utility function which updates the value of a PropertyInt. (Not intended for external use)
If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled. Throws ParameterValidationError if the property has a range of allowed values and the new value is not in this range
protected SetPropertyInt ( PropertyInt aProperty, int aValue ) : bool
aProperty OpenHome.Net.Core.PropertyInt Property to be updated
aValue int New value for the property
리턴 bool

SetPropertyString() 보호된 메소드

Utility function which updates the value of a PropertyString. (Not intended for external use)
If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled. Throws ParameterValidationError if the property has a range of allowed values and the new value is not in this range
protected SetPropertyString ( PropertyString aProperty, String aValue ) : bool
aProperty OpenHome.Net.Core.PropertyString Property to be updated
aValue String New value for the property
리턴 bool

SetPropertyUint() 보호된 메소드

Utility function which updates the value of a PropertyUint. (Not intended for external use)
If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled. Throws ParameterValidationError if the property has a range of allowed values and the new value is not in this range
protected SetPropertyUint ( PropertyUint aProperty, uint aValue ) : bool
aProperty OpenHome.Net.Core.PropertyUint Property to be updated
aValue uint New value for the property
리턴 bool

프로퍼티 상세

iHandle 보호되어 있는 프로퍼티

protected IntPtr,System iHandle
리턴 System.IntPtr