Re: [PATCH] Add Display interface to cornucopia
On Wednesday 08 April 2009 20:50:27 Michael 'Mickey' Lauer wrote: Commited, thanks a lot! One nitpick: Since the time you did fsodevice, a lot of things have been added to Vala posix support. I'd rather use no C helpers, if possible, so please have a look whether you can do the ioctl directly from within Vala. Done :) :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: [PATCH] Add Display interface to cornucopia
On Saturday 04 April 2009 19:36:41 you wrote: Hi all, Attaching a couple of patches, 1.) Adding Display abstract interface to libfsoframework 2.) Adding kernel26_display plugin to fsodevice Please ignore the previous two patches. This set fixes the abort errors and makes the indentation and code style consistent with the existing code base. Apologies -- Regards Sudharshan S Blog : http://www.sudharsh.wordpress.com IRC : Sup3rkiddo @ Freenode, Gimpnet From ec4927188c293faf85cea6ae5a19f2860c499ed0 Mon Sep 17 00:00:00 2001 From: Sudharshan 'Sup3rkiddo' S sudha...@gmail.com Date: Sun, 5 Apr 2009 18:51:40 +0530 Subject: [PATCH] Add Display interface to libfsoframework Signed-off-by: Sudharshan 'Sup3rkiddo' S sudha...@gmail.com --- libfsoframework/fsoframework/fsoframework-2.0.vapi | 13 + libfsoframework/fsoframework/interfaces.vala | 14 ++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/libfsoframework/fsoframework/fsoframework-2.0.vapi b/libfsoframework/fsoframework/fsoframework-2.0.vapi index dfd55f9..cbcb1c8 100644 --- a/libfsoframework/fsoframework/fsoframework-2.0.vapi +++ b/libfsoframework/fsoframework/fsoframework-2.0.vapi @@ -5,6 +5,15 @@ namespace FsoFramework { [CCode (cprefix = FsoFrameworkDevice, lower_case_cprefix = fso_framework_device_)] namespace Device { [CCode (cheader_filename = fsoframework/interfaces.h)] + [DBus (name = org.freesmartphone.Device.Display)] + public interface Display : GLib.Object { + public abstract bool GetBacklightPower (); + public abstract int GetBrightness (); + public abstract GLib.HashTablestring,GLib.Value? GetInfo (); + public abstract void SetBacklightPower (bool power); + public abstract void SetBrightness (int brightness); + } + [CCode (cheader_filename = fsoframework/interfaces.h)] [DBus (name = org.freesmartphone.Device.LED)] public interface LED : GLib.Object { public abstract string GetName (); @@ -13,6 +22,10 @@ namespace FsoFramework { public abstract void SetNetworking (string iface, string mode) throws DBus.Error; } [CCode (cheader_filename = fsoframework/interfaces.h)] + public const string DisplayServiceFace; + [CCode (cheader_filename = fsoframework/interfaces.h)] + public const string DisplayServicePath; + [CCode (cheader_filename = fsoframework/interfaces.h)] public const string LedServiceFace; [CCode (cheader_filename = fsoframework/interfaces.h)] public const string LedServicePath; diff --git a/libfsoframework/fsoframework/interfaces.vala b/libfsoframework/fsoframework/interfaces.vala index 5dd12ad..893f28f 100644 --- a/libfsoframework/fsoframework/interfaces.vala +++ b/libfsoframework/fsoframework/interfaces.vala @@ -33,6 +33,10 @@ namespace FsoFramework public const string LedServiceFace = ServiceFacePrefix + .LED; public const string LedServicePath = ServicePathPrefix + /LED; + public const string DisplayServiceFace = ServiceFacePrefix + .Display; + public const string DisplayServicePath = ServicePathPrefix + /Display; + + [DBus (name = org.freesmartphone.Device.LED)] public abstract interface LED : GLib.Object { @@ -41,5 +45,15 @@ namespace FsoFramework public abstract void SetBlinking( int delay_on, int delay_off ) throws DBus.Error; public abstract void SetNetworking( string iface, string mode ) throws DBus.Error; } + + [DBus (name = org.freesmartphone.Device.Display)] + public abstract interface Display : GLib.Object + { + public abstract void SetBrightness(int brightness); + public abstract int GetBrightness(); + public abstract bool GetBacklightPower(); + public abstract void SetBacklightPower(bool power); + public abstract HashTablestring, Value? GetInfo(); + } } } -- 1.6.0.6 From 8dd5df9a2b7e3e74d5d1424569081910f854a7ab Mon Sep 17 00:00:00 2001 From: Sudharshan 'Sup3rkiddo' S sudha...@gmail.com Date: Sun, 5 Apr 2009 18:52:19 +0530 Subject: [PATCH] Add kernel26_display. No abort errors here Signed-off-by: Sudharshan 'Sup3rkiddo' S sudha...@gmail.com --- fsodeviced/configure.ac|1 + fsodeviced/src/plugins/Makefile.am |1 + .../src/plugins/kernel26_display/Makefile.am | 45 + .../src/plugins/kernel26_display/display-helpers.c | 38 + .../plugins/kernel26_display/display-helpers.vapi |4 + .../src/plugins/kernel26_display/plugin.vala | 174 6 files changed, 263 insertions(+), 0 deletions(-) create mode 100644 fsodeviced/src/plugins/kernel26_display/Makefile.am create mode 100644 fsodeviced/src/plugins/kernel26_display/display-helpers.c create mode 100644 fsodeviced/src/plugins/kernel26_display/display-helpers.vapi create mode 100644 fsodeviced/src/plugins/kernel26_display/plugin.vala diff --git a/fsodeviced/configure.ac b/fsodeviced/configure.ac index 9308b70..538a359 100644 ---
[PATCH] Add Display interface to cornucopia
Hi all, Attaching a couple of patches, 1.) Adding Display abstract interface to libfsoframework 2.) Adding kernel26_display plugin to fsodevice -- Regards Sudharshan S Blog : http://www.sudharsh.wordpress.com IRC : Sup3rkiddo @ Freenode, Gimpnet From b8acb2a5492d1a43dc38641d07adab1ac5b769f0 Mon Sep 17 00:00:00 2001 From: Sudharshan 'Sup3rkiddo' S sudha...@gmail.com Date: Sat, 4 Apr 2009 19:25:21 +0530 Subject: [PATCH] Add Display Interface to libfsoframework Signed-off-by: Sudharshan 'Sup3rkiddo' S sudha...@gmail.com --- libfsoframework/fsoframework/fsoframework-2.0.vapi | 13 + libfsoframework/fsoframework/interfaces.vala | 16 +++- 2 files changed, 28 insertions(+), 1 deletions(-) diff --git a/libfsoframework/fsoframework/fsoframework-2.0.vapi b/libfsoframework/fsoframework/fsoframework-2.0.vapi index b9a20d5..01b8ced 100644 --- a/libfsoframework/fsoframework/fsoframework-2.0.vapi +++ b/libfsoframework/fsoframework/fsoframework-2.0.vapi @@ -5,6 +5,15 @@ namespace FsoFramework { [CCode (cprefix = FsoFrameworkDevice, lower_case_cprefix = fso_framework_device_)] namespace Device { [CCode (cheader_filename = fsoframework/interfaces.h)] + [DBus (name = org.freesmartphone.Device.Display)] + public interface Display : GLib.Object { + public abstract bool GetBacklightPower (); + public abstract int GetBrightness (); + public abstract GLib.HashTablestring,GLib.Value? GetInfo (); + public abstract void SetBacklightPower (bool power); + public abstract void SetBrightness (int brightness); + } + [CCode (cheader_filename = fsoframework/interfaces.h)] [DBus (name = org.freesmartphone.Device.LED)] public interface LED : GLib.Object { public abstract string GetName (); @@ -13,6 +22,10 @@ namespace FsoFramework { public abstract void SetNetworking (string iface, string mode) throws DBus.Error; } [CCode (cheader_filename = fsoframework/interfaces.h)] + public const string DisplayServiceFace; + [CCode (cheader_filename = fsoframework/interfaces.h)] + public const string DisplayServicePath; + [CCode (cheader_filename = fsoframework/interfaces.h)] public const string LedServiceFace; [CCode (cheader_filename = fsoframework/interfaces.h)] public const string LedServicePath; diff --git a/libfsoframework/fsoframework/interfaces.vala b/libfsoframework/fsoframework/interfaces.vala index 5dd12ad..1214dd3 100644 --- a/libfsoframework/fsoframework/interfaces.vala +++ b/libfsoframework/fsoframework/interfaces.vala @@ -32,7 +32,11 @@ namespace FsoFramework public const string LedServiceFace = ServiceFacePrefix + .LED; public const string LedServicePath = ServicePathPrefix + /LED; - + + public const string DisplayServiceFace = ServiceFacePrefix + .Display; + public const string DisplayServicePath = ServicePathPrefix + /Display; + + [DBus (name = org.freesmartphone.Device.LED)] public abstract interface LED : GLib.Object { @@ -41,5 +45,15 @@ namespace FsoFramework public abstract void SetBlinking( int delay_on, int delay_off ) throws DBus.Error; public abstract void SetNetworking( string iface, string mode ) throws DBus.Error; } + + [DBus (name = org.freesmartphone.Device.Display)] + public abstract interface Display : GLib.Object + { + public abstract void SetBrightness(int brightness); + public abstract int GetBrightness(); + public abstract bool GetBacklightPower(); + public abstract void SetBacklightPower(bool power); + public abstract HashTablestring, Value? GetInfo(); + } } } -- 1.6.0.6 From bfac604756e4e81c4f4d16b57f380d03a0ae1a8d Mon Sep 17 00:00:00 2001 From: Sudharshan 'Sup3rkiddo' S sudha...@gmail.com Date: Sat, 4 Apr 2009 19:27:22 +0530 Subject: [PATCH] add kernel26_display plugin Signed-off-by: Sudharshan 'Sup3rkiddo' S sudha...@gmail.com --- fsodeviced/configure.ac|1 + fsodeviced/src/plugins/Makefile.am |1 + .../src/plugins/kernel26_display/Makefile.am | 45 ++ .../src/plugins/kernel26_display/display-helpers.c | 38 + .../plugins/kernel26_display/display-helpers.vapi |4 + .../src/plugins/kernel26_display/plugin.vala | 164 6 files changed, 253 insertions(+), 0 deletions(-) create mode 100644 fsodeviced/src/plugins/kernel26_display/Makefile.am create mode 100644 fsodeviced/src/plugins/kernel26_display/display-helpers.c create mode 100644 fsodeviced/src/plugins/kernel26_display/display-helpers.vapi create mode 100644 fsodeviced/src/plugins/kernel26_display/plugin.vala diff --git a/fsodeviced/configure.ac b/fsodeviced/configure.ac index 9308b70..538a359 100644 --- a/fsodeviced/configure.ac +++ b/fsodeviced/configure.ac @@ -53,6 +53,7 @@ AC_CONFIG_FILES([ src/bin/Makefile src/plugins/Makefile src/plugins/kernel26_leds/Makefile + src/plugins/kernel26_display/Makefile tests/Makefile ]) diff --git