Ejemplo n.º 1
0
        public bool IssueReboot()
        {
            iConsole.Write("Rebooting .......................... ");

            ServiceVolkano volkano = new ServiceVolkano(iDevice);

            ServiceVolkano.AsyncActionReboot async = volkano.CreateAsyncActionReboot();

            async.EventResponse += RebootResponse;

            iIsRebootAccepted.Reset();
            iIsByeByeReceived.Reset();
            iIsAliveReceived.Reset();

            iMutex.WaitOne();

            iNotifyByeByeReceived = false;

            iMutex.ReleaseMutex();

            iDeviceUdnPrefix = iDevice.Udn.Substring(0, 32);

            async.RebootBegin();

            return(WaitFor(iIsRebootAccepted, kMaxRebootAcceptedSeconds));
        }
Ejemplo n.º 2
0
        internal BasicSetup(Device aDevice, EventServerUpnp aEventServer)
        {
            iLock = new object();
            if (aDevice.HasService(ServiceConfiguration.ServiceType(1)) > 0)
            {
                iServiceConfiguration = new ServiceConfiguration(aDevice, aEventServer);
                iServiceConfiguration.EventInitial += EventHandlerConfigurationInitial;
                iActionSetParameter             = iServiceConfiguration.CreateAsyncActionSetParameter();
                iActionSetParameter.EventError += SetParameterError;
            }

            if (aDevice.HasService(ServiceVolkano.ServiceType(1)) > 0)
            {
                iServiceVolkano = new ServiceVolkano(aDevice);
                iActionReboot   = iServiceVolkano.CreateAsyncActionReboot();
            }
            iDeviceIpAddress = aDevice.IpAddress;
        }