Beispiel #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="aDevice">Device the service is being added to and will be offered by</param>
        /// <param name="aDomain">Domain of the vendor who defined the service</param>
        /// <param name="aType">Name of the service</param>
        /// <param name="aVersion">Version number of the service</param>
        protected DvProvider(DvDevice aDevice, String aDomain, String aType, uint aVersion)
        {
            IntPtr domain = InteropUtils.StringToHGlobalUtf8(aDomain);
            IntPtr type   = InteropUtils.StringToHGlobalUtf8(aType);

            iHandle = DvProviderCreate(aDevice.Handle(), domain, type, aVersion);
            Marshal.FreeHGlobal(type);
            Marshal.FreeHGlobal(domain);
            iActions    = new List <OpenHome.Net.Core.Action>();
            iProperties = new List <OpenHome.Net.Core.Property>();
        }
Beispiel #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="aDevice">Device the service is being added to and will be offered by</param>
 /// <param name="aDomain">Domain of the vendor who defined the service</param>
 /// <param name="aType">Name of the service</param>
 /// <param name="aVersion">Version number of the service</param>
 protected unsafe DvProvider(DvDevice aDevice, String aDomain, String aType, uint aVersion)
 {
     IntPtr domain = InteropUtils.StringToHGlobalUtf8(aDomain);
     IntPtr type = InteropUtils.StringToHGlobalUtf8(aType);
     iHandle = DvProviderCreate(aDevice.Handle(), domain, type, aVersion);
     Marshal.FreeHGlobal(type);
     Marshal.FreeHGlobal(domain);
     iActions = new List<OpenHome.Net.Core.Action>();
     iProperties = new List<OpenHome.Net.Core.Property>();
 }
 /// <summary>
 /// Instruct a device to publish itself using (only) this server.
 /// </summary>
 /// <param name="aDevice"></param>
 public void AddDevice(DvDevice aDevice)
 {
     DvServerUpnpAddDevice(iHandle, aDevice.Handle());
 }
Beispiel #4
0
 /// <summary>
 /// Instruct a device to publish itself using (only) this server.
 /// </summary>
 /// <param name="aDevice"></param>
 public void AddDevice(DvDevice aDevice)
 {
     DvServerUpnpAddDevice(iHandle, aDevice.Handle());
 }