/// <summary> /// Request an invocation object prior to setting input/output arguments /// </summary> /// <param name="aAction">Action which will be invoked</param> /// <param name="aCallback">Delegate to run when the action completes</param> /// <returns>Invocation object, ready to receive input and output arguments</returns> public Invocation Invocation(OpenHome.Net.Core.Action aAction, CpProxy.CallbackAsyncComplete aCallback) { Invocation invocation = new Invocation(this, aAction.Handle(), aCallback); lock (this) { iActiveInvocations.Add(invocation); } return invocation; }
/// <summary> /// Register an action as available. The action will be published as part of the owning device's service xml /// </summary> /// <param name="aAction">Action being registered as availabke</param> /// <param name="aDelegate">Delegate to call when the action is invoked</param> /// <param name="aPtr">Data to pass to the delegate</param> protected void EnableAction(OpenHome.Net.Core.Action aAction, ActionDelegate aDelegate, IntPtr aPtr) { iActions.Add(aAction); DvProviderAddAction(iHandle, aAction.Handle(), aDelegate, aPtr); }
/// <summary> /// Add a property to this provider /// </summary> /// <remarks>Any later updates to the value of the property will be automatically published to /// any subscribers</remarks> /// <param name="aProperty">Property being added</param> protected void AddProperty(OpenHome.Net.Core.Property aProperty) { iProperties.Add(aProperty); DvProviderAddProperty(iHandle, aProperty.Handle()); }
public unsafe ParameterRelated(String aName, OpenHome.Net.Core.Property aProperty) { IntPtr name = InteropUtils.StringToHGlobalUtf8(aName); iHandle = ServiceParameterCreateRelated(name, aProperty.Handle()); Marshal.FreeHGlobal(name); }