summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Traut <manut@linutronix.de>2010-02-07 12:49:28 +0100
committerManuel Traut <manut@linutronix.de>2010-02-07 12:49:28 +0100
commit69c9ac9f7f8d987a2492012460a830fee7cb4915 (patch)
treef1b585cb27ebf65dcdc8cb08e8cb6f3ebd7e409e
parentd72c14135730aaa9efe643ee99c4de98732fbde1 (diff)
parent927d9f24a2d9560d5cc58945008f8f092c8321ce (diff)
Merge branch 'damba' of ssh://mecka.net/home/git/yalp into damba
-rw-r--r--ServerSettings.xml12
-rwxr-xr-xserver.sh4
-rwxr-xr-xsrc/YalpClients/EflClient/corba_example/client.py36
-rwxr-xr-xsrc/YalpClients/EflClient/corba_example/client.sh2
-rw-r--r--src/YalpClients/EflClient/corba_example/huhu.idl22
-rwxr-xr-xsrc/YalpClients/EflClient/corba_example/python_idl.sh2
-rwxr-xr-xsrc/YalpClients/EflClient/corba_example/server.py63
-rwxr-xr-xsrc/YalpClients/EflClient/corba_example/server.sh5
-rwxr-xr-xsrc/YalpClients/EflClient/main.py2
-rw-r--r--src/YalpClients/EflClient/searchframe.py14
-rw-r--r--src/YalpClients/EflClient/yalp_gui.edc31
11 files changed, 168 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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<java version="1.6.0_17" class="java.beans.XMLDecoder">
- <string>jdbc:postgresql://localhost:5432/yalp</string>
- <string>huhu</string>
- <string>yalp</string>
-</java>
+<?xml version="1.0" encoding="UTF-8"?>
+<java version="1.6.0_0" class="java.beans.XMLDecoder">
+ <string>jdbc:postgresql://localhost:5432/yalp</string>
+ <string>huhu</string>
+ <string>yalp</string>
+</java>
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/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> 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
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;
}