Hi there,

I was wondering 

o. Why isn't libosso created as a clean and correct GObject library?
This would have made it more easy to create language bindings. No?

I could imagine a GObject would be dangerous if you'd use a lot
threading (and then still it's manageable and are people working on
fixing those issues), but I don't see a lot other thread-safety related
code in the library. So I'm assuming that isn't an issue?

Because ... osso_context_t (and osso_af_context_t) isn't inheriting from
GObject. So that must mean that it isn't GObject? And if it would, I'd
rather make more objects in stead of only a context one (but, okay .. I
can live with that).

o. What is libmb?

[EMAIL PROTECTED]:~/cvs/maemo/trunk $ find . -name libmb.pc
[EMAIL PROTECTED]:~/cvs/maemo/trunk $ find . -name mb.pc
[EMAIL PROTECTED]:~/cvs/maemo/trunk $

o. What is libouto?

[EMAIL PROTECTED]:~/cvs/maemo/trunk $ find . -name outo
[EMAIL PROTECTED]:~/cvs/maemo/trunk $



-- 
Philip Van Hoof, software developer at x-tend
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
http://www.pvanhoof.be - http://www.x-tend.be
Index: osso-state.c
===================================================================
--- osso-state.c	(revision 1007)
+++ osso-state.c	(working copy)
@@ -23,6 +23,9 @@
 #include "osso-state.h"
 #include "osso-log.h"
 
+static osso_return_t _write_state(const gchar *statefile, osso_state_t *state);
+static osso_return_t _read_state(const gchar *statefile, osso_state_t *state);
+
 /**
  * This internal function performs a simple validation for the application
  * and version information of the osso_context regarding their validity
Index: osso-rpc.c
===================================================================
--- osso-rpc.c	(revision 1007)
+++ osso-rpc.c	(working copy)
@@ -96,7 +96,7 @@
     if(first_arg_type != DBUS_TYPE_INVALID)
 	_append_args(msg, first_arg_type, var_args);
 
-    dbus_message_set_auto_activation(msg, TRUE);
+    dbus_message_set_auto_start(msg, TRUE);
     
     if(retval == NULL) {
 	dbus_message_set_no_reply(msg, TRUE);
@@ -261,7 +261,7 @@
     if(msg == NULL)
 	return OSSO_ERROR;
 
-    dbus_message_set_auto_activation(msg, TRUE);
+    dbus_message_set_auto_start(msg, TRUE);
     
     if(first_arg_type != DBUS_TYPE_INVALID)
 	_append_args(msg, first_arg_type, var_args);
@@ -412,9 +412,10 @@
     
     dbus_error_init(&err);
 
-    dprint("acquiring service '%s'", service);
-    i = dbus_bus_acquire_service(use_system_bus?osso->sys_conn:osso->conn,
-				 service, 0, &err);
+    dprint("requesting service '%s'", service);
+
+    i = dbus_bus_request_name (use_system_bus?osso->sys_conn:osso->conn,
+				 service, 0, &err);		 
 #ifdef LIBOSSO_DEBUG
     if(i <= 0) {
 	if(i == 0) {
@@ -644,7 +645,7 @@
 	    reply = dbus_message_new_error(msg, err_name, retval.value.s);
 	}
 	if(reply != NULL) {
-	    int serial;
+	    dbus_uint32_t serial;
 	    dprint("sending message to '%s'",
 		   dbus_message_get_destination(reply));
 	    
@@ -687,15 +688,11 @@
 	  case DBUS_TYPE_STRING:
 	    s = va_arg(var_args, gchar *);
 	    if(s == NULL)
-		dbus_message_append_args(msg, DBUS_TYPE_NIL,
+		dbus_message_append_args(msg, DBUS_TYPE_INT32,
 					 DBUS_TYPE_INVALID);
 	    else
 		dbus_message_append_args(msg, type, s, DBUS_TYPE_INVALID);
 	    break;
-	  case DBUS_TYPE_NIL:	    
-		dbus_message_append_args(msg, DBUS_TYPE_NIL,
-					 DBUS_TYPE_INVALID);
-	    break;
 	  default:
 	    break;	    
 	}
@@ -736,14 +733,11 @@
       case DBUS_TYPE_STRING:
 	dprint("Appending STR:'%s'",arg->value.s);
 	if(arg->value.s == NULL)
-	    dbus_message_append_args(msg, DBUS_TYPE_NIL, DBUS_TYPE_INVALID);
+	    dbus_message_append_args(msg, DBUS_TYPE_INT32, DBUS_TYPE_INVALID);
 	else
 	    dbus_message_append_args(msg, DBUS_TYPE_STRING, arg->value.s,
 				     DBUS_TYPE_INVALID);
 	break;
-      case DBUS_TYPE_NIL:
-	    dbus_message_append_args(msg, DBUS_TYPE_NIL, DBUS_TYPE_INVALID);
-	break;
       default:
 	break;	    
     }
@@ -760,23 +754,23 @@
     retval->type = dbus_message_iter_get_arg_type(iter);
     switch(retval->type) {
       case DBUS_TYPE_INT32:
-	retval->value.i = dbus_message_iter_get_int32(iter);
+	dbus_message_iter_get_basic (iter, &retval->value.i);
 	dprint("got INT32:%d",retval->value.i);
 	break;
       case DBUS_TYPE_UINT32:
-	retval->value.u = dbus_message_iter_get_uint32(iter);
+	dbus_message_iter_get_basic (iter, &retval->value.u);
 	dprint("got UINT32:%u",retval->value.u);
 	break;
       case DBUS_TYPE_BOOLEAN:
-	retval->value.b = dbus_message_iter_get_boolean(iter);
+	dbus_message_iter_get_basic (iter, &retval->value.b);
 	dprint("got BOOLEAN:%s",retval->value.s?"TRUE":"FALSE");
 	break;
       case DBUS_TYPE_DOUBLE:
-	retval->value.d = dbus_message_iter_get_double(iter);
+	dbus_message_iter_get_basic (iter, &retval->value.d);
 	dprint("got DOUBLE:%f",retval->value.d);
 	break;
       case DBUS_TYPE_STRING:
-	str = dbus_message_iter_get_string (iter);
+	dbus_message_iter_get_basic (iter, &str);
 	retval->value.s = g_strdup (str);
 	dbus_free (str);
 	if(retval->value.s == NULL) {
@@ -784,10 +778,6 @@
 	}
 	dprint("got STRING:'%s'",retval->value.s);
 	break;
-      case DBUS_TYPE_NIL:
-	retval->value.s = NULL;	    
-	dprint("got NIL");
-	break;
       default:
 	retval->type = DBUS_TYPE_INVALID;
 	retval->value.i = 0;	    
@@ -805,7 +795,7 @@
     int type;
     rpc = (_osso_rpc_async_t *)data;
     ULOG_INFO_F("At msg return handler");
-    msg = dbus_pending_call_get_reply(pending);
+    msg = dbus_pending_call_steal_reply(pending);
     if(msg == NULL) {
 	g_free(rpc->interface);
 	g_free(rpc->method);
Index: osso-init.c
===================================================================
--- osso-init.c	(revision 1007)
+++ osso-init.c	(working copy)
@@ -60,7 +60,7 @@
         fprintf(stderr, "osso_initialize() WARNING: if the system bus "
           "activated this program, Libosso does not connect"
           " to the session bus!\n");
-        osso->conn = _dbus_connect_and_setup(osso, DBUS_BUS_ACTIVATION,
+        osso->conn = _dbus_connect_and_setup(osso, DBUS_BUS_STARTER,
                                              context);
     } else {
         dprint("connecting to the session bus");
Index: osso-statusbar.c
===================================================================
--- osso-statusbar.c	(revision 1007)
+++ osso-statusbar.c	(working copy)
@@ -46,8 +46,6 @@
     if( (osso == NULL) || (name == NULL) )
 	return OSSO_INVALID;
     
-    if( ! argument3 )
-      dbus_type_string = DBUS_TYPE_NIL;
 
     r = _rpc_run_wrap(osso, osso->sys_conn, STATUSBAR_SERVICE, 
 		      STATUSBAR_OBJECT_PATH, STATUSBAR_INTERFACE,
_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to