Commit bb21532c authored by Aard's avatar Aard

[dbus] Fix and extend setDeviceMode, JB#31745

Move setDeviceMode to a int instead of custom type. Also make the
extended interface with edit mode specification available.
parent 01366298
......@@ -63,6 +63,10 @@
<method name="setDeviceMode">
<arg direction="in" type="i" name="mode"/>
</method>
<method name="setDeviceMode">
<arg direction="in" type="i" name="mode"/>
<arg direction="in" type="i" name="editMode"/>
</method>
<method name="flavour">
<arg direction="out" type="s" name="flavour"/>
</method>
......
......@@ -122,8 +122,15 @@ Ssu::DeviceModeFlags Ssud::deviceMode(){
return ssu.deviceMode();
}
void Ssud::setDeviceMode(enum Ssu::DeviceMode mode){
ssu.setDeviceMode(mode);
void Ssud::setDeviceMode(int mode){
setDeviceMode(mode, Ssu::Replace);
}
void Ssud::setDeviceMode(int mode, int editMode){
ssu.setDeviceMode(
Ssu::DeviceModeFlags(mode),
Ssu::EditMode(editMode)
);
SsuRepoManager repoManager;
repoManager.update();
......
......@@ -34,7 +34,8 @@ class Ssud: public QObject {
void unregisterDevice();
/* repository management */
Ssu::DeviceModeFlags deviceMode();
void setDeviceMode(enum Ssu::DeviceMode mode);
void setDeviceMode(int mode);
void setDeviceMode(int mode, int editMode);
QString flavour();
void setFlavour(const QString &release);
QString release(bool rnd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment