[Galago-commits] r2600 - in trunk/galago-python: . src

galago-commits at freedesktop.org galago-commits at freedesktop.org
Tue Mar 14 23:27:37 PST 2006


Author: chipx86
Date: 2006-03-14 23:27:24 -0800 (Tue, 14 Mar 2006)
New Revision: 2600

Modified:
   trunk/galago-python/ChangeLog
   trunk/galago-python/src/Makefile.am
   trunk/galago-python/src/galago.defs
Log:
Updated the update-defs rule to automatically filter out some things and fix up auto-generated defs. Also updated the defs for the latest libgalago API changes.


Modified: trunk/galago-python/ChangeLog
===================================================================
--- trunk/galago-python/ChangeLog	2006-03-15 05:24:38 UTC (rev 2599)
+++ trunk/galago-python/ChangeLog	2006-03-15 07:27:24 UTC (rev 2600)
@@ -1,3 +1,11 @@
+Tue Mar 14 23:26:33 PST 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/galago.defs:
+	* src/Makefile.am:
+	  - Updated the update-defs rule to automatically filter out some things
+	    and fix up auto-generated defs. Also updated the defs for the latest
+	    libgalago API changes.
+
 Wed Dec 14 00:44:19 PST 2005  Christian Hammond <chipx86 at chipx86.com>
 
 	* src/galago.defs:

Modified: trunk/galago-python/src/Makefile.am
===================================================================
--- trunk/galago-python/src/Makefile.am	2006-03-15 05:24:38 UTC (rev 2599)
+++ trunk/galago-python/src/Makefile.am	2006-03-15 07:27:24 UTC (rev 2600)
@@ -30,5 +30,22 @@
 	 && cp gen-$*.c $*.c \
 	 && rm -f gen-$*.c
 
+DEFHEADERS = $(filter-out \
+	$(includedir)/libgalago/galago-value.h \
+	$(includedir)/libgalago/galago-dbus.h, \
+	$(wildcard $(includedir)/libgalago/*.h))
+
 update-defs:
-	python $(datadir)/pygtk/2.0/codegen/h2def.py $(includedir)/libgalago/*.h > galago.defs
+	@python $(datadir)/pygtk/2.0/codegen/h2def.py $(DEFHEADERS) > galago.defs.tmp
+	@sed -e 's/define-function galago_context_/define-function context_/g' \
+		 -e 's/define-function galago_\(set\|is\|get\|add\|remove\|create\|init\|uninit\|context\)/define-function \1/g' \
+		 -e '/^(define-function galago_image_new_/,/^)$$/d' \
+		 -e '/define-function create_service/,/^$$/ { s/\("name"\))/\1 (default "NULL"))/g; s/\("flags"\))/\1 (default "0"))/g }' \
+		 -e 's/"query")/"query" (default "TRUE"))/g' \
+		 -e 's/"origin")/"origin" (default "GALAGO_REMOTE"))/g' \
+		 -e 's/"gboolean" "feed")/"gboolean" "feed" (default "FALSE"))/g' \
+		 -e '/define-function galago_status_new/,/^$$/ { s/parameters/properties/g; s/"GalagoStatusType" "type"/"primitive"/g; s/"const-char\*" "id"/"id"/g; s/"const-char\*" "name"/"name"/g; s/"gboolean" "exclusive"/"exclusive"/g }' \
+		 -e 's/(parameters\n *.("GalagoStatusType" "type")\n *.("const-char\*" "id")\n *.("const-char\*" "name")\n *.("gboolean" "exclusive")/"bunnies"/gM' \
+		galago.defs.tmp > galago.defs
+	@rm -f galago.defs.tmp
+	@echo Definitions updated

Modified: trunk/galago-python/src/galago.defs
===================================================================
--- trunk/galago-python/src/galago.defs	2006-03-15 05:24:38 UTC (rev 2599)
+++ trunk/galago-python/src/galago.defs	2006-03-15 07:27:24 UTC (rev 2600)
@@ -117,30 +117,7 @@
   )
 )
 
-(define-enum Type
-  (in-module "Galago")
-  (c-name "GalagoType")
-  (gtype-id "GALAGO_TYPE_TYPE")
-  (values
-    '("unknown" "GALAGO_VALUE_TYPE_UNKNOWN")
-    '("char" "GALAGO_VALUE_TYPE_CHAR")
-    '("uchar" "GALAGO_VALUE_TYPE_UCHAR")
-    '("boolean" "GALAGO_VALUE_TYPE_BOOLEAN")
-    '("short" "GALAGO_VALUE_TYPE_SHORT")
-    '("ushort" "GALAGO_VALUE_TYPE_USHORT")
-    '("int" "GALAGO_VALUE_TYPE_INT")
-    '("uint" "GALAGO_VALUE_TYPE_UINT")
-    '("long" "GALAGO_VALUE_TYPE_LONG")
-    '("ulong" "GALAGO_VALUE_TYPE_ULONG")
-    '("string" "GALAGO_VALUE_TYPE_STRING")
-    '("object" "GALAGO_VALUE_TYPE_OBJECT")
-    '("pointer" "GALAGO_VALUE_TYPE_POINTER")
-    '("list" "GALAGO_VALUE_TYPE_LIST")
-    '("array" "GALAGO_VALUE_TYPE_ARRAY")
-  )
-)
 
-
 ;; From /usr/include/libgalago/galago-account.h
 
 (define-function galago_account_get_type
@@ -148,12 +125,6 @@
   (return-type "GType")
 )
 
-(define-method create_presence
-  (of-object "GalagoAccount")
-  (c-name "galago_account_create_presence")
-  (return-type "GalagoPresence*")
-)
-
 (define-method set_connected
   (of-object "GalagoAccount")
   (c-name "galago_account_set_connected")
@@ -169,15 +140,6 @@
   (return-type "GalagoService*")
 )
 
-(define-method set_person
-  (of-object "GalagoAccount")
-  (c-name "galago_account_set_person")
-  (return-type "none")
-  (parameters
-    '("GalagoPerson*" "person")
-  )
-)
-
 (define-method get_person
   (of-object "GalagoAccount")
   (c-name "galago_account_get_person")
@@ -254,13 +216,10 @@
   )
 )
 
-(define-method set_presence
+(define-method create_presence
   (of-object "GalagoAccount")
-  (c-name "galago_account_set_presence")
-  (return-type "none")
-  (parameters
-    '("GalagoPresence*" "presence")
-  )
+  (c-name "galago_account_create_presence")
+  (return-type "GalagoPresence*")
 )
 
 (define-method get_presence
@@ -291,14 +250,23 @@
 )
 
 
+
+;; From /usr/include/libgalago/galago-assert.h
+
+
+
+;; From /usr/include/libgalago/galago-context-base.h
+
+
+
 ;; From /usr/include/libgalago/galago-context.h
 
-(define-function galago_context_get_type
+(define-function context_get_type
   (c-name "galago_context_get_type")
   (return-type "GType")
 )
 
-(define-function galago_context_new
+(define-function context_new
   (c-name "galago_context_new")
   (is-constructor-of "GalagoContext")
   (return-type "GalagoContext*")
@@ -359,6 +327,15 @@
   )
 )
 
+(define-function context_get_person_with_session_id
+  (c-name "galago_context_get_person_with_session_id")
+  (return-type "GalagoPerson*")
+  (parameters
+    '("const-char*" "session_id")
+    '("GalagoOrigin" "origin" (default "GALAGO_REMOTE"))
+  )
+)
+
 (define-function context_get_people
   (c-name "galago_context_get_people")
   (return-type "GList*")
@@ -517,27 +494,11 @@
   )
 )
 
-(define-function add_person
-  (c-name "galago_add_person")
-  (return-type "none")
-  (parameters
-    '("GalagoPerson*" "person")
-  )
-)
-
-(define-function remove_person
-  (c-name "galago_remove_person")
-  (return-type "none")
-  (parameters
-    '("GalagoPerson*" "person")
-  )
-)
-
 (define-function get_person
   (c-name "galago_get_person")
   (return-type "GalagoPerson*")
   (parameters
-    '("const-char*" "id")
+    '("const-char*" "uid")
     '("GalagoOrigin" "origin" (default "GALAGO_REMOTE"))
     '("gboolean" "query" (default "TRUE"))
   )
@@ -567,6 +528,7 @@
 )
 
 
+
 ;; From /usr/include/libgalago/galago-enum-types.h
 
 (define-function galago_object_flags_get_type
@@ -579,11 +541,6 @@
   (return-type "GType")
 )
 
-(define-function galago_property_type_get_type
-  (c-name "galago_property_type_get_type")
-  (return-type "GType")
-)
-
 (define-function galago_service_flags_get_type
   (c-name "galago_service_flags_get_type")
   (return-type "GType")
@@ -617,6 +574,8 @@
   (return-type "GType")
 )
 
+
+
 (define-method get_data
   (of-object "GalagoImage")
   (c-name "galago_image_get_data")
@@ -628,6 +587,7 @@
 )
 
 
+
 ;; From /usr/include/libgalago/galago-object.h
 
 (define-function galago_object_get_type
@@ -635,6 +595,14 @@
   (return-type "GType")
 )
 
+(define-function galago_object_type_get_dbus_signature
+  (c-name "galago_object_type_get_dbus_signature")
+  (return-type "const-gchar*")
+  (parameters
+    '("GType" "type")
+  )
+)
+
 (define-method set_dbus_path
   (of-object "GalagoObject")
   (c-name "galago_object_set_dbus_path")
@@ -697,13 +665,13 @@
   )
 )
 
-(define-method set_attr_uint32
+(define-method set_attr_int
   (of-object "GalagoObject")
-  (c-name "galago_object_set_attr_uint32")
+  (c-name "galago_object_set_attr_int")
   (return-type "none")
   (parameters
     '("const-char*" "name")
-    '("guint32" "value")
+    '("gint32" "value")
   )
 )
 
@@ -744,10 +712,10 @@
   )
 )
 
-(define-method get_attr_uint32
+(define-method get_attr_int
   (of-object "GalagoObject")
-  (c-name "galago_object_get_attr_uint32")
-  (return-type "guint32")
+  (c-name "galago_object_get_attr_int")
+  (return-type "gint32")
   (parameters
     '("const-char*" "name")
   )
@@ -789,6 +757,12 @@
   (return-type "const-char*")
 )
 
+(define-method get_session_id
+  (of-object "GalagoPerson")
+  (c-name "galago_person_get_session_id")
+  (return-type "const-char*")
+)
+
 (define-method get_display_name
   (of-object "GalagoPerson")
   (c-name "galago_person_get_display_name")
@@ -837,36 +811,19 @@
   (return-type "GalagoAccount*")
 )
 
-(define-method add_account
-  (of-object "GalagoPerson")
-  (c-name "galago_person_add_account")
-  (return-type "none")
-  (parameters
-    '("GalagoAccount*" "account")
-  )
-)
-
-(define-method remove_account
-  (of-object "GalagoPerson")
-  (c-name "galago_person_remove_account")
-  (return-type "none")
-  (parameters
-    '("GalagoAccount*" "account")
-  )
-)
-
 (define-method get_account
   (of-object "GalagoPerson")
   (c-name "galago_person_get_account")
   (return-type "GalagoAccount*")
   (parameters
-    '("GalagoService*" "service")
+    '("const-GalagoService*" "service")
     '("const-char*" "username")
     '("gboolean" "query" (default "TRUE"))
   )
 )
 
 
+
 ;; From /usr/include/libgalago/galago-presence.h
 
 (define-function galago_presence_get_type
@@ -880,7 +837,7 @@
   (return-type "none")
   (parameters
     '("gboolean" "idle")
-    '("time_t" "idle_time")
+    '("time_t" "idle_start_time")
   )
 )
 
@@ -935,6 +892,12 @@
   (return-type "time_t")
 )
 
+(define-method get_idle_start_time
+  (of-object "GalagoPresence")
+  (c-name "galago_presence_get_idle_start_time")
+  (return-type "time_t")
+)
+
 (define-method is_discarded
   (of-object "GalagoPresence")
   (c-name "galago_presence_is_discarded")
@@ -1000,7 +963,7 @@
   (c-name "galago_presence_compare")
   (return-type "int")
   (parameters
-    '("GalagoPresence*" "presence2")
+    '("const-GalagoPresence*" "presence2")
   )
 )
 
@@ -1060,24 +1023,6 @@
   )
 )
 
-(define-method add_account
-  (of-object "GalagoService")
-  (c-name "galago_service_add_account")
-  (return-type "none")
-  (parameters
-    '("GalagoAccount*" "account")
-  )
-)
-
-(define-method remove_account
-  (of-object "GalagoService")
-  (c-name "galago_service_remove_account")
-  (return-type "none")
-  (parameters
-    '("GalagoAccount*" "account")
-  )
-)
-
 (define-method normalize
   (of-object "GalagoService")
   (c-name "galago_service_normalize")
@@ -1101,10 +1046,10 @@
   (is-constructor-of "GalagoStatus")
   (return-type "GalagoStatus*")
   (properties
-	'("primitive")
-	'("id")
-	'("name")
-	'("exclusive")
+    '("primitive")
+    '("id")
+    '("name")
+    '("exclusive")
   )
 )
 
@@ -1294,3 +1239,5 @@
   (c-name "galago_status_attr_get_double")
   (return-type "double")
 )
+
+



More information about the galago-commits mailing list