elementary / wingpanel-indicator-privacy

Wingpanel Privacy Indicator
Other
12 stars 7 forks source link

Investigate use of libgtop instead of calling lsof on commandline #2

Open davidmhewitt opened 7 years ago

davidmhewitt commented 7 years ago

Leaving this as more of a note to myself:

Currently using lsof to detect if the camera device in use. Can we use libgtop like the power indicator does to detect which processes are using the camera device. Would be much cleaner to use a library for this.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/44435051-investigate-use-of-libgtop-instead-of-calling-lsof-on-commandline?utm_campaign=plugin&utm_content=tracker%2F60367874&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F60367874&utm_medium=issues&utm_source=github).
davidmhewitt commented 7 years ago

Unfortunately, the vapi file we're using for libgtop doesn't include the necessary get_open_files functions. Generating a new file with vapigen seems to include the function but generates a whole bunch of other issues.

I'm going to mark this as blocked for now as the thought of manually fixing/writing vapi files for a library that big makes me a bit sad.

harisvsulaiman commented 6 years ago

Hi, @davidmhewitt Tested this on my machine ( not extensively ), it works fine.I think the elementary team should shipit now unless it is causing major issues for users/testers. Hopefully we can workout any issues. I'm excited to work on this.