[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819

Martin Jansa Martin.Jansa at gmail.com
Sat Aug 6 08:20:15 UTC 2011


The following commit has been merged in the debian branch:
commit e0593efdf587e9c6c8a6ec3091d201ee8e25428a
Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Mon Jan 17 13:17:55 2011 +0100

    add machine specific rules.yaml files from frameworkd-config-shr

diff --git a/etc/freesmartphone/oevents/a780/rules.yaml b/etc/freesmartphone/oevents/a780/rules.yaml
new file mode 100644
index 0000000..61cbb74
--- /dev/null
+++ b/etc/freesmartphone/oevents/a780/rules.yaml
@@ -0,0 +1,57 @@
+
+# This file is in YAML format (http://www.yaml.org/)
+# We define a list of rules that will be automatically loaded
+# When we start the oevents module of the framework daemon
+#
+# The attributes of a rule are :
+# - trigger     : trigger object
+# - filters     : filters object or list of filters objects
+# - actions     : action object or list of actions objects
+#
+# We define the following functions :
+# - CallStatus()            : create a trigger object activated on a call status event
+# - PowerStatus()           : create a trigger object activated on a power status event
+# - HasAttr(name, value)    : create a filter that accept signal with a given attribute
+# - Not(filter)             : create a neg filter
+# - PlaySound(file)         : Action that starts to play an audio file
+# - StopSound(file)         : Action that stop an audio file
+# - SetScenario(name)       : Action that sets an audio scenario
+# - StartVibration
+# - StopVibration
+# - RingTone(cmd)           : cmd can be 'start' or 'stop'
+# - Time(hour, min)         : create a trigger activated at the given time
+# - Debug(msg)              : Action that prints a debug message (only for debuging)
+-
+    #
+    # Call -> Audio Scenario Handling
+    #
+    trigger: IncomingMessage()
+    actions: MessageTone(play)
+
+-
+    while: CallListContains("incoming")
+    filters: Not(CallListContains("active"))
+    actions:
+             - RingTone()
+             - SetLed("a780__keypad", "blink")
+             - OccupyResource(Display)
+#-
+#    while: CallStatus()
+#    filters:
+#            - Or(Or(HasAttr(status, "outgoing"), HasAttr(status, "active")), And(HasAttr(status, "incoming"), CallListContains("active")))
+#            - Not(BTHeadsetIsConnected())
+#    actions:
+#            - SetScenario(gsmhandset)
+
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "charging")
+    actions: SetLed("a780__aux", "blink")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "full")
+    actions: SetLed("a780__aux", "light")
+-
+    trigger: PowerStatus()
+    filters: HasAttr(status, "empty")
+    actions: Command('poweroff')
diff --git a/etc/freesmartphone/oevents/rules.yaml b/etc/freesmartphone/oevents/htcdream/rules.yaml
similarity index 55%
copy from etc/freesmartphone/oevents/rules.yaml
copy to etc/freesmartphone/oevents/htcdream/rules.yaml
index 21ec5e3..5dfedde 100644
--- a/etc/freesmartphone/oevents/rules.yaml
+++ b/etc/freesmartphone/oevents/htcdream/rules.yaml
@@ -22,19 +22,6 @@
 # - Time(hour, min)         : create a trigger activated at the given time
 # - Debug(msg)              : Action that prints a debug message (only for debuging)
 -
-    trigger: Time(12,29)
-    actions: Debug("A Test")
--
-    #
-    # Suspend Handling
-    #
-    trigger: InputEvent()
-    filters:
-             - HasAttr(switch, "POWER")
-             - HasAttr(event, "released")
-             - HasAttr(duration, 0)
-    actions: Suspend()
--
     #
     # Call -> Audio Scenario Handling
     #
@@ -42,66 +29,58 @@
     actions: MessageTone(play)
 
 -
-    while: CallListContains("incoming")
-    filters:
-             - Not(CallListContains("active"))
-             - Not(BTHeadsetIsConnected())
+    while: CallListContains("INCOMING")
+    filters: Not(CallListContains("ACTIVE"))
     actions:
              - RingTone()
-             - SetDisplayBrightness("0", 90)
--
-    while: CallListContains("incoming")
-    filters:
-             - Not(CallListContains("active"))
-             - BTHeadsetIsConnected()
-    actions:
-             - SetDisplayBrightness("0", 90)
+             - Command('xset -display localhost:0 s reset')
+             - SetLed("green", "blink")
+             - OccupyResource(Display)
 -
     while: CallStatus()
-    filters: Not(HasAttr(status, "release"))
+    filters: Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE"))
     actions:
             - OccupyResource(CPU)
 -
+#    while: CallStatus()
+#    filters:
+#            - Or(Or(HasAttr(status, "outgoing"), HasAttr(status, "active")), And(HasAttr(status, "incoming"), CallListContains("active")))
+#            - Not(BTHeadsetIsConnected())
+#    actions:
+#            - SetScenario(gsmhandset)
+#-
     while: CallStatus()
     filters:
-            - Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
-            - Not(BTHeadsetIsConnected())
-    actions:
-            - SetScenario(gsmhandset)
--
-    while: CallStatus()
-    filters:
-            - Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
+            - Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
             - BTHeadsetIsConnected()
     actions:
             - SetScenario(gsmbluetooth)
-            - BTHeadsetPlaying()
-
+            - BTHeadsetPlaying()   
 -
     while: PowerStatus()
     filters: HasAttr(status, "charging")
-    actions: SetLed("gta02_power_orange", "light")
+    actions: SetLed("blue", "light")
 
-#-
-#    while: PowerStatus()
-#    filters: Not(HasAttr(status, "discharging"))
-#    actions: OccupyResource(Display)
+-
+    while: PowerStatus()
+    filters: Not(HasAttr(status, "discharging"))
+    actions: OccupyResource(CPU)
 
 -
     while: PowerStatus()
     filters: HasAttr(status, "critical")
-    actions: SetLed("gta02_power_orange", "blink")
+    actions: SetLed("red", "blink")
 -
     while: PowerStatus()
     filters: HasAttr(status, "full")
-    actions: SetLed("gta02_power_blue", "light")
+    actions: SetLed("green", "light")
 -
     trigger: PowerStatus()
     filters: HasAttr(status, "empty")
     actions: Command('poweroff')
 
     #
-    # Headset Audio Scenario Support
+    # Headset Audio Scenario Support. There is still work to be done. 
     #
 -
     trigger: InputEvent()
@@ -116,39 +95,36 @@
              - HasAttr(event, "released")
     actions: Command('amixer -d sset "Amp Spk" unmute')
 
-    #
-    # A few testing rules :
-    #
-
-    # This rule will only be enabled in silent mode
-    # According to the preferences rules conf files.
--
-    name: 'test-rule'
-    trigger: IdleState()
-    filters: HasAttr(status, "busy")
-    actions: Debug("Hello This is a test")
--
-    trigger: Test("test")
-    actions: Debug("trigger test")
--
-    while: Test("test2")
-    actions: RingTone()
--
-    trigger: DbusTrigger(system, 'org.freesmartphone.odeviced', 0, 'org.freesmartphone.Device.IdleNotifier', 'State')
-    actions: Debug("dbus trigger test")
--
 
     #
     # Idleness Brightness Handling
-    #
-    trigger: IdleState()
+    # (activating the user's screen saver from a central daemon is quite hacky 
+    #  we really want some user's application to listen for the right signals)
+-
+    while: IdleState()
     filters: HasAttr(status, "busy")
-    actions: SetDisplayBrightness("0", 90)
+#    actions: SetLed("lcd_backlight", "light")
+    actions: 
+             - SetLed("lcd_backlight", "light")
+             - SetLed("button_backlight", "light")
+             - SetLed("keyboard_backlight", "light")
 -
     trigger: IdleState()
     filters: HasAttr(status, "idle_dim")
-    actions: SetDisplayBrightness("0", 20)
+    actions:
+             - Command('xset -display localhost:0 s blank')
+             - Command('xset -display localhost:0 s activate')
 -
     trigger: IdleState()
-    filters: HasAttr(status, "idle_prelock")
-    actions: SetDisplayBrightness("0", 0)
+    filters: HasAttr(status, "suspend")
+    actions: Suspend()
+-
+    trigger: InputEvent()
+    filters:
+             - HasAttr(switch, "LID")
+             - HasAttr(event, "pressed")
+    actions: 
+            - SetLed("keyboard_backlight", "light")
+            - SetLed("button_backlight", "light")
+            - SetLed("lcd_backlight", "light")
+            - Debug("Lid Opened")
diff --git a/etc/freesmartphone/oevents/nokia900/rules.yaml b/etc/freesmartphone/oevents/nokia900/rules.yaml
new file mode 100644
index 0000000..c01bac8
--- /dev/null
+++ b/etc/freesmartphone/oevents/nokia900/rules.yaml
@@ -0,0 +1,88 @@
+
+# This file is in YAML format (http://www.yaml.org/)
+# We define a list of rules that will be automatically loaded
+# When we start the oevents module of the framework daemon
+#
+# The attributes of a rule are :
+# - trigger     : trigger object
+# - filters     : filters object or list of filters objects
+# - actions     : action object or list of actions objects
+#
+# We define the following functions :
+# - CallStatus()            : create a trigger object activated on a call status event
+# - PowerStatus()           : create a trigger object activated on a power status event
+# - HasAttr(name, value)    : create a filter that accept signal with a given attribute
+# - Not(filter)             : create a neg filter
+# - PlaySound(file)         : Action that starts to play an audio file
+# - StopSound(file)         : Action that stop an audio file
+# - SetScenario(name)       : Action that sets an audio scenario
+# - StartVibration
+# - StopVibration
+# - RingTone(cmd)           : cmd can be 'start' or 'stop'
+# - Time(hour, min)         : create a trigger activated at the given time
+# - Debug(msg)              : Action that prints a debug message (only for debuging)
+-
+    #
+    # Call -> Audio Scenario Handling
+    #
+    trigger: IncomingMessage()
+    actions: MessageTone(play)
+
+-
+    while: CallListContains("INCOMING")
+    filters: Not(CallListContains("ACTIVE"))
+    actions:
+             - RingTone()
+             - OccupyResource(Display)
+
+#-
+#    while: NewMissedCalls()
+#    actions: SetLed("lp5523_b", "blink")
+#
+-
+    while: UnreadMessages()
+    actions: SetLed("lp5523_b", "blink")
+
+-
+#    while: CallStatus()
+#    filters:
+#            - Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
+#            - Not(BTHeadsetIsConnected())
+#    actions:
+#            - SetScenario(gsmhandset)
+#-
+    while: CallStatus()
+    filters:
+            - Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
+            - BTHeadsetIsConnected()
+    actions:
+            - SetScenario(gsmbluetooth)
+            - BTHeadsetPlaying()   
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "charging")
+    actions: SetLed("lp5523_r", "light")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "critical")
+    actions: SetLed("lp5523_r", "blink")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "full")
+    actions: SetLed("lp5523_g", "light")
+-
+    trigger: PowerStatus()
+    filters: HasAttr(status, "empty")
+    actions: Command('poweroff')
+-
+    while: InputEvent()
+    filters:
+             - HasAttr(switch, "SLIDER")
+             - HasAttr(event, "pressed")
+    actions:
+             - SetLed("lp5523_kb1", "light")
+             - SetLed("lp5523_kb2", "light")
+             - SetLed("lp5523_kb3", "light")
+             - SetLed("lp5523_kb4", "light")
+             - SetLed("lp5523_kb5", "light")
+             - SetLed("lp5523_kb6", "light")
diff --git a/etc/freesmartphone/oevents/om-gta01/rules.yaml b/etc/freesmartphone/oevents/om-gta01/rules.yaml
new file mode 100644
index 0000000..0971dc6
--- /dev/null
+++ b/etc/freesmartphone/oevents/om-gta01/rules.yaml
@@ -0,0 +1,83 @@
+
+# This file is in YAML format (http://www.yaml.org/)
+# We define a list of rules that will be automatically loaded
+# When we start the oevents module of the framework daemon
+#
+# The attributes of a rule are :
+# - trigger     : trigger object
+# - filters     : filters object or list of filters objects
+# - actions     : action object or list of actions objects
+#
+# We define the following functions :
+# - CallStatus()            : create a trigger object activated on a call status event
+# - PowerStatus()           : create a trigger object activated on a power status event
+# - HasAttr(name, value)    : create a filter that accept signal with a given attribute
+# - Not(filter)             : create a neg filter
+# - PlaySound(file)         : Action that starts to play an audio file
+# - StopSound(file)         : Action that stop an audio file
+# - SetScenario(name)       : Action that sets an audio scenario
+# - StartVibration
+# - StopVibration
+# - RingTone(cmd)           : cmd can be 'start' or 'stop'
+# - Time(hour, min)         : create a trigger activated at the given time
+# - Debug(msg)              : Action that prints a debug message (only for debuging)
+-
+    #
+    # Call -> Audio Scenario Handling
+    #
+    trigger: IncomingMessage()
+    actions: MessageTone(play)
+
+-
+    while: CallListContains("incoming")
+    filters: Not(CallListContains("active"))
+    actions:
+             - RingTone()
+             - OccupyResource(Display)
+-
+#    while: CallStatus()
+#    filters:
+#            - Or(Or(HasAttr(status, "outgoing"), HasAttr(status, "active")), And(HasAttr(status, "incoming"), CallListContains("active")))
+#            - Not(BTHeadsetIsConnected())
+#    actions:
+#            - SetScenario(gsmhandset)
+#-
+    while: CallStatus()
+    filters:
+            - Or(Or(HasAttr(status, "outgoing"), HasAttr(status, "active")), And(HasAttr(status, "incoming"), CallListContains("active")))
+            - BTHeadsetIsConnected()
+    actions:
+            - SetScenario(gsmbluetooth)
+            - BTHeadsetPlaying()   
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "charging")
+    actions: SetLed("gta02_power_orange", "light")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "critical")
+    actions: SetLed("gta02_power_orange", "blink")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "full")
+    actions: SetLed("gta02_power_blue", "light")
+-
+    trigger: PowerStatus()
+    filters: HasAttr(status, "empty")
+    actions: Command('poweroff')
+
+    #
+    # Headset Audio Scenario Support. There is still work to be done. 
+    #
+-
+    trigger: InputEvent()
+    filters:
+             - HasAttr(switch, "HEADSET")
+             - HasAttr(event, "pressed")
+    actions: Command('amixer -d sset "Amp Mode" "Stereo Speakers + Headphones"')
+-
+    trigger: InputEvent()
+    filters:
+             - HasAttr(switch, "HEADSET")
+             - HasAttr(event, "released")
+    actions: Command('amixer -d sset "Amp Mode" "Headphones"')
diff --git a/etc/freesmartphone/oevents/om-gta02/rules.yaml b/etc/freesmartphone/oevents/om-gta02/rules.yaml
new file mode 100644
index 0000000..8f7e2a7
--- /dev/null
+++ b/etc/freesmartphone/oevents/om-gta02/rules.yaml
@@ -0,0 +1,77 @@
+
+# This file is in YAML format (http://www.yaml.org/)
+# We define a list of rules that will be automatically loaded
+# When we start the oevents module of the framework daemon
+#
+# The attributes of a rule are :
+# - trigger     : trigger object
+# - filters     : filters object or list of filters objects
+# - actions     : action object or list of actions objects
+#
+# We define the following functions :
+# - CallStatus()            : create a trigger object activated on a call status event
+# - PowerStatus()           : create a trigger object activated on a power status event
+# - HasAttr(name, value)    : create a filter that accept signal with a given attribute
+# - Not(filter)             : create a neg filter
+# - PlaySound(file)         : Action that starts to play an audio file
+# - StopSound(file)         : Action that stop an audio file
+# - SetScenario(name)       : Action that sets an audio scenario
+# - StartVibration
+# - StopVibration
+# - RingTone(cmd)           : cmd can be 'start' or 'stop'
+# - Time(hour, min)         : create a trigger activated at the given time
+# - Debug(msg)              : Action that prints a debug message (only for debuging)
+-
+    #
+    # Call -> Audio Scenario Handling
+    #
+    trigger: IncomingMessage()
+    actions: MessageTone(play)
+
+-
+    while: CallListContains("INCOMING")
+    filters: Not(CallListContains("ACTIVE"))
+    actions:
+             - RingTone()
+             - OccupyResource(Display)
+
+#-
+#    while: NewMissedCalls()
+#    actions: SetLed("gta02_red_aux", "blink")
+#
+-
+    while: UnreadMessages()
+    actions: SetLed("gta02_red_aux", "blink")
+
+-
+#    while: CallStatus()
+#    filters:
+#            - Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
+#            - Not(BTHeadsetIsConnected())
+#    actions:
+#            - SetScenario(gsmhandset)
+#-
+    while: CallStatus()
+    filters:
+            - Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
+            - BTHeadsetIsConnected()
+    actions:
+            - SetScenario(gsmbluetooth)
+            - BTHeadsetPlaying()   
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "charging")
+    actions: SetLed("gta02_orange_power", "light")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "critical")
+    actions: SetLed("gta02_orange_power", "blink")
+-
+    while: PowerStatus()
+    filters: HasAttr(status, "full")
+    actions: SetLed("gta02_blue_power", "light")
+-
+    trigger: PowerStatus()
+    filters: HasAttr(status, "empty")
+    actions: Command('poweroff')
+

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list