Commit graph

61 commits

Author SHA1 Message Date
Jeremy Whiting
e2190d69eb Add set_gpu_clocks for setting manual clock rates.
Also fix typos in dbus xml to match generated api signatures.
2023-10-18 14:40:50 -06:00
Jeremy Whiting
0a49fdaf1f Implement set_gpu_performance_level.
Use an enum of values for level:
0 - auto
1 - low
2 - high
3 - manual
4 - peak_performance

If any out of range are given, return an false. If unable to write
or open for writing, return false. May change to give an err type
instead later if that helps client side.
2023-10-18 14:40:50 -06:00
Jeremy Whiting
14584d0540 Add format sdcard, update bios/dock, trim devices scripts.
For each of those use the respective polkit-helper script
for forward compatibility in case those change.
2023-10-18 14:22:20 -06:00
Jeremy Whiting
d74c7ae319 Change to tokio instead of async-std. 2023-10-18 13:42:15 -06:00
Jeremy Whiting
c06da2f376 Add script_output to get output from a script.
Check for errors, but otherwise get output, using process.wait()
to wait for all output, etc.
2023-10-04 23:11:10 -06:00
Jeremy Whiting
96b42d1338 Add some error checking to run_script and println! on errors.
TODO: Maybe log to journal instead, but maybe not needed depending
how this daemon gets executed.
2023-10-04 21:57:36 -06:00
Jeremy Whiting
a10db120e6 Fix clippy warnings to be more idiomatic.
Don't use return statements, just end functions with
what should return.
Remove unused use statement.
2023-10-04 21:26:29 -06:00
Jeremy Whiting
abb0520e67 Implement a few more apis.
Also updated run_script to take argv as parameter instead of a single
string.
2023-10-02 16:07:58 -06:00
Jeremy Whiting
e2cc4c2b38 Add basic running script functionality.
Will likely move api methods out to be more generic, but this
runs for now and gives true on success, false on failure, etc.
May also need to change from process.poll to wait for longer
running scripts. will do once tested more.
2023-10-02 12:31:28 -06:00
Jeremy Whiting
8f0f6e7976 Implement Version dbus api with value 1 for now. 2023-10-02 12:01:43 -06:00
Jeremy Whiting
701ff23987 Add initial dbus interface xml descripiton.
Much of this will change, but needed something to start with.
Based on notes at https://gitlab.steamos.cloud/jupiter/tasks/-/issues/894
Use objectserver to get introspection done for us.
Change to session bus for now since system bus will need
a config file to allow us to take the name. Will add later.
Implement one quick say_hello dbus method to start.
Add copyright headers.
2023-09-29 13:01:33 -06:00