calendar backend, CMulticalendar and importIcsFileData
Hello. I am trying to understand how the calendar api works: http://maemo.org/api_refs/5.0/beta/calendar-backend/ I have several ical calendar exported from zimbra that i wish to import in a calendar on the n900. I manage to make something that seems to work (see attachement), but i realise i have a problem with at least one entry. In the zimbra ical output, the event starts the 17 of december at 10am GMY and ends at 11 am GMT. DTSTART;TZID=(GMT) Greenwich Mean Time - Dublin / Edinburgh / Lisbon / Lond on:20091217T10 DTEND;TZID=(GMT) Greenwich Mean Time - Dublin / Edinburgh / Lisbon / London :20091217T11 I am based in France (GMT+1). If i look in this event once imported in the calendar, it is schedule for the 17 december, from 10am to 11 am instead of 11am to 12am. The events that were set on GMT+1 (as the following, wich is supposed to take place an hour before the previous one) are correctly set once imported. DTSTART;TZID=(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna:20091217T10 DTEND;TZID=(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna:20091217T11 Am i doing something wrong (like forgetting some option about timezone settings), or is this a bug i should open on bugzilla.maemo.org ? Aside from this, has anybody idea what is the difference between CMulticalendar::importIcsFileData and CMulticalendar::importIcsFileDataProgressive ? #include CMulticalendar.h #include CalendarErrors.h #include iostream #include vector int get_target_cal_id(CMulticalendar *multical, std::string calname){ CCalendar *curcal; std::vector CCalendar * calvec = multical-getListCalFromMc (); int out=0; for ( size_t j = 0, size = calvec.size(); j size; ++j ) { curcal=calvec[j]; if (curcal-getCalendarName () == calname){ out=curcal-getCalendarId (); } } multical-releaseListCalendars(calvec); return out; } int create_cal(CMulticalendar *multical,std::string calname){ cout Creating calendar calname\n; CCalendar *newcal; int perror; newcal=multical-addCalendar( calname, COLOUR_RED, 0, 1, (CalendarType) 0, whot, whot, perror ); if(newcal==NULL) { cout Problem creating a new calendar: perror\n; exit(0); } return newcal-getCalendarId(); } int import_ical(CMulticalendar *multical,std::string filename,int cal_id) { cout importing filename to cal cal_id\n; std::string eventid; int iDuplicateCountTask; int iDuplicateCountEvent; int iDuplicateCountJournal; int perror; multical-importIcsFileData( filename, cal_id, eventid, iDuplicateCountTask, iDuplicateCountEvent, iDuplicateCountJournal, perror ); coutperror=perror\n; coutdup task=iDuplicateCountTask\n; coutdup evnt=iDuplicateCountEvent\n; coutdup journal=iDuplicateCountJournal\n; return 0; } int main(int argc, char *argv[]) { int target_id; CCalendar * target_cal; int perror; CMulticalendar *multical = CMulticalendar::MCInstance (); std::string target_name=tam calendar; std::string ical_pamadio=/home/user/dev/calendar/pamadio.ical; std::string ical_tam=/home/user/dev/calendar/gss.ical; std::string ical_gss=/home/user/dev/calendar/tam.ical; target_id=get_target_cal_id(multical,target_name); if(target_id==0) { cout No initial calendar: target_name\n; } else { if (not multical-deleteCalendar(target_id,perror)) { cout Problem deleting calendar error code= perror \n; exit(1); } cout Deleting existing calendar target_name\n; } target_id=create_cal(multical,target_name); cout target_id=target_id\n; import_ical(multical,ical_pamadio,target_id); import_ical(multical,ical_tam,target_id); import_ical(multical,ical_gss,target_id); target_cal=multical-getCalendarById(target_id,perror); if(perror!=CALENDAR_OPERATION_SUCCESSFUL){ cout Error getting calendar by id. error=perror id=target_id\n; exit(1); } free(target_cal); } ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Needing help with dead unit.
Hi there. On Wed, Oct 29, 2008 at 09:00:20AM -0700, Tim Ashman wrote: On Wednesday 29 October 2008 08:30:51 am Ryan Abel wrote: Did you go to the correct page for your unit? I did, not only that when I was on the phone with tech support I asked him to check my ID number and he told me it was invalid... But offered no way and I asked how I could straighten this out. he asked me where I purchased it, I offered to send him a jpg of the unit showing the sticker, etc. Nothing not interested in really helping me. The clock issue seems to be known: http://www.internettablettalk.com/forums/showthread.php?t=14362 Your wrong ID number is really puzzling though. If i remember correctly your ID is the mac address of your tablet network interface (without the :). You can get this value by launching /sbin/ifconfig on a terminal when the wifi network is available. look for a similar line: wlan0 Link encap:Ethernet HWaddr 00:1D:6E:11:11:11 In this case, the id number would be 001D6E11 Be sure you try to download a n810 firmware with a n810 mac address, or a n800 firmware with a n800 mac address. Good luck. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Maemo-mapper vector data backend follow-up
Hola ! I have been looking at pyrender and did try recently to have a on the fly vector map rendering in python. It was so slow i decided to use pre made tiles instead. I also used most part of pyroute to try to make off line route calculation: http://sayhoo.garage.maemo.org/ It works but it eats too much memory. Right now, i download data from osm, feed a sqlite database, and then generate pickled python object that can be loaded faster than having to recompute the graph from scratch. I'm currently thinking about rewriting all graph related code in C, just to see how much ram would it save. I also dont know how one could represent big enough a route to connect 2 foreign city (but, as i do not own a car, this is only a theoretical problem :-) ) ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Maemo-mapper vector data backend follow-up
Hi there ! On Tue, Sep 23, 2008 at 02:13:34PM +0100, Simon Pickering wrote: http://sayhoo.garage.maemo.org/ It works but it eats too much memory. Thanks, I'll take a look at that - is it because it stores the data in memory rather than using a db? It stores the data in memory (to be able to find a route) _and_ it uses a database (to find tags information such as way names and bike station). I hope the memory usage could be lowered if everything that is map related was done in C (this is what i plan to test next). Navit is supposed to be able to do general routing (beyond a single city which is stated as a limitation of Pyroute due to memory reqs. I did not hear from navit untill now. It looks really cool. I think i ll have a closer look at that (once i ll realise the current approach i have is not good, i really want to see how much memory i could save if sayhoo graph and routing were in C :-) ) see http://almien.co.uk/OSM/Routing/), so looking at/transplanting that code might be a starting point (and it does rendering too). Those graphs on the link above look cool :) This is pyroute/pyrender (or what it used to be before it was called pyroute/pyrender). It is when i saw this that i decided to give it a try, and ended up using most idea in it to write sayhoo (the main difference being that i wanted to use sqlite and not parse xml all the time). ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Distutils Missing?
On Fri, Jun 27, 2008 at 12:13:22PM +0200, Pavel Rojtberg wrote: Hi, my build always fails with the message: python2.5 setup.py clean Traceback (most recent call last): File setup.py, line 8, in module from distutils.core import setup, Command ImportError: No module named distutils.core make: *** [clean] Error 1 which makes me believe that distutils is not included in the python2.5 package, like it should be. Which leads me to the question, where can I get distutils from? python2.5-dev ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Pushing -dev packages in diablo's extras.
Hi there. I realise diablo is now live, and am trying to upload some packages to the extras-devel repository. It looks like now, the step to follow are: http://extras-cauldron.garage.maemo.org/HOWTO.html#what-to-expect-as-a-result Upload seems to work, compilation too, but for an unkown reason, only the main package are pushed to extras, not the -dev one. https://garage.maemo.org/builder/diablo/clucene-core_0.9.20-1/ I need the clucene-dev for other build, and although it has been generated, it is not available in extras-devel. Any idea what may be wrong ? Thanks. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Problem using swig to compile python module in scratchbox
On Wed, Jun 18, 2008 at 03:11:55PM +0300, Jussi Hakala wrote: Try using SBOX_REDIRECT_IGNORE=/usr/bin/swig and executing swig with explicit path, ie SBOX_REDIRECT_IGNORE=/usr/bin/swig /usr/bin/swig -version Make a substitution such as SWIG = SBOX_REDIRECT_IGNORE=/usr/bin/swig /usr/bin/swig and use $(SWIG) to invoke swig in your makefiles. This is exactly what i was looking for ! Thanks. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Problem using swig to compile python module in scratchbox
Hello. I'm encoutering problem building a python module that used to build ok in scratchbox with previous upstream version and wich is still compiling all i right when i try to do so in a up to date debian Etch box. However, i am not able to compile the latest version in scratchbox (maemo chinook, scratchbox-core 1.0.10, scratchbox-devkit-maemo3 1.0.3 ). The library is sword, http://www.crosswire.org/sword/index.jsp Currently available in garage for maemo, are sword 1.5.10 and python-sword, a packaged python module (coming from the same sources as sword). When compiling the python module for 1.5.10, i had to use an newest version of swig, as it always failed when i used the one available in scratchbox, so I packaged maemoswig to have a freshest version available at the time (1.3.31) Trying the same method with sword 1.5.11 fails in scratchbox. In the Sword/bindings/swig, directory, i create the following setup.py file: __ #! /usr/bin/python2.5 from distutils.core import setup, Extension setup (name = sword, version = 1.5.11, maintainer = Sword Developers, maintainer_email = [EMAIL PROTECTED], url = http://www.crosswire.org/sword;, py_modules = [Sword], include_dirs=['/usr/include/sword'], ext_modules = [Extension(_Sword, [Sword.cxx], libraries=[('sword')], define_macros=[('SWIG',1)])], ) Compiling the module is then done with: export SWIG_LIB=/usr/share/swig/1.3.31 export SWIG_FEATURES=-I/usr/include/sword /usr/bin/swig -python -c++ -shadow -o Sword.cxx -I. -I/usr/include/sword sword.i /usr/bin/python2.5 setup.py build_ext -I. -I/usr/include/sword -L/usr/lib/sword The python2.5 setup.py fails with a lot of error starting with: In file included from Sword.cxx:5850:/usr/bin/python2.5 setup.py build_ext -I. -I/usr/include/sword -L/usr/lib/sword rendercallback.h: At global scope: rendercallback.h:189: error: base `sword::BasicFilterUserData' with only non-default constructor in class without a constructor rendercallback.h:212: error: base `sword::BasicFilterUserData' with only non-default constructor in class without a constructor In file included from Sword.cxx:5911: Sword.h:18: error: `Swig' has not been declared Sword.h:18: error: expected class-name before '{' token Sword.h:64: error: `Swig' has not been declared It looks to me like there is a problem interacting with the scratchbox's swig for several reason: * The Sword.cxx file i get says it has been generated by Version 1.3.29 (scratchox) and not by the 1.3.31 version I installed. * Although /usr/bin/swig is the one i packaged, it still behave as the scratchbox one. It start behaving as expected if i launch it from some where else, and this really puzzle me. [sbox-CHINOOK_X86: ~] ls -l /usr/bin/swig -rwxr-xr-x 1 user user 1112152 Jan 9 20:05 /usr/bin/swig [sbox-CHINOOK_X86: ~] /usr/bin/swig -version SWIG Version 1.3.29 Compiled with g++ [i386-pc-linux-gnu] Please see http://www.swig.org for reporting bugs and further information [sbox-CHINOOK_X86: ~] cp /usr/bin/swig . [sbox-CHINOOK_X86: ~] ./swig -version SWIG Version 1.3.31 Compiled with i486-linux-gnu-g++ [i486-pc-linux-gnu] Please see http://www.swig.org for reporting bugs and further information * The compilation works if i perform it on a debian box Now, just to see, i copied /usr/bin/sword in my local directory and try again to create sword.cxx , but using the ./swig binary. I managed to have a Sword.cxx file that says it has been generated by swig 1.3.31) , but still, the next step fails. /usr/bin/python2.5 setup.py build_ext -I. -I/usr/include/sword -L/usr/lib/sword This time with less errors; and different one: rendercallback.h:189: error: base `sword::BasicFilterUserData' with only non-default constructor in class without a constructor rendercallback.h:212: error: base `sword::BasicFilterUserData' with only non-default constructor in class without a constructor Around those line in the header file are the following comment : // trick SWIG into thinking this is not inherited from an inner class... The trick compile when done under debian, so my guess is that this error may still be due to an interaction with the swig coming from scratchbox. I do not know where to go from there. I would appreciate any idea that would let me 1) be able to compile this module within scratchbox 2) be able to automatise the compilation when building package (ie most probably finding another way than copying /usr/bin/swig somewhere else). Any ideas ? ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: use of Glade for N810
Hi there. On Mon, Jun 09, 2008 at 12:09:13PM +0530, Arvind1 K wrote: Can I use Glade to design my GUI so that it works in the hildon program. I want my application to work by simple tapping by stylus. I have my application written in GTK+, how do I make it work in N810? It should work. See the following url for an example of hildonization of an existing application that use glade. http://maemo.org/development/documentation/how-tos/4-x/maemo_4-0_porting_guide.html If my application works in scratchbox, does it ensure it will work in N810? I think it does Good luck. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: PyGTK/Hildon: CLOSING CHILD WINDOW PROPERLY?
Hi there. On Tue, Feb 19, 2008 at 09:49:12AM -0600, Darren Enns wrote: window2.connect(destroy, gtk.main_quit) It looks to me like gtk.main_quit() will be called each time the window is destroyed, thus killing the all application. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Installing Python2.5-gtk and Python2.5-hildon on the N800
On Tue, Jan 22, 2008 at 02:35:44PM +1100, Devraj Mukherjee wrote: But (there's always a but) it seems that my N800 is missing the GTK and Hildon libraries for Python2.5. I tried to find these packages in Application Manager and they don't seem to exists. Then I tried to use apt-get on the command line and it seems I can't get root access. Any ideas how I can go about installing the Python2.5 support libraries? Thanks a lot for your time. Is the package dependend of python2.5-runtime ? They should have been installed automatically if this is the case. At least, it work here (tm) :-) ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to keep window on top? (python)
Hi there. On Mon, Aug 13, 2007 at 11:46:38AM -0400, Tony Maro wrote: I'm a noob at both Python and GTK so forgive me if this is a silly question. I've got a modal window I'm creating, and I've tried doing set_transient_for but no matter what I've done, it won't stay on top of the base application window. You can easily pick the app window from the taskbar and switch to it, even though it can't get input. If a user does this by accident, it leaves the impression that the program has locked up. Can someone point me in the right direction? Or does busybox not support this? I use something like: self.prefWindow=hildon.Window() self.prefWindow.set_title(Preferences) self.prefWindow.set_modal(True) self.prefWindow.set_transient_for(self.mainWindow) self.prefWindow.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG) Hopes it helps :) ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Python startup desktop icon
Hi there. On Thu, Aug 09, 2007 at 04:54:45PM -0400, Tony Maro wrote: It tells me Starting app in the top right, and the application starts just fine. Then, after about 20 seconds, the app closes. If I launch it without using X-Osso-service, it of course gives no notification that the app is opening, but it opens and stays open. ... ... X-Osso-Service=thummim What happens if you use X-Osso-Service=com.nokia.thummim ? I encoutered a similar problem if i try to use something else than com.nokia (say org.maemo.something). https://bugs.maemo.org/show_bug.cgi?id=1475 I'm a bit lost whenever i envouter a bbus or osso problem... Hope this helps. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: pygtk: hildon.FileChooserDialog and device selection
Hi there. On Mon, May 28, 2007 at 03:24:06PM -0300, Lauro wrote: I wrote a simple C program that uses FileChooserDialog and it doesn't show the memory card too. I think that it's a FileChooserDialog limitation. Indeed. Thinks works better if i use FILE_CHOOSER_ACTION_SELECT_FOLDER though :) Thanks for the feedback. ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
pygtk: hildon.FileChooserDialog and device selection
Hi there. I do not understand how i can tell a hildon.FileChooserDialog to let the user select a directory located on a memory card. Even when i click on the location icon in the filechooserdialog that is shown on the test case, nothing happens altough i have a memory card present. Any idea what i may doing wrong ? #!/usr/bin/python2.5 import gtk import hildon class testcase(hildon.Program): def __init__(self): hildon.Program.__init__(self) self.win=gtk.Window() self.ok_b=gtk.Button(Click me) self.ok_b.connect('clicked',self.get_file) self.win.add(self.ok_b) self.win.show_all() gtk.main() def get_file(self,widget): print yo selector=hildon.FileChooserDialog(\ self.win,gtk.FILE_CHOOSER_ACTION_CREATE_FOLDER) rep=selector.run() selector.hide() a=selector.get_filename() if rep==gtk.RESPONSE_OK: print new selection=%s%a else: print no change plop=testcase() ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
python2.5 gtk_tree_view_set_fixed_height_mode segfault
Hi there. I have a problem with a bug i m experiencing with pygtk. I hoped the new maemo 3.1 'bora' would automagically fix it, but it did not. I did not yet open a bug report because i failed recreating a simple test case. I know how to reproduce it at will with the application i m experiencing the problem with, and the core backtrace starts this way: Core was generated by `/usr/bin/python2.5 /usr/bin/rapier'. Program terminated with signal 11, Segmentation fault. #0 0xb7680850 in gtk_tree_view_set_fixed_height_mode () from /usr/lib/libgtk-x11-2.0.so.0 (gdb) bt #0 0xb7680850 in gtk_tree_view_set_fixed_height_mode () from /usr/lib/libgtk-x11-2.0.so.0 #1 0xb768cd67 in gtk_tree_view_set_model () from /usr/lib/libgtk-x11-2.0.so.0 #2 0xb7a1029b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 I would probably not be able to undestrand exactly what is going on, but even if i would, i already have a problem trying to install the debug symbol to look closer: [sbox-SDK_X86: ~] fakeroot apt-get install libgtk2.0-dbg gives me the following: The following packages have unmet dependencies: libgtk2.0-dbg: Depends: libgtk2.0-0 (= 2:2.6.10-1.osso23) but 2:2.6.10-2.osso30 is to be installed E: Broken packages Maybe i should have try this before apt-get distupgrading to 3.1 :) So, A sample core is available here : http://hurdygurdy.dyndns.org/maemosword/core.13391XXX Remove the XXX at the end to get it (the file is 16M and i do not want robots to spoil the few upload bandwith i have with this file). If someone wants to reproduce the problem (i would really like to have a simpler test case, but the one i try to write does not crash :) ), install rapier: http://hurdygurdy.dyndns.org/maemosword/ http://garage.maemo.org/projects/rapier/ Install at least a module and generate the associated clucene index (cf home page). Launch it from an xterm (there is a yet more obscure problem when launching rapier from the hildon menu that i havent look at , nor reported yet) . Click on the 'search' button. Search for a keyword that will give result, like 'bread' Select a result so the textview display a verse. Perform another search that will give result, like 'wine' It crashes when the new results should be displayed. Thanks for any feedback that may help. ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Is this a bug in python-osso ? (osso rpc call with argument)
Hi there. As a followup of my previous message (problem using dbus rpc call with argument in python) i decided to give rpc_async_run a try instead of rpc_run. Now, not only it 'does not work', but pyhton2.5 segfault as well. I guess i did something wrong like not having an osso context properly set or something like this, but i also feel it should be up to libosso or python-osso to check the argument it use ar ok, shouldnt it ? I have attached a test cased based on : http://maemo.org/platform/docs/python-bora/python_maemo_howto.html#Introduction+to+LibOSSO I also try to catch a backtrace, with 'gdb /usr/bin/python2.5 core' , but i m not that familiar with gdb, nor do i know where to get the python-osso debug symbols. Anyway, the begining of the backtrace looks like this: #0 0xb72d068c in _python_to_rpc_t () from /usr/lib/python2.5/site-packages/osso/rpc.so #1 0xb72cfc61 in Context_rpc_run_with_defaults () from /usr/lib/python2.5/site-packages/osso/rpc.so #2 0xb79f09b9 in osso_rpc_run () from /usr/lib/libosso.so.1 Am i wrong in thinking there is something wrong in python-osso ? I use python2.5-osso 0.2-1osso1. _python_to_rpc_t is defined in python-osso/src/osso-helper.c, but this is where i m stuck at, not understanding what may be wrong there (i guess one of the 2 argument being sent has not the right type or size or something, but that s about it). Any help would be appreciated. Pierre Amadio Core was generated by `/usr/bin/python2.5 ./sender.py'. Program terminated with signal 11, Segmentation fault. #0 0xb72d068c in _python_to_rpc_t () from /usr/lib/python2.5/site-packages/osso/rpc.so (gdb) bt #0 0xb72d068c in _python_to_rpc_t () from /usr/lib/python2.5/site-packages/osso/rpc.so #1 0xb72cfc61 in Context_rpc_run_with_defaults () from /usr/lib/python2.5/site-packages/osso/rpc.so #2 0xb79f09b9 in osso_rpc_run () from /usr/lib/libosso.so.1 #3 0xb79b8c3f in dbus_pending_call_get_data () from /usr/lib/libdbus-1.so.2 #4 0xb79a74d9 in dbus_connection_has_messages_to_send () from /usr/lib/libdbus-1.so.2 #5 0xb79a9bf8 in dbus_connection_dispatch () from /usr/lib/libdbus-1.so.2 #6 0xb75d6f2d in dbus_g_message_get_message () from /usr/lib/libdbus-glib-1.so.2 #7 0xb79408e7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #8 0xb7942285 in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0 #9 0xb79425aa in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #10 0xb774bb23 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #11 0xb6f32d8b in init_gtkimpl () from /usr/lib/python2.5/site-packages/gtk-2.0/gtk/_gtkimpl.so #12 0xb7e973c8 in PyEval_EvalFrameEx () from /usr/lib/libpython2.5.so.1.0 #13 0xb7e98c40 in PyEval_EvalCodeEx () from /usr/lib/libpython2.5.so.1.0 #14 0xb7e98c9b in PyEval_EvalCode () from /usr/lib/libpython2.5.so.1.0 #15 0xb7eabfe0 in PyErr_Display () from /usr/lib/libpython2.5.so.1.0 #16 0xb7eac4be in PyRun_FileExFlags () from /usr/lib/libpython2.5.so.1.0 #17 0xb7eacec7 in PyRun_SimpleFileExFlags () from /usr/lib/libpython2.5.so.1.0 #18 0xb7ead5b3 in PyRun_AnyFileExFlags () from /usr/lib/libpython2.5.so.1.0 #19 0xb7eb4985 in Py_Main () from /usr/lib/libpython2.5.so.1.0 #20 0x0804856e in main () [D-BUS Service] Name=spam.eggs.osso_test_receiver Exec=/home/melmoth/dev/rapier/receive.py #!/usr/bin/python2.5 import osso import gtk def callback_func(interface, method, arguments, user_data): print RPC received,user_data print arg=,arguments #osso_c = user_data #osso_sysnote = osso.SystemNote(osso_c) #osso_sysnote.system_note_infoprint(osso_test_receiver: Received a RPC to %s. % method) return ok data has been processed osso_c = osso.Context(osso_test_receiver, 0.0.1, False) print osso_test_receiver started osso_rpc = osso.Rpc(osso_c) osso_rpc.set_rpc_callback(spam.eggs.osso_test_receiver, /spam/eggs/osso_test_receiver, spam.eggs.osso_test_receiver, callback_func, 'plop') gtk.main() #!/usr/bin/python2.5 import osso import hildon import gtk def process_rpc_answer(retval): print process_rpc_answer called:,retval return True def send_rpc(widget, osso_c): Cf http://www.maemo.org/platform/docs/pymaemo/pyosso_context.html#rpc_run_with_defaults osso_rpc = osso.Rpc(osso_c) test=osso_rpc.rpc_async_run(spam.eggs.osso_test_receiver, /spam/eggs/osso_test_receiver, spam.eggs.osso_test_receiver, do_something, process_rpc_answer, 'some user data', ('argA','argB') ) print test=,,test print RPC sent osso_c = osso.Context(osso_test_sender, 0.0.1, False) window = hildon.Window() window.connect(destroy, gtk.main_quit) send_button = gtk.Button(Send RPC) window.add(send_button) send_button.connect(clicked, send_rpc, osso_c
[maemo-developers] osso rpc call with argument : looking for python example
Hello. I do not understand how to send arguments with libosso. I have 2 python script: rapier and rapierbg. I would like rapier to send a rpc call to rapierbg. I have created the /usr/share/dbus-1/services/rapierbg.service file with the following content: [D-BUS Service] Name=org.maemo.rapierbg Exec=/home/melmoth/dev/rapier/src/rapierbg.py In rapier, i have the following code to start the rpc request: rpc=osso.Rpc(self.osso_context) test=rpc.rpc_run(org.maemo.rapierbg, /org/maemo/rapierbg, org.maemo.rapierbg, do_something) In rapierbg i have: osso_c = osso.Context(org.maemo.rapierbg, 0.0.1, False) osso_rpc = osso.Rpc(osso_c) osso_rpc.set_rpc_callback(org.maemo.rapierbg, /org/maemo/rapierbg, org.maemo.rapierbg, callback_func,osso_c) as well as the following definition: def callback_func(interface, method, arguments, user_data): print A RPC received print interface=,interface print arguments=,arguments print user_data=,user_data Now, things sort of work when i launch rapier, callbac_func is called and i see 'A RPC received' being printed on the console. If i try to add somes arguments in rapier this way: args=(aa,bbb,cc) test=rpc.rpc_run(org.maemo.rapierbg, /org/maemo/rapierbg, org.maemo.rapierbg, do_something,args) Then, it looks like callback_func is not being called at all. Any idea as to how to send arguments or what error i may have made would be appreciated. Pierre Amadio ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers