[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [phpGroupWare-developers] opensync
From: |
Benoit Hamet |
Subject: |
Re: [phpGroupWare-developers] opensync |
Date: |
Tue, 14 Nov 2006 17:21:29 +0100 |
User-agent: |
Icedove 1.5.0.7 (X11/20061013) |
Hi all,
Dave Hall wrote:
On Sun, 2006-11-12 at 07:26 -0700, Sigurd Nes wrote:
Hi all,
Could opensync be an alternative for syncing portable devices with
phpgroupware?
http://www.opensync.org/wiki
OpenSync is nice, but it won't really work for us. OpenSync can talk to
our syncml server. Their syncml server and client implementation is
coming along nicely.
I do a first port of the libsyncml to become a php module, using SWIG.
Unfortunately, libsyncml is using callback functions in C, and
transposing this to php is not easy (will need a lot's of work). I'm not
sure if we need this functions or not, since I'm not a "Sync Ready
Developer" ... So if some of you can explain me how it should work, I
will perhaps be able to go deeper in the porting stage ...
You will find attached the syncml.i needed by swig :
Here's how to proceed :
- Get the libsyncml on svn for example and compile it, enable http
transport and obex : for example
./configure --prefix=/tmp/libsyncml --enable-tools --enable-http
--enable-obex --enable-bluetooth
make
make install
Using this installation, you run
mkdir /tmp/php_syncml
then
swig -I/tmp/libsyncml/include/libsyncml-1.0/ -outdir /tmp/php_syncml
-Wall -php4 -phpfull -o /tmp/php_syncml/php_syncml.c -withincs
libsyncml/syncml.h -withlibs syncml syncml.i
then
cd /tmp/php_syncml
phpize4
edit the Makefile.in
comment the line with the empty =
run :
./configure --with-syncml=/tmp/libsyncml/ --with-php-config=php-config4
then
edit the Makefile
on the INCLUDES= line, add : -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include
make
then, add the modules/syncml.so into the extension_dir of php4
enable it in the php.ini
and the libsyncml is more or less working :)
Not working for callback function, but if you can tell me what is
needed, just ask :)
Regards,
Caeies
%module syncml
%include <libsyncml/syncml.h>
%include <libsyncml/sml_defines.h>
%include <libsyncml/sml_error.h>
%include <libsyncml/sml_manager.h>
%include <libsyncml/sml_session.h>
%include <libsyncml/sml_transport.h>
%include <libsyncml/sml_elements.h>
%include <libsyncml/sml_command.h>
%include <libsyncml/sml_devinf.h>
%include <libsyncml/sml_notification.h>
%include <libsyncml/sml_base64.h>
%include <libsyncml/sml_md5.h>
%include <libsyncml/sml_auth.h>
%include <libsyncml/sml_devinf_obj.h>
%include <libsyncml/sml_ds_server.h>
%include <libsyncml/sml_parse.h>
%include <libsyncml/http_client.h>
%include <libsyncml/http_server.h>
%include <libsyncml/obex_client.h>
%include <libsyncml/obex_server.h>
%{
#include <config.h>
#include <stdio.h>
#include <stdint.h>
#include <glib.h>
#include <libsyncml/syncml.h>
//This headers could be a problem ...
//If this is a problem, remove them from the list above.
#include <libsyncml/http_server.h>
#include <libsyncml/http_client.h>
#include <libsyncml/obex_client.h>
#include <libsyncml/obex_server.h>
#include <libsyncml/sml_auth.h>
#include <libsyncml/sml_devinf_obj.h>
#include <libsyncml/sml_ds_server.h>
#include <libsyncml/sml_parse.h>
%}
test_sync.php
Description: application/php