aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>2009-05-09 17:04:35 +0200
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>2009-05-09 17:04:35 +0200
commitdab51577fcd90ad3aebd7fec672457187538adf6 (patch)
tree1aeca6a47225a3ef7fd3ed9a94a6099eb7129d96
parent47ae6ce8a0dabc6b435bc165926d0572b6784148 (diff)
downloadcornucopia-dab51577fcd90ad3aebd7fec672457187538adf6.tar.gz
cornucopia-dab51577fcd90ad3aebd7fec672457187538adf6.tar.bz2
cornucopia-dab51577fcd90ad3aebd7fec672457187538adf6.zip
fsoframework: add interface for org.freesmartphone.Device.PowerSupply
-rw-r--r--libfsoframework/fsoframework/fsoframework-2.0.vapi14
-rw-r--r--libfsoframework/fsoframework/interfaces.vala15
2 files changed, 28 insertions, 1 deletions
diff --git a/libfsoframework/fsoframework/fsoframework-2.0.vapi b/libfsoframework/fsoframework/fsoframework-2.0.vapi
index 16075d48..040c7f32 100644
--- a/libfsoframework/fsoframework/fsoframework-2.0.vapi
+++ b/libfsoframework/fsoframework/fsoframework-2.0.vapi
@@ -27,6 +27,14 @@ namespace FsoFramework {
public abstract void SetNetworking (string iface, string mode) throws FsoFramework.OrgFreesmartphone, DBus.Error;
}
[CCode (cheader_filename = "fsoframework.h")]
+ [DBus (name = "org.freesmartphone.Device.PowerSupply")]
+ public interface PowerSupply : GLib.Object {
+ public abstract int GetCapacity () throws DBus.Error;
+ public abstract string GetName () throws DBus.Error;
+ public abstract string GetPowerStatus () throws DBus.Error;
+ public signal void PowerStatus (string power_status);
+ }
+ [CCode (cheader_filename = "fsoframework.h")]
[DBus (name = "org.freesmartphone.Device.RTC")]
public interface RTC : GLib.Object {
public abstract int GetCurrentTime () throws FsoFramework.OrgFreesmartphone, DBus.Error;
@@ -48,6 +56,10 @@ namespace FsoFramework {
[CCode (cheader_filename = "fsoframework.h")]
public const string LedServicePath;
[CCode (cheader_filename = "fsoframework.h")]
+ public const string PowerSupplyServiceFace;
+ [CCode (cheader_filename = "fsoframework.h")]
+ public const string PowerSupplyServicePath;
+ [CCode (cheader_filename = "fsoframework.h")]
public const string RtcServiceFace;
[CCode (cheader_filename = "fsoframework.h")]
public const string RtcServicePath;
@@ -123,7 +135,7 @@ namespace FsoFramework {
public static FsoFramework.BaseKObjectNotifier instance;
protected void _addMatch (string action, string subsystem, FsoFramework.KObjectNotifierFunc callback);
public static void addMatch (string action, string path, FsoFramework.KObjectNotifierFunc callback);
- public void handleMessage (string[] parts);
+ protected void handleMessage (string[] parts);
public BaseKObjectNotifier ();
protected bool onActionFromSocket (GLib.IOChannel source, GLib.IOCondition condition);
}
diff --git a/libfsoframework/fsoframework/interfaces.vala b/libfsoframework/fsoframework/interfaces.vala
index cb1bbca5..71618bf8 100644
--- a/libfsoframework/fsoframework/interfaces.vala
+++ b/libfsoframework/fsoframework/interfaces.vala
@@ -30,8 +30,11 @@ namespace FsoFramework
[DBus (name = "org.freesmartphone")]
public errordomain OrgFreesmartphone
{
+ [DBus (name = "Unsupported")]
Unsupported,
+ [DBus (name = "InvalidParameter")]
InvalidParameter,
+ [DBus (name = "SystemError")]
SystemError
}
@@ -51,6 +54,9 @@ namespace FsoFramework
public const string LedServiceFace = ServiceFacePrefix + ".LED";
public const string LedServicePath = ServicePathPrefix + "/LED";
+ public const string PowerSupplyServiceFace = ServiceFacePrefix + ".PowerSupply";
+ public const string PowerSupplyServicePath = ServicePathPrefix + "/PowerSupply";
+
public const string RtcServiceFace = ServiceFacePrefix + ".RTC";
public const string RtcServicePath = ServicePathPrefix + "/RTC";
@@ -79,6 +85,15 @@ namespace FsoFramework
public abstract void SetNetworking( string iface, string mode ) throws OrgFreesmartphone, DBus.Error;
}
+ [DBus (name = "org.freesmartphone.Device.PowerSupply")]
+ public abstract interface PowerSupply : GLib.Object
+ {
+ public abstract string GetName() throws DBus.Error;
+ public abstract string GetPowerStatus() throws DBus.Error;
+ public abstract int GetCapacity() throws DBus.Error;
+ public signal void PowerStatus( string power_status );
+ }
+
[DBus (name = "org.freesmartphone.Device.RTC")]
public abstract interface RTC : GLib.Object
{