コード例 #1
0
        public ServiceLights(DvDevice aDevice, int aMode)
            : base(aDevice)
        {
            EnableActionGetCount();
            EnableActionGetRoom();
            EnableActionGetName();
            EnableActionGetPosition();
            EnableActionSetColor();
            EnableActionGetColor();
            EnableActionGetColorComponents();

            iLights = new List <Light>();

            switch (aMode)
            {
            case 1:
                InitMode1();
                break;

            case 2:
                InitMode2();
                break;

            case 3:
                InitMode3();
                break;

            default:
                Debug.Assert(false);
                break;
            }
        }
コード例 #2
0
        public ServiceTestBasic(DvDevice aDevice)
            : base(aDevice)
        {
            SetPropertyVarUint(0);
            SetPropertyVarInt(0);
            SetPropertyVarBool(false);
            string empty = "";

            SetPropertyVarStr(empty);
            SetPropertyVarBin(empty);

            EnableActionIncrement();
            EnableActionDecrement();
            EnableActionToggle();
            EnableActionEchoString();
            EnableActionEchoBinary();
            EnableActionSetUint();
            EnableActionGetUint();
            EnableActionSetInt();
            EnableActionGetInt();
            EnableActionSetBool();
            EnableActionGetBool();
            EnableActionSetString();
            EnableActionGetString();
            EnableActionSetBinary();
            EnableActionGetBinary();
            EnableActionSetMultiple();
        }
コード例 #3
0
ファイル: DvDevice.cs プロジェクト: daviddw/oss-public
 private static unsafe void WriteResource(IntPtr aUserData, char *aUriTail, uint aInterface, IntPtr aWriterData,
                                          CallbackWriteResourceBegin aWriteBegin,
                                          CallbackWriteResource aWriteResource,
                                          CallbackWriteResourceEnd aWriteEnd)
 {
     GCHandle       gch     = GCHandle.FromIntPtr(aUserData);
     DvDevice       self    = (DvDevice)gch.Target;
     string         uriTail = Marshal.PtrToStringAnsi((IntPtr)aUriTail);
     ResourceWriter writer  = new ResourceWriter(self.iResourceManager, uriTail, aInterface, aWriterData, aWriteBegin, aWriteResource, aWriteEnd);
 }
コード例 #4
0
 public DeviceBasic()
 {
     RandomiseUdn(out gDeviceName);
     iDevice = new DvDevice(gDeviceName);
     iDevice.SetAttribute("Upnp.Domain", "zapp.org");
     iDevice.SetAttribute("Upnp.Type", "Test");
     iDevice.SetAttribute("Upnp.Version", "1");
     iDevice.SetAttribute("Upnp.FriendlyName", "ZappTestDevice");
     iDevice.SetAttribute("Upnp.Manufacturer", "None");
     iDevice.SetAttribute("Upnp.ManufacturerUrl", "http://www.linn.co.uk");
     iDevice.SetAttribute("Upnp.ModelDescription", "Test service");
     iDevice.SetAttribute("Upnp.ModelName", "Zapp test device");
     iDevice.SetAttribute("Upnp.ModelNumber", "1");
     iDevice.SetAttribute("Upnp.ModelUrl", "http://www.linn.co.uk");
     iDevice.SetAttribute("Upnp.SerialNumber", "123456");
     iDevice.SetAttribute("Upnp.Upc", "123456654321");
     iTestBasic = new ServiceTestBasic(iDevice);
     iDevice.SetEnabled();
 }
コード例 #5
0
 public DeviceLights(int aMode, string aConfigDir)
 {
     iConfigDir = aConfigDir;
     RandomiseUdn(out iDeviceName);
     iDevice = new DvDevice(iDeviceName, this);
     iDevice.SetAttribute("Upnp.Domain", "zapp.org");
     iDevice.SetAttribute("Upnp.Type", "TestLights");
     iDevice.SetAttribute("Upnp.Version", "1");
     iDevice.SetAttribute("Upnp.FriendlyName", "Zapp Lights");
     iDevice.SetAttribute("Upnp.Manufacturer", "None");
     iDevice.SetAttribute("Upnp.ManufacturerUrl", "http://www.linn.co.uk");
     iDevice.SetAttribute("Upnp.ModelDescription", "Demo lighting service, enabling simple UI development");
     iDevice.SetAttribute("Upnp.ModelName", "Zapp Lights v1");
     iDevice.SetAttribute("Upnp.ModelNumber", "1");
     iDevice.SetAttribute("Upnp.ModelUrl", "http://www.linn.co.uk");
     iDevice.SetAttribute("Upnp.SerialNumber", "123456");
     iDevice.SetAttribute("Upnp.Upc", "123456654321");
     iLights = new ServiceLights(iDevice, aMode);
     iDevice.SetEnabled();
 }
コード例 #6
0
 public DvServiceZappOrgTestDimmableLight1(DvDevice aDevice)
 {
     iHandle = DvServiceZappOrgTestDimmableLight1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #7
0
 public DvServiceLinnCoUkDiagnostics1(DvDevice aDevice)
 {
     iHandle = DvServiceLinnCoUkDiagnostics1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #8
0
 public DvServiceLinnCoUkDebug2(DvDevice aDevice)
 {
     iHandle = DvServiceLinnCoUkDebug2Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #9
0
 public DvServiceUpnpOrgContentDirectory3(DvDevice aDevice)
 {
     iHandle = DvServiceUpnpOrgContentDirectory3Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #10
0
 public DvServiceUpnpOrgConnectionManager2(DvDevice aDevice)
 {
     iHandle = DvServiceUpnpOrgConnectionManager2Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #11
0
 public DvServiceUpnpOrgDimming1(DvDevice aDevice)
 {
     iHandle = DvServiceUpnpOrgDimming1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #12
0
 public DvServiceUpnpOrgSwitchPower1(DvDevice aDevice)
 {
     iHandle = DvServiceUpnpOrgSwitchPower1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #13
0
 public DvServiceLinnCoUkConfiguration1(DvDevice aDevice)
 {
     iHandle = DvServiceLinnCoUkConfiguration1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #14
0
 public DvServiceLinnCoUkMediaTime1(DvDevice aDevice)
 {
     iHandle = DvServiceLinnCoUkMediaTime1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #15
0
 public DvServiceLinnCoUkVolkano1(DvDevice aDevice)
 {
     iHandle = DvServiceLinnCoUkVolkano1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #16
0
 public DvServiceLinnCoUkProduct3(DvDevice aDevice)
 {
     iHandle = DvServiceLinnCoUkProduct3Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #17
0
 public DvServiceZappOrgTestBasic1(DvDevice aDevice)
 {
     iHandle = DvServiceZappOrgTestBasic1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #18
0
 public DvServiceLinnCoUkComponent1(DvDevice aDevice)
 {
     iHandle = DvServiceLinnCoUkComponent1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #19
0
 public DvServiceLinnCoUkProxyManager1(DvDevice aDevice)
 {
     iHandle = DvServiceLinnCoUkProxyManager1Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #20
0
 public DvServiceUpnpOrgAVTransport2(DvDevice aDevice)
 {
     iHandle = DvServiceUpnpOrgAVTransport2Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }
コード例 #21
0
 public DvServiceUpnpOrgScheduledRecording2(DvDevice aDevice)
 {
     iHandle = DvServiceUpnpOrgScheduledRecording2Create(aDevice.Handle());
     iGch    = GCHandle.Alloc(this);
 }