From 5cdfa0ea1b2f941ad12e24fffe89314ee96c0d1c Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Tue, 2 Feb 2010 17:08:51 +0000 Subject: EflClient: CORBA example - added little corba client/server 'hello world' Signed-off-by: Manuel Traut --- src/YalpClients/EflClient/corba_example/client.py | 36 +++++++++++++ src/YalpClients/EflClient/corba_example/client.sh | 2 + src/YalpClients/EflClient/corba_example/huhu.idl | 22 ++++++++ .../EflClient/corba_example/python_idl.sh | 2 + src/YalpClients/EflClient/corba_example/server.py | 63 ++++++++++++++++++++++ src/YalpClients/EflClient/corba_example/server.sh | 5 ++ 6 files changed, 130 insertions(+) create mode 100755 src/YalpClients/EflClient/corba_example/client.py create mode 100755 src/YalpClients/EflClient/corba_example/client.sh create mode 100644 src/YalpClients/EflClient/corba_example/huhu.idl create mode 100755 src/YalpClients/EflClient/corba_example/python_idl.sh create mode 100755 src/YalpClients/EflClient/corba_example/server.py create mode 100755 src/YalpClients/EflClient/corba_example/server.sh diff --git a/src/YalpClients/EflClient/corba_example/client.py b/src/YalpClients/EflClient/corba_example/client.py new file mode 100755 index 0000000..b6eff0a --- /dev/null +++ b/src/YalpClients/EflClient/corba_example/client.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +import sys +from omniORB import CORBA +import HuhuItf, CosNaming + +orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) + +obj = orb.resolve_initial_references("NameService") +root_context = obj._narrow(CosNaming.NamingContext) + +if root_context is None: + print "Failed to narrow the root naming context" + sys.exit(1) + +name = [CosNaming.NameComponent("huhu", "project"), + CosNaming.NameComponent("blubb", "object")] + +try: + obj = root_context.resolve(name) + +except CosNaming.NamingContext.NotFound, ex: + print "Name not found" + sys.exit(1) + +blubb = obj._narrow(HuhuItf.Blubb) + +if blubb is None: + print "obj ref is not an dbsfeditf::dependency" + sys.exit(1) + +pkg = HuhuItf.Package("e17-data","0.16.999.063-1","now","amd64"); +deps = blubb.get_something(pkg) + +for dep in deps: + print dep.name, dep.version diff --git a/src/YalpClients/EflClient/corba_example/client.sh b/src/YalpClients/EflClient/corba_example/client.sh new file mode 100755 index 0000000..38dc635 --- /dev/null +++ b/src/YalpClients/EflClient/corba_example/client.sh @@ -0,0 +1,2 @@ +#!/bin/bash +./client.py -ORBInitRef NameService=corbaloc:iiop:localhost:1055/NameService diff --git a/src/YalpClients/EflClient/corba_example/huhu.idl b/src/YalpClients/EflClient/corba_example/huhu.idl new file mode 100644 index 0000000..e455509 --- /dev/null +++ b/src/YalpClients/EflClient/corba_example/huhu.idl @@ -0,0 +1,22 @@ +module HuhuItf +{ + struct Package + { + string name; + string version; + string repo; + string arch; + }; + + struct Dependency + { + string name; + string version; + }; + typedef sequence Dependency_list; + + interface Blubb + { + Dependency_list get_something(in Package request); + }; +}; diff --git a/src/YalpClients/EflClient/corba_example/python_idl.sh b/src/YalpClients/EflClient/corba_example/python_idl.sh new file mode 100755 index 0000000..f470887 --- /dev/null +++ b/src/YalpClients/EflClient/corba_example/python_idl.sh @@ -0,0 +1,2 @@ +#!/bin/bash +omniidl -bpython huhu.idl diff --git a/src/YalpClients/EflClient/corba_example/server.py b/src/YalpClients/EflClient/corba_example/server.py new file mode 100755 index 0000000..d12f773 --- /dev/null +++ b/src/YalpClients/EflClient/corba_example/server.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python + +import sys +import os +from omniORB import CORBA, PortableServer +import CosNaming, HuhuItf, HuhuItf__POA + +class Blubb_i (HuhuItf__POA.Blubb): + + def get_something (self, request): + + pkg_no = 10 + cdeps = [] + + while pkg_no > 0: + cdep = HuhuItf.Dependency ("hallo du", str (pkg_no)) + cdeps.append (cdep) + pkg_no = pkg_no - 1 + + return cdeps + +orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) +poa = orb.resolve_initial_references("RootPOA") + +blubb_i = Blubb_i() +blubb_o = blubb_i._this() +print orb.object_to_string(blubb_o) + +obj = orb.resolve_initial_references("NameService") +root_context = obj._narrow(CosNaming.NamingContext) + +if root_context is None: + print "Failed to narrow the root naming context" + sys.exit(1) + +name = [CosNaming.NameComponent("huhu", "project")] + +try: + huhu_context = root_context.bind_new_context(name) + print "dbsfed:project bound to naming service" + +except CosNaming.NamingContext.AlreadyBound, ex: + print "dbsfed:project already bount to naming service" + obj = root_context.resolve(name) + huhu_context = obj._narrow(CosNaming.NamingContext) + if huhu_context is None: + print "dbsfed:project exists but is not a naming context" + sys.exit(1) + +name = [CosNaming.NameComponent("blubb", "object")] + +try: + huhu_context.bind(name, blubb_o) + print "new aptd:apt object bound" + +except CosNaming.NamingContext.AlreadyBound: + huhu_context.rebind(name, blubb_o) + print "aptd:apt binding already existed, rebound" + +poaManager = poa._get_the_POAManager() +poaManager.activate() + +orb.run() diff --git a/src/YalpClients/EflClient/corba_example/server.sh b/src/YalpClients/EflClient/corba_example/server.sh new file mode 100755 index 0000000..dd1e68d --- /dev/null +++ b/src/YalpClients/EflClient/corba_example/server.sh @@ -0,0 +1,5 @@ +#!/bin/bash +orbd -ORBInitialPort 1055 & +sleep 3 +./server.py -ORBInitRef NameService=corbaloc:iiop:localhost:1055/NameService +killall -9 orbd -- cgit v1.2.3 From 927d9f24a2d9560d5cc58945008f8f092c8321ce Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Sun, 7 Feb 2010 11:52:39 +0100 Subject: Python-EFL GUI: new editable Textfield Signed-off-by: Nicole Vreden --- ServerSettings.xml | 12 ++++++------ server.sh | 4 ++-- src/YalpClients/EflClient/main.py | 2 +- src/YalpClients/EflClient/searchframe.py | 14 +++++++++++--- src/YalpClients/EflClient/yalp_gui.edc | 31 ++++++++++++++++++------------- 5 files changed, 38 insertions(+), 25 deletions(-) diff --git a/ServerSettings.xml b/ServerSettings.xml index 4343a72..11dd45d 100644 --- a/ServerSettings.xml +++ b/ServerSettings.xml @@ -1,6 +1,6 @@ - - - jdbc:postgresql://localhost:5432/yalp - huhu - yalp - + + + jdbc:postgresql://localhost:5432/yalp + huhu + yalp + diff --git a/server.sh b/server.sh index 66cd5fd..0435a13 100755 --- a/server.sh +++ b/server.sh @@ -1,7 +1,7 @@ /usr/bin/orbd \ -J-Djava.net.preferIPv4Stack=true \ --J-Dorg.omg.CORBA.ORBInitialHost=127.0.0.1 \ --ORBInitialPort 1050 -ORBInitialHost 127.0.0.1 & +-J-Dorg.omg.CORBA.ORBInitialHost=192.168.178.20 \ +-ORBInitialPort 1050 -ORBInitialHost 192.168.178.20 & sleep 4 ./start-java.sh yalpServer.jar killall -9 orbd diff --git a/src/YalpClients/EflClient/main.py b/src/YalpClients/EflClient/main.py index 867d7d0..790e49d 100755 --- a/src/YalpClients/EflClient/main.py +++ b/src/YalpClients/EflClient/main.py @@ -25,7 +25,7 @@ def gui(): win.title_set("YALP") win.autodel_set(True) - win.destroy = destroy + #win.destroy = destroy vid = emotion.Emotion(win.canvas,module_filename="xine"); edje_file = os.path.join(os.path.dirname(sys.argv[0]),"yalp_gui.edj") diff --git a/src/YalpClients/EflClient/searchframe.py b/src/YalpClients/EflClient/searchframe.py index 8fec876..79e3fc6 100644 --- a/src/YalpClients/EflClient/searchframe.py +++ b/src/YalpClients/EflClient/searchframe.py @@ -13,11 +13,14 @@ class Search(object): def __init__(self, win, c): self.win = win self.c = c + self.searchfield() self.add_button() c.signal_callback_add("mouse,clicked,1","find_buttonframe", self.findbutton_clicked) def findbutton_clicked(self, obj, signal,source): - print "Huhu"; + print "Huhu" + searchentry = textfield.entry_get() + print searchentry def add_button(self): findbutton = elementary.Button(self.win) @@ -25,5 +28,10 @@ class Search(object): self.c.part_swallow("find_buttonframe", findbutton) findbutton.show() - - + def searchfield(self): + global textfield + textfield = elementary.Entry(self.win) + textfield.entry_set("Enter Title") + self.c.part_swallow("searcharea", textfield) + textfield.editable_set(True) + textfield.show() diff --git a/src/YalpClients/EflClient/yalp_gui.edc b/src/YalpClients/EflClient/yalp_gui.edc index f15187e..eb76edc 100644 --- a/src/YalpClients/EflClient/yalp_gui.edc +++ b/src/YalpClients/EflClient/yalp_gui.edc @@ -327,29 +327,33 @@ collections part { name: "searcharea"; - type: TEXTBLOCK; - mouse_events: 0; - entry_mode: EDITABLE; + type: SWALLOW; + mouse_events: 1; description { state: "default" 0.0; color: 255 255 255 255; - visible: 1; rel1 { - to: "searchframe"; - relative: 0.0 0.00; + relative: 0.15 0.07; } rel2 { - to: "searchframe"; - relative: 1.0 1.0; + relative: 0.65 0.13; + } + } + + description + { + state: "default" 1.0; + color: 0 0 0 0; + rel1 + { + relative: 0.15 0.0; } - text + rel2 { - text: "Suchbegriff eingeben"; - style: "searchfield_style"; - min: 0 0; + relative: 0.65 0.0; } } } @@ -362,12 +366,13 @@ collections source: "playlist_buttonframe"; signal: "mouse,clicked,1"; action: STATE_SET "default" 1.0; - target: "searchframe"; + // target: "searchframe"; target: "medialist_buttonframe"; target: "playlist_buttonframe"; target: "find_buttonframe"; target: "medialist"; target: "playlist"; + target: "searcharea"; target: "controlframe"; transition:SINUSOIDAL 1; } -- cgit v1.2.3 From d72c14135730aaa9efe643ee99c4de98732fbde1 Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Sun, 7 Feb 2010 12:47:14 +0100 Subject: Streaming: add switch for openmoko - enable different streaming options for streams to embedded devices Signed-off-by: Manuel Traut --- .../YalpVlcTelnetOutput/YalpOutputPluginImpl.java | 36 ++++++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java b/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java index f95324e..2165035 100644 --- a/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java +++ b/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java @@ -238,16 +238,32 @@ public class YalpOutputPluginImpl extends OutputPluginInterfacePOA { return; } - String comp = "#transcode{vcodec=DIV3,vb=256,scale=1,"; - comp += "acodec=mpga,ab=192,channels=2}"; - comp += ":duplicate{dst="; - - setup2 = "setup "+howtoStream.info.name+" output "+comp+"std{access=udp,"; - setup2 +="mux=ts,"; - setup2 +="dst=" + howtoStream.destIp + ":9993";// + howtoStream.info.params; - setup2 += "}"; - - String control = "control "+howtoStream.info.name+" play"; + String comp, control; + + if (howtoStream.info.params.value() == "openmoko") + { + comp = "#transcode{vcodec=DIV3,vb=256,scale=1,"; + comp += "acodec=mpga,ab=192,channels=2}"; + comp += ":duplicate{dst="; + setup2 = "setup "+howtoStream.info.name+" output "+comp+"std{access=udp,"; + setup2 +="mux=ts,"; + setup2 +="dst=" + howtoStream.destIp + ":9993";// + howtoStream.info.params; + setup2 += "}"; + control = "control "+howtoStream.info.name+" play"; + + } else { + + comp = "#transcode{vcodec=DIV3,vb=256,scale=1,"; + comp += "acodec=mpga,ab=192,channels=2}"; + comp += ":duplicate{dst="; + + setup2 = "setup "+howtoStream.info.name+" output "+comp+"std{access=udp,"; + setup2 +="mux=ts,"; + setup2 +="dst=" + howtoStream.destIp + ":9993";// + howtoStream.info.params; + setup2 += "}"; + + control = "control "+howtoStream.info.name+" play"; + } TelnetInterface telnet = new TelnetInterface(hostIP, 4212, "admin"); telnet.exec(newString); -- cgit v1.2.3 From db120e63d02dc3fce232192ede9a28076a374f2f Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Tue, 9 Feb 2010 23:01:14 +0100 Subject: Asciidoc: new Chapter "EFL" in documentation Signed-off-by: Nicole Vreden --- doc/asciidoc/efl.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ doc/asciidoc/task.txt | 2 ++ 2 files changed, 47 insertions(+) create mode 100644 doc/asciidoc/efl.txt diff --git a/doc/asciidoc/efl.txt b/doc/asciidoc/efl.txt new file mode 100644 index 0000000..a92b306 --- /dev/null +++ b/doc/asciidoc/efl.txt @@ -0,0 +1,45 @@ +Enlightenment Foundation Libraries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Evas +^^^^ +Evas ist eine Canvas-API zur Erstellung und Verwaltung von Anzeige-Objekten und +deren Eigenschaften. Objekte können einfach angelegt und manipuliert werden. +Alle Grafik-Routinen sind hoch optimiert und Evas kümmert sich automatisch +darum, Änderungen in der Anzeige mit möglichst wenig Aufwand neu zu zeichnen. +Evas ist klein und schlank und wurde entworfen um sowohl auf Embedded-Systemen +als auch auf leistungsstarken PCs zu arbeiten. + +Ecore.Evas +^^^^^^^^^^ +Ecore.Evas stellt einige nützliche Funktionen zum Event-Handling von Evas- +Anzeigen zur Verfügung. + +Edje +^^^^ +Edje ist eine komplexe Grafik- und Layout-Bibliothek, die das Layout von der +Verhaltenslogik trennt. In einem .edj-File wird das Layout beschrieben. Die +einzelnen Anzeige-Elemente werden als "parts" definiert, mehrere +zusammengehörige Elemente bilden eine "Collection". Außerdem kann in einer +Programmliste definiert werden, wie sich die Darstellung der Elemente bei +bestimmten Events (Mausklick, Tastatureingabe) ändert. +Wird dieses Edje-File in ein Python-Programm eingebunden kann auf die Edje-Parts +und Collections zugegriffen werden um komplexere Verhaltensweisen zu +implementieren. +Durch die Trennung von Layout und Verhaltenslogik ist es einfach und schnell +möglich, das Layout eines Programms zu ändern. + +Elementary +^^^^^^^^^^ +Elementary ist ein Toolkit zum Schreiben von einfachen Anwendungen, das die +Arbeit des Programmierers möglichst einfach und trotzdem flexibel gestalten +soll. + +Emotion +^^^^^^^ +Emotion ist eine Bibliothek die Multimedia-Funktionen zur Verfügung stellt. Sie +unterstützt libxine 1.0 und gstreamer 0.10 und kann problemlos in die anderen +EFL-Bibliotheken integriert werden. Alle Media-Formate die von libxine oder +gstreamer unterstützt werden können auch mit Emotion verwendet werden. + +image::img/diagram-efl-simple-small.png[scaledwidth="35%"] diff --git a/doc/asciidoc/task.txt b/doc/asciidoc/task.txt index 1977bd0..41b3b7a 100644 --- a/doc/asciidoc/task.txt +++ b/doc/asciidoc/task.txt @@ -39,4 +39,6 @@ image::yalp_efl_gui.png[] * neue, portable und schlanke GUI für YALP * Anbindung an vorhandenen CORBA-Server +<<< +include::efl.txt[] -- cgit v1.2.3 From 8d3aa692332e4cb3a8e20e8470e64cc11c7537ed Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Thu, 11 Feb 2010 20:27:20 +0100 Subject: Modified Corba Example - doesn't work :-( Signed-off-by: Nicole Vreden --- .../EflClient/corba_example_mod/client.py | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 src/YalpClients/EflClient/corba_example_mod/client.py diff --git a/src/YalpClients/EflClient/corba_example_mod/client.py b/src/YalpClients/EflClient/corba_example_mod/client.py new file mode 100755 index 0000000..3939110 --- /dev/null +++ b/src/YalpClients/EflClient/corba_example_mod/client.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +import sys +from omniORB import CORBA +import YalpInterfaces, CosNaming, YalpInterfaces__POA + +orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) + +obj = orb.resolve_initial_references("NameService") +root_context = obj._narrow(CosNaming.NamingContext) + +if root_context is None: + print "Failed to narrow the root naming context" + sys.exit(1) + +name = CosNaming.NameComponent("Yalp_Server") + +try: + obj = root_context.resolve(name) + +except CosNaming.NamingContext.NotFound, ex: + print "Name not found" + sys.exit(1) + +blubb = obj._narrow(YalpInterfaces.ServerControlInterface) + +if blubb is None: + print "obj ref is not an dbsfeditf::dependency" + sys.exit(1) + +#pkg = HuhuItf.Package("e17-data","0.16.999.063-1","now","amd64"); +mlist = [] +mlist = YalpInterfaces.MediaTypes.VIDEO +deps = ServerControlInterface.search("huhu", mlist, results, error) + +for dep in deps: + print dep.name, dep.version -- cgit v1.2.3 From fcae9473de2794a5c1b6b95134061c1de03c2114 Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Fri, 12 Feb 2010 22:59:46 +0100 Subject: Corba-Example: it works :-) Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/corba_example_mod/client.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/YalpClients/EflClient/corba_example_mod/client.py b/src/YalpClients/EflClient/corba_example_mod/client.py index 3939110..ea32ab2 100755 --- a/src/YalpClients/EflClient/corba_example_mod/client.py +++ b/src/YalpClients/EflClient/corba_example_mod/client.py @@ -7,19 +7,19 @@ import YalpInterfaces, CosNaming, YalpInterfaces__POA orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) obj = orb.resolve_initial_references("NameService") -root_context = obj._narrow(CosNaming.NamingContext) +root_context = obj._narrow(CosNaming.NamingContextExt) if root_context is None: print "Failed to narrow the root naming context" sys.exit(1) -name = CosNaming.NameComponent("Yalp_Server") +name = ("YALP_Server") try: - obj = root_context.resolve(name) + obj = root_context.resolve_str(name) except CosNaming.NamingContext.NotFound, ex: - print "Name not found" + print "Name not found", ex sys.exit(1) blubb = obj._narrow(YalpInterfaces.ServerControlInterface) @@ -30,8 +30,10 @@ if blubb is None: #pkg = HuhuItf.Package("e17-data","0.16.999.063-1","now","amd64"); mlist = [] -mlist = YalpInterfaces.MediaTypes.VIDEO -deps = ServerControlInterface.search("huhu", mlist, results, error) +mlist.append (YalpInterfaces.VIDEO) +mlist.append (YalpInterfaces.SOUND) +deps = blubb.search("huhu", mlist) +print deps for dep in deps: print dep.name, dep.version -- cgit v1.2.3 From 88049d71009db7e426dfdd0e5326f26458c24168 Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Fri, 12 Feb 2010 23:02:37 +0100 Subject: Build.xml: use shell script for idlj wrapper Signed-off-by: Nicole Vreden --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 61a9fcc..fa12e0c 100644 --- a/build.xml +++ b/build.xml @@ -30,7 +30,7 @@ - + -- cgit v1.2.3 From 8be46adff153827be946f6c82f634cdac736f8c1 Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Fri, 12 Feb 2010 23:03:37 +0100 Subject: Yalp-Documentation: Chapter EFL Signed-off-by: Nicole Vreden --- doc/asciidoc/efl.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/asciidoc/efl.txt b/doc/asciidoc/efl.txt index a92b306..0d0487b 100644 --- a/doc/asciidoc/efl.txt +++ b/doc/asciidoc/efl.txt @@ -1,14 +1,19 @@ Enlightenment Foundation Libraries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Die Enlightenment Foundation Libraries sind eine Sammlung von Bibliotheken die +ursprünglich entwickelt wurden um den DR17 Window Manager zu unterstützen. +Diese Bibliotheken sind jedoch so mächtig, flexibel und einfach zu benutzen, +dass sie eine gute Plattform zur Entwicklung vieler graphischer Anwendungen +darstellen. Hier einige der wichtigsten Bibliotheken: Evas ^^^^ Evas ist eine Canvas-API zur Erstellung und Verwaltung von Anzeige-Objekten und deren Eigenschaften. Objekte können einfach angelegt und manipuliert werden. -Alle Grafik-Routinen sind hoch optimiert und Evas kümmert sich automatisch -darum, Änderungen in der Anzeige mit möglichst wenig Aufwand neu zu zeichnen. +Alle Grafik-Routinen sind hoch optimiert und Evas kümmert sich automatisch +darum, Änderungen in der Anzeige mit möglichst wenig Aufwand neu zu zeichnen. Evas ist klein und schlank und wurde entworfen um sowohl auf Embedded-Systemen -als auch auf leistungsstarken PCs zu arbeiten. +als auch auf leistungsstarken PCs zu arbeiten. Ecore.Evas ^^^^^^^^^^ @@ -22,7 +27,7 @@ Verhaltenslogik trennt. In einem .edj-File wird das Layout beschrieben. Die einzelnen Anzeige-Elemente werden als "parts" definiert, mehrere zusammengehörige Elemente bilden eine "Collection". Außerdem kann in einer Programmliste definiert werden, wie sich die Darstellung der Elemente bei -bestimmten Events (Mausklick, Tastatureingabe) ändert. +bestimmten Events (Mausklick, Tastatureingabe) ändert. Wird dieses Edje-File in ein Python-Programm eingebunden kann auf die Edje-Parts und Collections zugegriffen werden um komplexere Verhaltensweisen zu implementieren. -- cgit v1.2.3 From 5a0d4895d0da4d2726a3f6005f916050319cc394 Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Fri, 12 Feb 2010 23:05:01 +0100 Subject: PGSQLAuth: resolve merge conflict Signed-off-by: Nicole Vreden --- src/YalpAuth/YalpPGSqlAuth/YalpPGSqlAuth.java | 36 --------------------------- 1 file changed, 36 deletions(-) diff --git a/src/YalpAuth/YalpPGSqlAuth/YalpPGSqlAuth.java b/src/YalpAuth/YalpPGSqlAuth/YalpPGSqlAuth.java index 1bc4b45..d497c3d 100644 --- a/src/YalpAuth/YalpPGSqlAuth/YalpPGSqlAuth.java +++ b/src/YalpAuth/YalpPGSqlAuth/YalpPGSqlAuth.java @@ -1,38 +1,3 @@ -<<<<<<< HEAD -/* - * Copyright (c) 2006 Manuel Traut and Volker Dahnke - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: Manuel Traut and Volker Dahnke - */ -package YalpAuth.YalpPGSqlAuth; - -import YalpInterfaces.*; - -/* - * Class YalpPGSqlAuth - * - * Implements functionality of the DBConnectionInterface - * - * @author Volker Dahnke / Manuel Traut - * - * @version 1 02-04-2006
- */ - -public class YalpPGSqlAuth { - private YalpAuthPluginImpl con; - private DatabaseDefines config; - - public static void main(String[] args) - { - System.out.println("YalpPGSqlAuth\n"); - PGSqlAuth auth = new PGSqlAuth(args); - } -} -======= /* * Copyright (c) 2006 Manuel Traut and Volker Dahnke * All rights reserved. This program and the accompanying materials @@ -66,4 +31,3 @@ public class YalpPGSqlAuth { PGSqlAuth auth = new PGSqlAuth(args); } } ->>>>>>> b794b9e... startup: cleanup startup scripts -- cgit v1.2.3 From a73df5adcc4b6e03f620399efd99c21583aa4e0d Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Fri, 12 Feb 2010 23:08:01 +0100 Subject: Copy files to OpenMoko Signed-off-by: Nicole Vreden --- deploy_om.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 deploy_om.sh diff --git a/deploy_om.sh b/deploy_om.sh new file mode 100755 index 0000000..5549678 --- /dev/null +++ b/deploy_om.sh @@ -0,0 +1,4 @@ +sudo ifconfig eth1 192.168.0.200 +scp -r src/YalpClients/EflClient root@192.168.0.202:~ +ssh root@192.168.0.202 +/home/root/EflClient/start_om.sh -- cgit v1.2.3 From 7d950d9fe53ca13cc9f851e0663f31a5cbed45cb Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Fri, 12 Feb 2010 23:09:50 +0100 Subject: EFL-Diagram Signed-off-by: Nicole Vreden --- doc/img/diagram-efl-simple-small.png | Bin 0 -> 26170 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/img/diagram-efl-simple-small.png diff --git a/doc/img/diagram-efl-simple-small.png b/doc/img/diagram-efl-simple-small.png new file mode 100644 index 0000000..59168b4 Binary files /dev/null and b/doc/img/diagram-efl-simple-small.png differ -- cgit v1.2.3 From 68f0a49dc0e1b78ae082f90fcc9192f561c6466e Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Fri, 12 Feb 2010 23:12:04 +0100 Subject: Starts client.py with correct parameters Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/corba_example_mod/client.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 src/YalpClients/EflClient/corba_example_mod/client.sh diff --git a/src/YalpClients/EflClient/corba_example_mod/client.sh b/src/YalpClients/EflClient/corba_example_mod/client.sh new file mode 100755 index 0000000..c88cb1c --- /dev/null +++ b/src/YalpClients/EflClient/corba_example_mod/client.sh @@ -0,0 +1,2 @@ +#!/bin/bash +python2.5 ./client.py -ORBInitRef NameService=corbaloc:iiop:192.168.178.20:1050/NameService -- cgit v1.2.3 From caa647e9c95351d76c92a894193dbbe1d4d0954b Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Fri, 12 Feb 2010 23:20:10 +0100 Subject: Yalp-DB Backup Signed-off-by: Nicole Vreden --- src/YalpInputs/YalpPGSqlInput/db-design-sql.backup | Bin 8039 -> 10771 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/YalpInputs/YalpPGSqlInput/db-design-sql.backup b/src/YalpInputs/YalpPGSqlInput/db-design-sql.backup index d6b273d..941e6a7 100644 Binary files a/src/YalpInputs/YalpPGSqlInput/db-design-sql.backup and b/src/YalpInputs/YalpPGSqlInput/db-design-sql.backup differ -- cgit v1.2.3 From 65eee8eacb08fe6c2aa08a8cd87fce4aa2034d9b Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Sun, 14 Feb 2010 23:09:07 +0100 Subject: Python-EFL-GUI: added Streaming Functions - prepared files for streaming - changed medialist to dynamic list Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/main.py | 8 ++++---- src/YalpClients/EflClient/medialist.py | 34 ++++++++------------------------ src/YalpClients/EflClient/playlist.py | 9 +++++++-- src/YalpClients/EflClient/searchframe.py | 6 +++++- 4 files changed, 24 insertions(+), 33 deletions(-) diff --git a/src/YalpClients/EflClient/main.py b/src/YalpClients/EflClient/main.py index 790e49d..dadbc53 100755 --- a/src/YalpClients/EflClient/main.py +++ b/src/YalpClients/EflClient/main.py @@ -13,6 +13,7 @@ import elementary import searchframe import medialist import playlist +import YalpInterfaces def destroy(obj, event, data): print "Bye bye" @@ -27,14 +28,13 @@ def gui(): win.autodel_set(True) #win.destroy = destroy - vid = emotion.Emotion(win.canvas,module_filename="xine"); + #vid = emotion.Emotion(win.canvas,module_filename="xine"); edje_file = os.path.join(os.path.dirname(sys.argv[0]),"yalp_gui.edj") c = edje.Edje(win.canvas, file=edje_file, group = "yalp") - m = medialist.Medias(win, c) s = searchframe.Search(win, c) - video = playlist.Selection(win, c, vid) + + #video = playlist.Selection(win, c, vid) - m.fill_medialist(win, c) c.show() win.resize(800,600) win.show() diff --git a/src/YalpClients/EflClient/medialist.py b/src/YalpClients/EflClient/medialist.py index c3a3e70..13132d2 100644 --- a/src/YalpClients/EflClient/medialist.py +++ b/src/YalpClients/EflClient/medialist.py @@ -14,34 +14,16 @@ class Medias(object): self.win = win self.c = c self.add_button() - - def huhu(self, obj, str, x): - print "guck guck" + self.medialist = elementary.List(self.win); + self.medialist.size_hint_weight_set(1.0, 1.0) + self.medialist.size_hint_align_set(-1.0, -1.0) + self.c.part_swallow("medialist", self.medialist) - def fill_medialist(self, win, c): - items = [("huhu", self.huhu), - ("haha", self.huhu), - ("hoho", self.huhu), - ("hehe", self.huhu), - ("hihi", self.huhu), - ("12345", self.huhu), - ("abcde", self.huhu), - ("fghij", self.huhu), - ("klmno", self.huhu), - ("pqrst", self.huhu), - ("uvwxyz", self.huhu)] + def add_media(self, media): + self.medialist.item_append(media.result.name, None, None, media.callback) + self.medialist.show() + self.medialist.go() - medialist = elementary.List(win); - medialist.size_hint_weight_set(1.0, 1.0) - medialist.size_hint_align_set(-1.0, -1.0) - c.part_swallow("medialist", medialist) - - for item in items: - #print item[0] - medialist.item_append(item[0], None, None, item[1]) - - medialist.show() - medialist.go() def add_button(self): addbutton = elementary.Button(self.win) diff --git a/src/YalpClients/EflClient/playlist.py b/src/YalpClients/EflClient/playlist.py index 69f3ba3..7352a67 100644 --- a/src/YalpClients/EflClient/playlist.py +++ b/src/YalpClients/EflClient/playlist.py @@ -9,12 +9,15 @@ import emotion import evas import elementary +import media + class Selection(object): - def __init__(self, win, c, vid): + def __init__(self, win, c, vid, stream): self.win = win self.c = c self.vid = vid self.add_button() + self.stream = stream def fill_playlist(self, obj, str, x): playlist = elementary.List(self.win); @@ -34,7 +37,9 @@ class Selection(object): def play_video(self): #vid = emotion.Emotion(win.canvas,module_filename="xine"); - self.vid.file_set("Lordi.mpg"); + print self.stream + #self.vid.file_set("Lordi.mpg"); + self.vid.file_set(self.stream); self.c.part_swallow("video", self.vid) self.vid.show() self.vid.play = True diff --git a/src/YalpClients/EflClient/searchframe.py b/src/YalpClients/EflClient/searchframe.py index 79e3fc6..8f97923 100644 --- a/src/YalpClients/EflClient/searchframe.py +++ b/src/YalpClients/EflClient/searchframe.py @@ -9,6 +9,8 @@ import emotion import evas import elementary +import client + class Search(object): def __init__(self, win, c): self.win = win @@ -18,9 +20,11 @@ class Search(object): c.signal_callback_add("mouse,clicked,1","find_buttonframe", self.findbutton_clicked) def findbutton_clicked(self, obj, signal,source): - print "Huhu" searchentry = textfield.entry_get() print searchentry + co = client.Corba(self.win, self.c) + co.corba_search(searchentry) + def add_button(self): findbutton = elementary.Button(self.win) -- cgit v1.2.3 From 10d162383b94150f779fd0caa32feb0b6862a98d Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Sun, 14 Feb 2010 23:13:46 +0100 Subject: Python-EFL-GUI: new class Media - added class Media for streaming functions Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/media.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/YalpClients/EflClient/media.py diff --git a/src/YalpClients/EflClient/media.py b/src/YalpClients/EflClient/media.py new file mode 100644 index 0000000..461527b --- /dev/null +++ b/src/YalpClients/EflClient/media.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +import socket +import emotion +import playlist +import YalpInterfaces, CosNaming, YalpInterfaces__POA + +class Media(object): + def __init__(self, result, servercon, win, c): + self.result = result + self.servercon = servercon + self.win = win + self.c = c + + def callback(self, obj, str): + songlist = [] + songlist.append(self.result) + ip = socket.gethostbyname(socket.gethostname()) + + info = YalpInterfaces.AccessInfo("huhu", "huhu", "xine", "openmoko", + YalpInterfaces.STREAM) + stream = YalpInterfaces.Output(0, info, songlist, YalpInterfaces.CREATE, ip) + ret = self.servercon.control(stream) + startstream = YalpInterfaces.Output(0,stream, songlist, + YalpInterfaces.START, ip) + print startstream + vid = emotion.Emotion(self.win.canvas,module_filename="xine") + #video = playlist.Selection(self.win, self.c, vid, startstream) + video = playlist.Selection(self.win, self.c, vid, startstream) -- cgit v1.2.3 From ad02c51bac783b8e4e1c1dbc72c84f8c5f24e4ba Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 17 Feb 2010 22:21:09 +0100 Subject: Correction of if-condition for openmoko Signed-off-by: Nicole Vreden --- src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java b/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java index 2165035..f7a8d6c 100644 --- a/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java +++ b/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java @@ -240,7 +240,7 @@ public class YalpOutputPluginImpl extends OutputPluginInterfacePOA { String comp, control; - if (howtoStream.info.params.value() == "openmoko") + if (howtoStream.info.params == "openmoko") { comp = "#transcode{vcodec=DIV3,vb=256,scale=1,"; comp += "acodec=mpga,ab=192,channels=2}"; -- cgit v1.2.3 From 3c9e638fb02ac69a06583746b687cb17cbfe9bad Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 17 Feb 2010 22:22:15 +0100 Subject: Creating YalpInterfaces.Output Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/media.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/YalpClients/EflClient/media.py b/src/YalpClients/EflClient/media.py index 461527b..41b4d5d 100644 --- a/src/YalpClients/EflClient/media.py +++ b/src/YalpClients/EflClient/media.py @@ -3,6 +3,7 @@ import socket import emotion import playlist import YalpInterfaces, CosNaming, YalpInterfaces__POA +import evas.c_evas class Media(object): def __init__(self, result, servercon, win, c): @@ -22,7 +23,9 @@ class Media(object): ret = self.servercon.control(stream) startstream = YalpInterfaces.Output(0,stream, songlist, YalpInterfaces.START, ip) - print startstream - vid = emotion.Emotion(self.win.canvas,module_filename="xine") + #print startstream + #print "result:", self.result + print "Startstream.Info:", startstream.info + vid = emotion.Emotion(self.win.canvas,module_filename="gstreamer") #video = playlist.Selection(self.win, self.c, vid, startstream) video = playlist.Selection(self.win, self.c, vid, startstream) -- cgit v1.2.3 From c0d9a5ffe4552bccd55b0ed239890ee8663cbf4d Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 17 Feb 2010 22:23:11 +0100 Subject: File_set: Stream Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/playlist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/YalpClients/EflClient/playlist.py b/src/YalpClients/EflClient/playlist.py index 7352a67..07354cf 100644 --- a/src/YalpClients/EflClient/playlist.py +++ b/src/YalpClients/EflClient/playlist.py @@ -39,6 +39,8 @@ class Selection(object): #vid = emotion.Emotion(win.canvas,module_filename="xine"); print self.stream #self.vid.file_set("Lordi.mpg"); + ip = self.stream[0][0].destIp + print ip self.vid.file_set(self.stream); self.c.part_swallow("video", self.vid) self.vid.show() -- cgit v1.2.3 From ba6a16cbe90b9c7256add53d86e4f56cc3a94fdb Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 17 Feb 2010 22:32:04 +0100 Subject: Start-Script Python-EFL-Client Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/client.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 src/YalpClients/EflClient/client.sh diff --git a/src/YalpClients/EflClient/client.sh b/src/YalpClients/EflClient/client.sh new file mode 100755 index 0000000..6608bd1 --- /dev/null +++ b/src/YalpClients/EflClient/client.sh @@ -0,0 +1,2 @@ +#!/bin/bash +python2.5 ./main.py -ORBInitRef NameService=corbaloc:iiop:192.168.178.20:1050/NameService -- cgit v1.2.3 From 14939708a3c2e82d8a0216e09b2c7258ac3aabb8 Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Wed, 17 Feb 2010 22:40:40 +0100 Subject: fix build.xml and start scripts Signed-off-by: Manuel Traut --- build.xml | 2 +- efl-gui.sh | 4 ++++ src/YalpClients/EflClient/client.sh | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100755 efl-gui.sh delete mode 100755 src/YalpClients/EflClient/client.sh diff --git a/build.xml b/build.xml index fa12e0c..a4876fb 100644 --- a/build.xml +++ b/build.xml @@ -30,7 +30,7 @@ - + diff --git a/efl-gui.sh b/efl-gui.sh new file mode 100755 index 0000000..d5cfdf9 --- /dev/null +++ b/efl-gui.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd src/YalpClients/EflClient +python2.5 ./main.py -ORBInitRef NameService=corbaloc:iiop:localhost:1050/NameService +cd - diff --git a/src/YalpClients/EflClient/client.sh b/src/YalpClients/EflClient/client.sh deleted file mode 100755 index 6608bd1..0000000 --- a/src/YalpClients/EflClient/client.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -python2.5 ./main.py -ORBInitRef NameService=corbaloc:iiop:192.168.178.20:1050/NameService -- cgit v1.2.3 From a044f397ab93e0337c59b97ef7d3f6a9f7e7a135 Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 17 Feb 2010 22:43:45 +0100 Subject: Corba_Search --- src/YalpClients/EflClient/client.py | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 src/YalpClients/EflClient/client.py diff --git a/src/YalpClients/EflClient/client.py b/src/YalpClients/EflClient/client.py new file mode 100755 index 0000000..073e6e2 --- /dev/null +++ b/src/YalpClients/EflClient/client.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python + +import sys +from omniORB import CORBA +import YalpInterfaces, CosNaming, YalpInterfaces__POA +import medialist +import media + +class Corba(object): + def __init__(self, win, c): + self.win = win + self.c = c + + self.orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) + self.obj = self.orb.resolve_initial_references("NameService") + self.root_context = self.obj._narrow(CosNaming.NamingContextExt) + if self.root_context is None: + print "Failed to narrow the root naming context" + sys.exit(1) + + self.name = ("YALP_Server") + try: + self.obj = self.root_context.resolve_str(self.name) + + except CosNaming.NamingContext.NotFound, ex: + print "Name not found", ex + sys.exit(1) + + self.blubb = self.obj._narrow(YalpInterfaces.ServerControlInterface) + if self.blubb is None: + print "obj ref is not an dbsfeditf::dependency" + sys.exit(1) + + def corba_search(self,searchentry): + mlist = [] + mlist.append (YalpInterfaces.VIDEO) + mlist.append (YalpInterfaces.SOUND) + deps = self.blubb.search(searchentry, mlist) + m = medialist.Medias(self.win, self.c) + print deps[0] + for dep in deps[0]: + current = media.Media(dep, self.blubb, self.win, self.c) + m.add_media(current) + -- cgit v1.2.3 From 642895fb9dcd010272908eecbd438c2abade595a Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Wed, 17 Feb 2010 23:54:18 +0100 Subject: EflClient: Fix Streaming - stream has to be created AND started - Selection Class seems to be very strange. Cleaned it up a little, but could be moved completely into 'Media' Class. Signed-off-by: Manuel Traut --- efl-gui.sh | 2 +- src/YalpClients/EflClient/media.py | 11 +++--- src/YalpClients/EflClient/playlist.py | 41 +++++----------------- .../YalpVlcTelnetOutput/YalpOutputPluginImpl.java | 3 ++ 4 files changed, 16 insertions(+), 41 deletions(-) diff --git a/efl-gui.sh b/efl-gui.sh index d5cfdf9..aa92c43 100755 --- a/efl-gui.sh +++ b/efl-gui.sh @@ -1,4 +1,4 @@ #!/bin/bash cd src/YalpClients/EflClient -python2.5 ./main.py -ORBInitRef NameService=corbaloc:iiop:localhost:1050/NameService +python2.5 ./main.py -ORBInitRef NameService=corbaloc:iiop:192.168.178.20:1050/NameService cd - diff --git a/src/YalpClients/EflClient/media.py b/src/YalpClients/EflClient/media.py index 41b4d5d..daf6d52 100644 --- a/src/YalpClients/EflClient/media.py +++ b/src/YalpClients/EflClient/media.py @@ -21,11 +21,8 @@ class Media(object): YalpInterfaces.STREAM) stream = YalpInterfaces.Output(0, info, songlist, YalpInterfaces.CREATE, ip) ret = self.servercon.control(stream) - startstream = YalpInterfaces.Output(0,stream, songlist, - YalpInterfaces.START, ip) - #print startstream - #print "result:", self.result - print "Startstream.Info:", startstream.info - vid = emotion.Emotion(self.win.canvas,module_filename="gstreamer") + stream.outputAction = YalpInterfaces.START + ret = self.servercon.control(stream) + print "stream.info:", stream.info #video = playlist.Selection(self.win, self.c, vid, startstream) - video = playlist.Selection(self.win, self.c, vid, startstream) + video = playlist.Selection(self.win, self.c, stream) diff --git a/src/YalpClients/EflClient/playlist.py b/src/YalpClients/EflClient/playlist.py index 07354cf..059a04d 100644 --- a/src/YalpClients/EflClient/playlist.py +++ b/src/YalpClients/EflClient/playlist.py @@ -12,45 +12,20 @@ import elementary import media class Selection(object): - def __init__(self, win, c, vid, stream): + def __init__(self, win, c, stream): self.win = win self.c = c - self.vid = vid - self.add_button() + self.vid = emotion.Emotion(win.canvas, module_filename="gstreamer") self.stream = stream - - def fill_playlist(self, obj, str, x): - playlist = elementary.List(self.win); - playlist.size_hint_weight_set(1.0, 1.0) - playlist.size_hint_align_set(-1.0, -1.0) - box1 = elementary.Box(self.win) - self.win.resize_object_add(box1) - self.c.part_swallow("playlist", playlist) - box1.pack_end(playlist) - playlist.show() - playlist.item_append(str, None, None, None) - playlist.go() - box1.show() - - def playbutton_clicked(self, obj, signal, source): - self.play_video() + self.play_video () def play_video(self): - #vid = emotion.Emotion(win.canvas,module_filename="xine"); print self.stream - #self.vid.file_set("Lordi.mpg"); - ip = self.stream[0][0].destIp - print ip - self.vid.file_set(self.stream); + # ip = self.stream[0][0].destIp THIS CHRASHES!!! + ip = "127.0.0.1" + port = 9993 + print "stream from", ip, port + self.vid.file_set("udp://"+ip+":"+str(port)) self.c.part_swallow("video", self.vid) self.vid.show() self.vid.play = True - - def add_button(self): - playbutton = elementary.Button(self.win) - playbutton.label_set("Play") - self.c.part_swallow("playlist_buttonframe", playbutton) - self.c.signal_callback_add("mouse,clicked,1","playlist_buttonframe", - self.playbutton_clicked) - playbutton.show() - diff --git a/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java b/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java index f7a8d6c..88bfbf8 100644 --- a/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java +++ b/src/YalpOutputs/YalpVlcTelnetOutput/YalpOutputPluginImpl.java @@ -267,8 +267,11 @@ public class YalpOutputPluginImpl extends OutputPluginInterfacePOA { TelnetInterface telnet = new TelnetInterface(hostIP, 4212, "admin"); telnet.exec(newString); + logger.debug ("exec1 done: "+newString); telnet.exec(setup2); + logger.debug ("exec2 done: "+setup2); telnet.exec(control); + logger.debug ("exec3 done: "+control); telnet.close(); } -- cgit v1.2.3 From ed22fce7a9f4332037bf0e9fd97a96b1876acba8 Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Thu, 18 Feb 2010 23:16:36 +0100 Subject: Python-EFL-GUI: Bugfixing - Textfield now single-line - tried to hide frames by clicking on media-list-element - tried to draw frame around textfield Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/media.py | 8 ++ src/YalpClients/EflClient/medialist.py | 6 ++ src/YalpClients/EflClient/playlist.py | 5 +- src/YalpClients/EflClient/searchframe.py | 2 + src/YalpClients/EflClient/yalp_gui.edc | 173 ++++++++----------------------- 5 files changed, 62 insertions(+), 132 deletions(-) diff --git a/src/YalpClients/EflClient/media.py b/src/YalpClients/EflClient/media.py index daf6d52..4ab5448 100644 --- a/src/YalpClients/EflClient/media.py +++ b/src/YalpClients/EflClient/media.py @@ -11,12 +11,16 @@ class Media(object): self.servercon = servercon self.win = win self.c = c + #self.c.signal_callback_add("hide_frames", "medialist",self.hide_frames) def callback(self, obj, str): songlist = [] songlist.append(self.result) ip = socket.gethostbyname(socket.gethostname()) + #self.c.signal_callback_add("hide_frames", "medialist",self.hide_frames) + + info = YalpInterfaces.AccessInfo("huhu", "huhu", "xine", "openmoko", YalpInterfaces.STREAM) stream = YalpInterfaces.Output(0, info, songlist, YalpInterfaces.CREATE, ip) @@ -26,3 +30,7 @@ class Media(object): print "stream.info:", stream.info #video = playlist.Selection(self.win, self.c, vid, startstream) video = playlist.Selection(self.win, self.c, stream) + + #def hide_frames(self, obj, signal, source): + #self.c.signal_emit("signal_from_python", "") + diff --git a/src/YalpClients/EflClient/medialist.py b/src/YalpClients/EflClient/medialist.py index 13132d2..ac54a69 100644 --- a/src/YalpClients/EflClient/medialist.py +++ b/src/YalpClients/EflClient/medialist.py @@ -18,6 +18,8 @@ class Medias(object): self.medialist.size_hint_weight_set(1.0, 1.0) self.medialist.size_hint_align_set(-1.0, -1.0) self.c.part_swallow("medialist", self.medialist) + # ???: + self.c.signal_callback_add("hide_frames", self.medialist.item,self.hide_frames) def add_media(self, media): self.medialist.item_append(media.result.name, None, None, media.callback) @@ -30,3 +32,7 @@ class Medias(object): addbutton.label_set("Add to Playlist") self.c.part_swallow("medialist_buttonframe", addbutton) addbutton.show() + + def hide_frames(self, obj, signal, source): + self.c.signal_emit("signal_from_python", "") + diff --git a/src/YalpClients/EflClient/playlist.py b/src/YalpClients/EflClient/playlist.py index 059a04d..242aa76 100644 --- a/src/YalpClients/EflClient/playlist.py +++ b/src/YalpClients/EflClient/playlist.py @@ -18,10 +18,10 @@ class Selection(object): self.vid = emotion.Emotion(win.canvas, module_filename="gstreamer") self.stream = stream self.play_video () - + def play_video(self): print self.stream - # ip = self.stream[0][0].destIp THIS CHRASHES!!! + # ip = self.stream[0][0].destIp THIS CHRASHES!!! -> I know :-) ip = "127.0.0.1" port = 9993 print "stream from", ip, port @@ -29,3 +29,4 @@ class Selection(object): self.c.part_swallow("video", self.vid) self.vid.show() self.vid.play = True + diff --git a/src/YalpClients/EflClient/searchframe.py b/src/YalpClients/EflClient/searchframe.py index 8f97923..574315a 100644 --- a/src/YalpClients/EflClient/searchframe.py +++ b/src/YalpClients/EflClient/searchframe.py @@ -35,6 +35,8 @@ class Search(object): def searchfield(self): global textfield textfield = elementary.Entry(self.win) + #textfield.color(95,95,95,95) + textfield.single_line_set(True) textfield.entry_set("Enter Title") self.c.part_swallow("searcharea", textfield) textfield.editable_set(True) diff --git a/src/YalpClients/EflClient/yalp_gui.edc b/src/YalpClients/EflClient/yalp_gui.edc index eb76edc..24c593f 100644 --- a/src/YalpClients/EflClient/yalp_gui.edc +++ b/src/YalpClients/EflClient/yalp_gui.edc @@ -1,12 +1,3 @@ -styles -{ - style - { - name: "searchfield_style"; - base: "font=Edje-Vera font_size=12 valign=bottom color=#000 wrap=word"; - } -} - collections { group @@ -19,7 +10,7 @@ collections { name: "main"; type: RECT; - mouse_events: 0; + mouse_events: 1; description { state: "default" 0.0; @@ -40,6 +31,7 @@ collections { name: "video"; type: SWALLOW; + mouse_events: 1; description { state: "default" 0.0; aspect: 1.7 1.8; @@ -138,118 +130,7 @@ collections } } } - - part - { - name: "playlist_buttonframe"; - type: SWALLOW; - mouse_events: 1; - description - { - state: "default" 0.0; - align: 0 0; - color: 30 89 114 150; - rel1 - { - relative: 0.66 0.85; - } - rel2 - { - relative: 0.86 0.9; - } - } - description - { - state: "default" 1.0; - align: 0 0; - color: 0 0 0 0; - rel1 - { - relative: 1.0 0.85; - } - rel2 - { - relative: 1.0 0.9; - } - } - } - part - { - name: "playlist"; - type: SWALLOW; - mouse_events: 1; - description - { - state: "default" 0.0; - align: 0 0; - color: 30 89 114 150; - rel1 - { - relative: 0.51 0.2; - offset: 0 0; - } - rel2 - { - relative: 1.0 0.8; - offset: 0 0; - } - } - description - { - state: "default" 1.0; - align: 0 0; - color: 0 0 0 0; - rel1 - { - relative: 1.0 0.01; - offset: 0 0; - } - rel2 - { - relative: 1.0 0.8; - offset: 0 0; - } - } - } - - part - { - name: "controlframe"; - type: RECT; - mouse_events: 1; - - description - { - state: "default" 0.0; - align: 0 0; - color: 30 89 114 175; - - rel1 - { - relative: 0.0 0.97; - offset: 0 0; - } - rel2 - { - relative: 1.0 1.0; - offset: 0 0; - } - } - description - { - state: "default" 1.0; - color: 30 89 114 175; - rel1 - { - relative: 0.0 0.8; - } - rel2 - { - relative: 1.0 1.0; - } - } - } part { name: "find_buttonframe"; @@ -275,7 +156,7 @@ collections description { state: "default" 1.0; - color: 0 0 0 0; + color: 211 168 234 255; rel1 { relative: 0.8 0.0; @@ -288,7 +169,7 @@ collections } } } - + /* part { name: "medialist_buttonframe"; @@ -324,6 +205,8 @@ collections } } + */ + part { name: "searcharea"; @@ -332,7 +215,7 @@ collections description { state: "default" 0.0; - color: 255 255 255 255; + color: 0 0 0 0; rel1 { relative: 0.15 0.07; @@ -360,22 +243,52 @@ collections } programs { + /* program { name: "hide_searchframe"; - source: "playlist_buttonframe"; + source: "medialist"; signal: "mouse,clicked,1"; action: STATE_SET "default" 1.0; - // target: "searchframe"; - target: "medialist_buttonframe"; - target: "playlist_buttonframe"; + target: "searchframe"; target: "find_buttonframe"; target: "medialist"; - target: "playlist"; target: "searcharea"; - target: "controlframe"; transition:SINUSOIDAL 1; } + program + { + name: "show_frames"; + //source: "video"; + source: "main"; + signal: "mouse,clicked,1"; + action: STATE_SET "default" 0.0; + target: "find_buttonframe"; + target: "medialist"; + target: "searcharea"; + transition:SINUSOIDAL 1; + } + */ + program + { + name: "button_clicked_signal_program"; + signal: "mouse,clicked,1"; + source: "medialist"; + + action: SIGNAL_EMIT "hide_frames" "medialist"; + } + + program + { + name: "handle_python_signal_hide"; + signal: "signal_from_python"; + + action: STATE_SET "default" 1.0; + target: "searchframe"; + target: "find_buttonframe"; + target: "medialist"; + target: "searcharea"; + } } } } -- cgit v1.2.3