cec: don't use the pid in dev_lock()/dev_unlock() calls
[deb_libcec.git] / src / cec-config-gui / actions / RescanDevices.cs
1 using CecSharp;
2
3 namespace CecConfigGui.actions
4 {
5 class RescanDevices : UpdateProcess
6 {
7 public RescanDevices(ref LibCecSharp lib)
8 {
9 Lib = lib;
10 }
11
12 public override void Process()
13 {
14 SendEvent(UpdateEventType.ProgressBar, 10);
15 SendEvent(UpdateEventType.StatusText, "Polling active devices");
16 Lib.RescanActiveDevices();
17
18 SendEvent(UpdateEventType.ProgressBar, 80);
19 SendEvent(UpdateEventType.StatusText, "Refreshing device list");
20 SendEvent(UpdateEventType.PollDevices);
21
22 SendEvent(UpdateEventType.ProgressBar, 100);
23 SendEvent(UpdateEventType.StatusText, "Ready.");
24 }
25
26 private LibCecSharp Lib;
27 }
28 }