[glibmm] Gio: Added some methods.



commit 396dab7df3fa2892eaf04503edbfb0876a2ef776
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Nov 10 10:13:02 2010 +0100

    Gio: Added some methods.
    
    	* gio/src/gio_methods.defs:
    	* glib/src/glib_functions.defs:
    	* glib/src/gobject_functions.defs: Regenerated with h2defs.py.
    
    	* gio/src/application.hg: Added open(). Notice that I have used std::vector
    	instead of ArrayHandle, because that is what we should use for all new API,
    	after we decided that the intermediate types are too awkward for people to
    	understand.
    	* gio/src/actiongroup.[hg|ccg]: Added list_actions, though we need to
    	use a std::vector here instead.
    	* gio/src/datainputstream.[hg|ccg]: Added read_upto(), read_upto_async()
    	and read_upto_finish(). Updated the read_until*() documentation to
    	discourage their use (apparently they will be properly deprecated eventually).
    	* gio/src/settings.hg: Added range_check().
    	* gio/src/socketclient.[hg|ccg]: Addef connect_to_uri(), connect_to_uri_async()
    	and connect_to_uri_finish().

 ChangeLog                       |   21 ++
 gio/src/actiongroup.hg          |    6 +-
 gio/src/application.ccg         |   16 ++
 gio/src/application.hg          |   25 ++-
 gio/src/datainputstream.ccg     |   85 +++++++-
 gio/src/datainputstream.hg      |  109 ++++++++-
 gio/src/gio_methods.defs        |  165 ++++++++++---
 gio/src/settings.hg             |   23 ++-
 gio/src/socketclient.ccg        |   45 ++++-
 gio/src/socketclient.hg         |   17 ++
 gio/src/unixsocketaddress.hg    |    3 +-
 glib/src/glib_functions.defs    |  495 +++++++++++++++++++++++----------------
 glib/src/gobject_functions.defs |   29 +++
 13 files changed, 769 insertions(+), 270 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b7d13d4..6ae5d4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2010-11-10  Murray Cumming  <murrayc murrayc com>
+
+	Gio: Added some methods.
+
+	* gio/src/gio_methods.defs:
+	* glib/src/glib_functions.defs:
+	* glib/src/gobject_functions.defs: Regenerated with h2defs.py.
+
+	* gio/src/application.hg: Added open(). Notice that I have used std::vector
+	instead of ArrayHandle, because that is what we should use for all new API,
+	after we decided that the intermediate types are too awkward for people to
+	understand.
+	* gio/src/actiongroup.[hg|ccg]: Added list_actions, though we need to
+	use a std::vector here instead.
+	* gio/src/datainputstream.[hg|ccg]: Added read_upto(), read_upto_async()
+	and read_upto_finish(). Updated the read_until*() documentation to
+	discourage their use (apparently they will be properly deprecated eventually).
+	* gio/src/settings.hg: Added range_check().
+	* gio/src/socketclient.[hg|ccg]: Addef connect_to_uri(), connect_to_uri_async()
+	and connect_to_uri_finish().
+
 2010-11-08  José Alburquerque  <jaalburqu svn gnome org>
 
 	DBusConnection: Make sure the AsyncInitable inheritance is correct.
diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg
index 05f3a05..3375628 100644
--- a/gio/src/actiongroup.hg
+++ b/gio/src/actiongroup.hg
@@ -53,10 +53,12 @@ class ActionGroup : public Glib::Interface
 public:
   _WRAP_METHOD(bool has_action(const Glib::ustring& action_name) const, g_action_group_has_action)
 
-  //TODO: _WRAP_METHOD(gchar** list_actions(), g_action_group_list_actions)
+  //TODO: Use a vector instead, for this new API, before we free glibmm 2.28.
+#m4 _CONVERSION(`gchar**', `Glib::StringArrayHandle', `Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
+  _WRAP_METHOD(Glib::StringArrayHandle list_actions() const, g_action_group_list_actions)
 
   _WRAP_METHOD(bool get_action_enabled(const Glib::ustring& action_name) const, g_action_group_get_action_enabled)
- 
+
 /* TODO:
   _WRAP_METHOD(const GVariantType* get_action_parameter_type(const Glib::ustring& action_name), g_action_group_get_action_parameter_type)
   GVariantType* get_action_state_type(const Glib::ustring& action_name), g_action_group_get_action_state_type)
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index 370aa4f..fb7a56f 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -24,5 +24,21 @@
 namespace Gio
 {
 
+void Application::open(const type_vec_files& files, const Glib::ustring& hint)
+{
+  //TODO: Create a templated helper function for this:
+  typedef GFile* cpointer;
+  cpointer* files_array = new cpointer[files.size()];
+  guint i = 0;
+  for(type_vec_files::const_iterator iter = files.begin(); iter != files.end(); iter++)
+  {
+    type_vec_files::const_reference refPtr = *iter;
+    files_array[i] = refPtr->gobj();
+  }
+
+  g_application_open(gobj(), files_array, files.size(), hint.c_str());
+
+  delete[] files_array ;
+}
 
 } // namespace Gio
diff --git a/gio/src/application.hg b/gio/src/application.hg
index 7117548..39932c4 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -17,7 +17,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <giomm/cancellable.h>
+#include <giomm/file.h>
 #include <glibmm/object.h>
 #include <glibmm/variant.h>
 
@@ -89,7 +89,7 @@ public:
 
   _WRAP_METHOD(static Glib::RefPtr<Application> create(const Glib::ustring& appid, ApplicationFlags flags = APPLICATION_FLAGS_NONE), g_application_new)
 
-  _WRAP_METHOD(static bool id_is_valid(const Glib::ustring& application_id), g_application_id_is_valid) 
+  _WRAP_METHOD(static bool id_is_valid(const Glib::ustring& application_id), g_application_id_is_valid)
 
   _WRAP_METHOD(Glib::ustring get_id() const, g_application_get_application_id)
   _WRAP_METHOD(void set_id(const Glib::ustring& application_id), g_application_set_application_id)
@@ -113,7 +113,26 @@ public:
   _WRAP_METHOD(void release(), g_application_release)
   _WRAP_METHOD(void activate(), g_application_activate)
 
-  //TODO: _WRAP_METHOD(void open(GFile **files, gint n_files, const Glib::ustring& hint), g_application_open)
+  typedef std::vector< Glib::RefPtr<File> > type_vec_files;
+
+  /* Opens the given files.
+   *
+   * In essence, this results in the open signal being emitted
+   * in the primary instance.
+   *
+   * @a hint is simply passed through to the open signal.  It is
+   * intended to be used by applications that have multiple modes for
+   * opening files (eg: "view" vs "edit", etc).
+   *
+   * The application must be registered before calling this mwethod
+   * and it must have the APPLICATION_HANDLES_OPEN flag set.
+   *
+   * @param files The files to open. This must be non-empty.
+   * @param hint A hint.
+   *
+   * @newin{2,28}
+   */
+  void open(const type_vec_files& files, const Glib::ustring& hint = Glib::ustring());
 
   _WRAP_METHOD(void run(int argc, char** argv), g_application_run)
   //TODO: g_application_run_with_arguments)
diff --git a/gio/src/datainputstream.ccg b/gio/src/datainputstream.ccg
index fb46f32..69e3b40 100644
--- a/gio/src/datainputstream.ccg
+++ b/gio/src/datainputstream.ccg
@@ -158,7 +158,7 @@ bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result,
     data = std::string(buffer, size);
     g_free (buffer);
   }
-  
+
   return retval;
 }
 
@@ -209,7 +209,7 @@ void DataInputStream::read_until_async(const std::string& stop_chars, const Slot
   // and deleted in the callback.
   SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
 
-  g_data_input_stream_read_until_async(gobj(), stop_chars.c_str(), 
+  g_data_input_stream_read_until_async(gobj(), stop_chars.c_str(),
                             io_priority,
                             Glib::unwrap(cancellable),
                             &SignalProxy_async_callback,
@@ -231,9 +231,86 @@ bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result,
     data = std::string(buffer, size);
     g_free (buffer);
   }
-  
+
+  return retval;
+}
+
+
+bool DataInputStream::read_upto(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable)
+{
+  GError* gerror = 0;
+  char* c_str = g_data_input_stream_read_upto(gobj(),
+                                               stop_chars.c_str(), -1, /* null-terminated */
+                                               0, // pass NULL since we can easily determine the length from the returned std::string
+                                               Glib::unwrap(cancellable),
+                                               &gerror);
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+    if (c_str) {
+        data = c_str;
+        g_free (c_str);
+        return true;
+    }
+    // end of stream reached, return failure status
+    return false;
+}
+
+/** non-cancellable version of read_upto()
+ */
+bool DataInputStream::read_upto(std::string& data, const std::string& stop_chars)
+{
+  GError* gerror = 0;
+  char* c_str = g_data_input_stream_read_upto(gobj(),
+    stop_chars.c_str(), -1, /* null-terminated */
+    0, // pass NULL since we can easily determine the length from the returned std::string
+    0,
+    &gerror);
+
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+
+  if (c_str) {
+      data = c_str;
+      g_free (c_str);
+      return true;
+  }
+
+  // end of stream reached, return failure status
+  return false;
+}
+
+void DataInputStream::read_upto_async(const std::string& stop_chars, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
+{
+  // Create a copy of the slot.
+  // A pointer to it will be passed through the callback's data parameter
+  // and deleted in the callback.
+  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+  g_data_input_stream_read_upto_async(gobj(), stop_chars.c_str(), -1, /* null-terminated */
+                            io_priority,
+                            Glib::unwrap(cancellable),
+                            &SignalProxy_async_callback,
+                            slot_copy);
+}
+
+bool DataInputStream::read_upto_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data)
+{
+  GError* gerror = 0;
+  gsize size = 0;
+  gchar* buffer = g_data_input_stream_read_upto_finish(gobj(), Glib::unwrap(result), &size, &(gerror));
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
+
+  bool retval = false;
+  if(buffer && size)
+  {
+    retval = (buffer != 0);
+    data = std::string(buffer, size);
+    g_free (buffer);
+  }
+
   return retval;
 }
 
-  
+
 } // namespace Gio
diff --git a/gio/src/datainputstream.hg b/gio/src/datainputstream.hg
index 21e5c47..a2e966f 100644
--- a/gio/src/datainputstream.hg
+++ b/gio/src/datainputstream.hg
@@ -95,10 +95,10 @@ public:
   //Note that we return a bool because we can't use std::string to distinguish between an empty string and a NULL.
 
   /** Reads a line from the data input stream.
-   * 
-   * The operation can be cancelled by triggering the cancellable object from 
+   *
+   * The operation can be cancelled by triggering the cancellable object from
    * another thread. If the operation
-   * was cancelled, a Gio::Error with CANCELLED will be thrown. 
+   * was cancelled, a Gio::Error with CANCELLED will be thrown.
    *
    * @param data A string to fill with the read data (without the newlines).
    * @param cancellable A cancellable object.
@@ -114,12 +114,12 @@ public:
    */
   bool read_line(std::string& line);
 
-  /** The asynchronous version of read_until(). It is 
+  /** The asynchronous version of read_until(). It is
    * an error to have two outstanding calls to this function.
    *
-   * @param slot The slot to call when the request is satisfied. 
+   * @param slot The slot to call when the request is satisfied.
    * @param cancellable A cancellable object.
-   * @param io_priority The I/O priority of the request. 
+   * @param io_priority The I/O priority of the request.
    * @result true if the read succeeded without error.
    */
   void read_line_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
@@ -134,9 +134,18 @@ public:
   bool read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
   _IGNORE(g_data_input_stream_read_line_finish)
 
-  /** Reads a string from the data input stream, up to the first 
+  /** Reads a string from the data input stream, up to the first
    * occurrence of any of the stop characters.
    *
+   * Note that, in contrast to read_until_async(),
+   * this function consumes the stop character that it finds.
+   *
+   * Don't use this function in new code.  Its functionality is
+   * inconsistent with read_until_async().  Both
+   * functions will be marked as deprecated in a future release.  Use
+   * read_upto() instead, but note that that method
+   * does not consume the stop character.
+   *
    * @param data A string to fill with the read data.
    * @param stop_chars Characters to terminate the read.
    * @param cancellable A cancellable object.
@@ -145,25 +154,48 @@ public:
   bool read_until(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable);
   _IGNORE(g_data_input_stream_read_until)
 
+  //TODO: This will be really deprecated sometime, maybe even before glib 2.28.0.
   /** A non-cancellable version of read_until().
+   *
+   * Note that, in contrast to read_until_async(),
+   * this function consumes the stop character that it finds.
+   *
+   * Don't use this function in new code.  Its functionality is
+   * inconsistent with read_until_async().  Both
+   * functions will be marked as deprecated in a future release.  Use
+   * read_upto() instead, but note that that method
+   * does not consume the stop character.
+   *
    * @param stop_chars Characters to terminate the read.
    * @param data A string to fill with the read data.
    * @result true if the read succeeded without error.
    */
   bool read_until(std::string& data, const std::string& stop_chars);
 
-  /** The asynchronous version of read_until(). It is 
+  //TODO: This will be really deprecated sometime, maybe even before glib 2.28.0.
+  /** The asynchronous version of read_until(). It is
    * an error to have two outstanding calls to this function.
    *
+   * Note that, in contrast to ead_until(),
+   * this function does not consume the stop character that it finds.  You
+   * must read it for yourself.
+   *
+   *
+   * Don't use this function in new code.  Its functionality is
+   * inconsistent with read_until().  Both functions
+   * will be marked as deprecated in a future release.  Use
+   * read_upto_async() instead.
+   *
    * @param stop_chars Characters to terminate the read.
-   * @param slot The slot to call when the request is satisfied. 
+   * @param slot The slot to call when the request is satisfied.
    * @param cancellable A cancellable object.
-   * @param io_priority The I/O priority of the request. 
+   * @param io_priority The I/O priority of the request.
    * @result true if the read succeeded without error.
    */
   void read_until_async(const std::string& stop_chars, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_data_input_stream_read_until_async)
 
+  //TODO: This will be really deprecated sometime, maybe even before glib 2.28.0.
   /** Finish an asynchronous call started by read_until_async().
    *
    * @param result The AsyncResult that was provided to the callback slot.
@@ -173,9 +205,64 @@ public:
   bool read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
   _IGNORE(g_data_input_stream_read_until_finish)
 
+
+ /** Reads a string from the data input stream, up to the first
+   * occurrence of any of the stop characters.
+   *
+   * In contrast to read_until(), this method
+   * does <emphasis>not</emphasis> consume the stop character. You have
+   * to use read_byte() to get it before calling
+   * read_upto() again.
+   *
+   * @param data A string to fill with the read data.
+   * @param stop_chars Characters to terminate the read.
+   * @param cancellable A cancellable object.
+   * @result true if the read succeeded without error.
+   */
+  bool read_upto(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable);
+  _IGNORE(g_data_input_stream_read_upto)
+
+  /** A non-cancellable version of read_upto().
+   * @param stop_chars Characters to terminate the read.
+   * @param data A string to fill with the read data.
+   * @result true if the read succeeded without error.
+   */
+  bool read_upto(std::string& data, const std::string& stop_chars);
+
+  //TODO: Add a version that takes the stop_chars length, to allow a 0 in the middle?
+
+  /** The asynchronous version of read_upto(). It is
+   * an error to have two outstanding calls to this function.
+   *
+   * In contrast to read_until(), this method
+   * does <emphasis>not</emphasis> consume the stop character. You have
+   * to use read_byte() to get it before calling
+   * read_upto() again.
+   *
+   * @param stop_chars Characters to terminate the read.
+   * @param slot The slot to call when the request is satisfied.
+   * @param cancellable A cancellable object.
+   * @param io_priority The I/O priority of the request.
+   * @result true if the read succeeded without error.
+   */
+  void read_upto_async(const std::string& stop_chars, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
+  _IGNORE(g_data_input_stream_read_upto_async)
+
+  /** Finish an asynchronous call started by read_upto_async().
+   *
+   * Note that this function does <emphasis>not</emphasis> consume the
+   * stop character. You have to use read_byte() to
+   * get it before calling read_upto_async() again.
+   *
+   * @param result The AsyncResult that was provided to the callback slot.
+   * @param data A string to fill with the read data.
+   * @result true if the read succeeded without error.
+   */
+  bool read_upto_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
+  _IGNORE(g_data_input_stream_read_upto_finish)
+
   _WRAP_PROPERTY("byte-order", DataStreamByteOrder)
   _WRAP_PROPERTY("newline-type", DataStreamNewlineType)
 };
 
 } // namespace Gio
-
diff --git a/gio/src/gio_methods.defs b/gio/src/gio_methods.defs
index 695fb30..9552ab2 100644
--- a/gio/src/gio_methods.defs
+++ b/gio/src/gio_methods.defs
@@ -249,6 +249,13 @@
   (gtype-id "G_TYPE_FILE_OUTPUT_STREAM")
 )
 
+(define-object c
+  (in-module "GPeriodi")
+  (parent "GObject")
+  (c-name "GPeriodic")
+  (gtype-id "G_TYPE_PERIODIC")
+)
+
 (define-object n
   (in-module "GPermissio")
   (parent "GObject")
@@ -1047,12 +1054,13 @@
   )
 )
 
-(define-enum SignalFlags
+(define-flags SignalFlags
   (in-module "GDBus")
   (c-name "GDBusSignalFlags")
   (gtype-id "G_TYPE_D_BUS_SIGNAL_FLAGS")
   (values
     '("none" "G_DBUS_SIGNAL_FLAGS_NONE")
+    '("no-match-rule" "G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE")
   )
 )
 
@@ -1097,6 +1105,7 @@
     '("is-launcher" "G_APPLICATION_IS_LAUNCHER")
     '("handles-open" "G_APPLICATION_HANDLES_OPEN")
     '("handles-command-line" "G_APPLICATION_HANDLES_COMMAND_LINE")
+    '("send-environment" "G_APPLICATION_SEND_ENVIRONMENT")
   )
 )
 
@@ -1575,20 +1584,22 @@
   (return-type "GType")
 )
 
-(define-method get_argc_argv
+(define-method get_arguments
   (of-object "GApplicationCommandLine")
-  (c-name "g_application_command_line_get_argc_argv")
-  (return-type "none")
+  (c-name "g_application_command_line_get_arguments")
+  (return-type "gchar**")
   (parameters
     '("int*" "argc")
-    '("char***" "argv")
   )
 )
 
-(define-method get_arguments
+(define-method getenv
   (of-object "GApplicationCommandLine")
-  (c-name "g_application_command_line_get_arguments")
-  (return-type "GVariant*")
+  (c-name "g_application_command_line_getenv")
+  (return-type "const-gchar*")
+  (parameters
+    '("const-gchar*" "name")
+  )
 )
 
 (define-method get_cwd
@@ -1597,29 +1608,12 @@
   (return-type "const-gchar*")
 )
 
-(define-method get_cwd_variant
-  (of-object "GApplicationCommandLine")
-  (c-name "g_application_command_line_get_cwd_variant")
-  (return-type "GVariant*")
-)
-
 (define-method get_is_remote
   (of-object "GApplicationCommandLine")
   (c-name "g_application_command_line_get_is_remote")
   (return-type "gboolean")
 )
 
-(define-method output
-  (of-object "GApplicationCommandLine")
-  (c-name "g_application_command_line_output")
-  (return-type "none")
-  (parameters
-    '("gint" "fd")
-    '("gconstpointer" "buffer")
-    '("gssize" "length")
-  )
-)
-
 (define-method print
   (of-object "GApplicationCommandLine")
   (c-name "g_application_command_line_print")
@@ -1787,7 +1781,7 @@
   (c-name "g_application_open")
   (return-type "none")
   (parameters
-    '("GFile**" "file")
+    '("GFile**" "files")
     '("gint" "n_files")
     '("const-gchar*" "hint")
   )
@@ -1803,15 +1797,6 @@
   )
 )
 
-(define-method run_with_arguments
-  (of-object "GApplication")
-  (c-name "g_application_run_with_arguments")
-  (return-type "int")
-  (parameters
-    '("GVariant*" "arguments")
-  )
-)
-
 
 
 ;; From gasyncinitable.h
@@ -8909,6 +8894,85 @@
 
 
 
+;; From gperiodic.h
+
+(define-function g_periodic_get_type
+  (c-name "g_periodic_get_type")
+  (return-type "GType")
+)
+
+(define-function g_periodic_new
+  (c-name "g_periodic_new")
+  (is-constructor-of "GPeriodic")
+  (return-type "GPeriodic*")
+  (parameters
+    '("guint" "hz")
+    '("gint" "high_priority")
+    '("gint" "low_priority")
+  )
+)
+
+(define-method get_hz
+  (of-object "GPeriodic")
+  (c-name "g_periodic_get_hz")
+  (return-type "guint")
+)
+
+(define-method get_high_priority
+  (of-object "GPeriodic")
+  (c-name "g_periodic_get_high_priority")
+  (return-type "gint")
+)
+
+(define-method get_low_priority
+  (of-object "GPeriodic")
+  (c-name "g_periodic_get_low_priority")
+  (return-type "gint")
+)
+
+(define-method add
+  (of-object "GPeriodic")
+  (c-name "g_periodic_add")
+  (return-type "guint")
+  (parameters
+    '("GPeriodicTickFunc" "callback")
+    '("gpointer" "user_data")
+    '("GDestroyNotify" "notify")
+  )
+)
+
+(define-method remove
+  (of-object "GPeriodic")
+  (c-name "g_periodic_remove")
+  (return-type "none")
+  (parameters
+    '("guint" "tag")
+  )
+)
+
+(define-method block
+  (of-object "GPeriodic")
+  (c-name "g_periodic_block")
+  (return-type "none")
+)
+
+(define-method unblock
+  (of-object "GPeriodic")
+  (c-name "g_periodic_unblock")
+  (return-type "none")
+  (parameters
+    '("gint64" "unblock_time")
+  )
+)
+
+(define-method damaged
+  (of-object "GPeriodic")
+  (c-name "g_periodic_damaged")
+  (return-type "none")
+)
+
+
+
 ;; From gpermission.h
 
 (define-function g_permission_get_type
@@ -9954,6 +10018,17 @@
     '("GObject*" "source_object")
     '("GAsyncReadyCallback" "callback")
     '("gpointer" "user_data")
+    '("const-GError*" "error")
+  )
+)
+
+(define-function g_simple_async_result_new_take_error
+  (c-name "g_simple_async_result_new_take_error")
+  (return-type "GSimpleAsyncResult*")
+  (parameters
+    '("GObject*" "source_object")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
     '("GError*" "error")
   )
 )
@@ -10051,6 +10126,15 @@
   )
 )
 
+(define-method take_error
+  (of-object "GSimpleAsyncResult")
+  (c-name "g_simple_async_result_take_error")
+  (return-type "none")
+  (parameters
+    '("GError*" "error")
+  )
+)
+
 (define-method propagate_error
   (of-object "GSimpleAsyncResult")
   (c-name "g_simple_async_result_propagate_error")
@@ -10115,6 +10199,17 @@
     '("GObject*" "object")
     '("GAsyncReadyCallback" "callback")
     '("gpointer" "user_data")
+    '("const-GError*" "error")
+  )
+)
+
+(define-function g_simple_async_report_take_gerror_in_idle
+  (c-name "g_simple_async_report_take_gerror_in_idle")
+  (return-type "none")
+  (parameters
+    '("GObject*" "object")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
     '("GError*" "error")
   )
 )
diff --git a/gio/src/settings.hg b/gio/src/settings.hg
index 838ffd4..231e0f8 100644
--- a/gio/src/settings.hg
+++ b/gio/src/settings.hg
@@ -32,7 +32,7 @@ namespace Gio
  * The Settings class provides a convenient API for storing and retrieving
  * application settings.
  *
- * @newin{2,26}
+ * @newin{2,28}
  */
 class Settings : public Glib::Object
 {
@@ -50,11 +50,17 @@ public:
   _WRAP_CREATE(const Glib::ustring& schema, const Glib::RefPtr<SettingsBackend>& backend)
   _WRAP_CREATE(const Glib::ustring& schema, const Glib::RefPtr<SettingsBackend>& backend, const Glib::ustring& path)
 
-  // FIXME: implement the GVariant stuff
-
   _WRAP_METHOD(bool set_value(const Glib::ustring& key, const Glib::VariantBase& value),  g_settings_set_value)
 
-  /** TODO: Documentation.
+  /** TODO: Gets the value that is stored in the settings for a @key.
+   *
+   * It is a programmer error to give a @a key that isn't contained in the
+   * schema for the settings.
+   *
+   * @param  key The key to get the value for.
+   * @param A Variant of the expected type.
+   *
+   * @newin{2,28}
    */
   void get_value(const Glib::ustring& key, Glib::VariantBase& value) const;
   _IGNORE(g_settings_get_value)
@@ -96,18 +102,17 @@ public:
 
   _WRAP_METHOD(Glib::StringArrayHandle list_children() const, g_settings_list_children)
   _WRAP_METHOD(Glib::StringArrayHandle list_keys() const, g_settings_list_keys)
+  //TODO: Choose an appropriate Variant template type: GVariant* g_settings_get_range(const gchar* key)
 
-  //Not implemented. See https://bugzilla.gnome.org/show_bug.cgi?id=629621
-  //_WRAP_METHOD(bool get_destroyed() const, g_settings_get_destroyed)
-
+  _WRAP_METHOD(bool range_check(const Glib::ustring& key, const Glib::VariantBase& value) const, g_settings_range_check)
 
 #m4 _CONVERSION(`Glib::ObjectBase*',`gpointer',(gpointer)$3->gobj())
   _WRAP_METHOD(void bind(const Glib::ustring& key, Glib::ObjectBase* object, const Glib::ustring& property, SettingsBindFlags flags=SETTINGS_BIND_DEFAULT), g_settings_bind)
   void bind(const Glib::ustring& key, const Glib::PropertyProxy_Base& property_proxy, SettingsBindFlags flags=SETTINGS_BIND_DEFAULT);
-  // FIXME: implement bind_with_mapping
+  // TODO: implement bind_with_mapping
   _WRAP_METHOD(void bind_writable(const Glib::ustring& key, Glib::ObjectBase* object, const Glib::ustring& property, bool inverted=false), g_settings_bind_writable)
   void bind_writable(const Glib::ustring& key, const Glib::PropertyProxy_Base& property_proxy, bool inverted=false);
-  // FIXME: unbind is not actually a class method
+  // TODO: unbind is not actually a class method
 
   //TODO?: _WRAP_SIGNAL(bool change_event(const Glib::ArrayHandle<Glib::QueryQuark>& keys, int n_keys), "change-event")
 
diff --git a/gio/src/socketclient.ccg b/gio/src/socketclient.ccg
index ff22b62..b4456b5 100644
--- a/gio/src/socketclient.ccg
+++ b/gio/src/socketclient.ccg
@@ -139,7 +139,6 @@ Glib::RefPtr<SocketConnection> SocketClient::connect(const Glib::RefPtr<SocketCo
     ::Glib::Error::throw_exception(gerror);
 
   return retvalue;
-
 }
 
 Glib::RefPtr<SocketConnection> SocketClient::connect_to_host(const Glib::ustring& host_and_port, guint16 default_port)
@@ -150,7 +149,6 @@ Glib::RefPtr<SocketConnection> SocketClient::connect_to_host(const Glib::ustring
     ::Glib::Error::throw_exception(gerror);
 
   return retvalue;
-
 }
 
 Glib::RefPtr<SocketConnection> SocketClient::connect_to_service(const Glib::ustring& domain, const Glib::ustring& service)
@@ -161,7 +159,50 @@ Glib::RefPtr<SocketConnection> SocketClient::connect_to_service(const Glib::ustr
     ::Glib::Error::throw_exception(gerror);
 
   return retvalue;
+}
+
+Glib::RefPtr<SocketConnection> SocketClient::connect_to_uri(const Glib::ustring& uri, guint16 default_port)
+{
+  GError* gerror = 0;
+  Glib::RefPtr<SocketConnection> retvalue = Glib::wrap(g_socket_client_connect_to_uri(gobj(), uri.c_str(), default_port, 0, &(gerror)));
+  if(gerror)
+    ::Glib::Error::throw_exception(gerror);
 
+  return retvalue;
 }
 
+void
+SocketClient::connect_to_uri_async(const Glib::ustring& uri, guint16 default_port,
+                                       const Glib::RefPtr<Cancellable>& cancellable,
+                                       const SlotAsyncReady& slot)
+{
+  // Create a copy of the slot.
+  // A pointer to it will be passed through the callback's data parameter
+  // and deleted in the callback.
+  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+  g_socket_client_connect_to_uri_async (gobj(),
+    uri.c_str(), default_port,
+    Glib::unwrap(cancellable),
+    &SignalProxy_async_callback,
+    slot_copy);
+}
+
+void
+SocketClient::connect_to_uri_async(const Glib::ustring& uri, guint16 default_port,
+                                       const SlotAsyncReady& slot)
+{
+  // Create a copy of the slot.
+  // A pointer to it will be passed through the callback's data parameter
+  // and deleted in the callback.
+  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+  g_socket_client_connect_to_uri_async (gobj(),
+    uri.c_str(), default_port,
+    0,
+    &SignalProxy_async_callback,
+    slot_copy);
+}
+
+
 } // namespace Gio
diff --git a/gio/src/socketclient.hg b/gio/src/socketclient.hg
index 24b7f78..6c7a862 100644
--- a/gio/src/socketclient.hg
+++ b/gio/src/socketclient.hg
@@ -79,6 +79,11 @@ Glib::RefPtr<SocketConnection> connect(const Glib::RefPtr<SocketConnectable>& co
   _WRAP_METHOD(Glib::RefPtr<SocketConnection> connect_to_service(const Glib::ustring& domain, const Glib::ustring& service, const Glib::RefPtr<Cancellable>& cancellable), g_socket_client_connect_to_service, errthrow)
 Glib::RefPtr<SocketConnection> connect_to_service(const Glib::ustring& domain, const Glib::ustring& service);
 
+  _WRAP_METHOD(Glib::RefPtr<SocketConnection> connect_to_uri(const Glib::ustring& uri, guint16 default_port, const Glib::RefPtr<Cancellable>& cancellable), g_socket_client_connect_to_uri, errthrow)
+
+  //TODO: Documentation
+  Glib::RefPtr<SocketConnection> connect_to_uri(const Glib::ustring& uri, guint16 default_port);
+
   _WRAP_METHOD_DOCS_ONLY(g_socket_client_connect_async)
   void connect_async(const Glib::RefPtr<SocketConnectable>& connectable, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
 
@@ -98,6 +103,7 @@ Glib::RefPtr<SocketConnection> connect_to_service(const Glib::ustring& domain, c
 
   _WRAP_METHOD(Glib::RefPtr<SocketConnection> connect_to_host_finish(const Glib::RefPtr<AsyncResult>& result), g_socket_client_connect_to_host_finish, errthrow)
 
+
   _WRAP_METHOD_DOCS_ONLY(g_socket_client_connect_to_service_async)
   void connect_to_service_async(const Glib::ustring& domain, const Glib::ustring& service, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
 
@@ -107,6 +113,17 @@ Glib::RefPtr<SocketConnection> connect_to_service(const Glib::ustring& domain, c
 
   _WRAP_METHOD(Glib::RefPtr<SocketConnection> connect_to_service_finish(const Glib::RefPtr<AsyncResult>& result), g_socket_client_connect_to_service_finish, errthrow)
 
+
+  _WRAP_METHOD_DOCS_ONLY(g_socket_client_connect_to_uri_async)
+  void connect_to_uri_async(const Glib::ustring& uri, guint16 default_port, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot);
+
+  //TODO: Documentation
+  void connect_to_uri_async(const Glib::ustring& uri, guint16 default_port, const SlotAsyncReady& slot);
+  _IGNORE(g_socket_client_connect_to_uri_async)
+
+  _WRAP_METHOD(Glib::RefPtr<SocketConnection> connect_to_uri_finish(const Glib::RefPtr<AsyncResult>& result), g_socket_client_connect_to_uri_finish, errthrow)
+
+
   _WRAP_METHOD(bool get_enable_proxy() const, g_socket_client_get_enable_proxy)
   _WRAP_METHOD(void set_enable_proxy(bool enable), g_socket_client_set_enable_proxy)
 
diff --git a/gio/src/unixsocketaddress.hg b/gio/src/unixsocketaddress.hg
index 68c0e6e..0418f25 100644
--- a/gio/src/unixsocketaddress.hg
+++ b/gio/src/unixsocketaddress.hg
@@ -74,8 +74,7 @@ public:
 
  _WRAP_METHOD(UnixSocketAddressType get_address_type() const, g_unix_socket_address_get_address_type)
  _WRAP_METHOD(std::string get_path() const, g_unix_socket_address_get_path)
-
- //TODO?: _WRAP_METHOD(gszie get_path_len() const, g_unix_socket_address_get_path_len)
+ _IGNORE(g_unix_socket_address_get_path_len)
 
  _WRAP_METHOD(static bool abstract_names_supported(), g_unix_socket_address_abstract_names_supported)
 
diff --git a/glib/src/glib_functions.defs b/glib/src/glib_functions.defs
index 9f42377..b420e94 100644
--- a/glib/src/glib_functions.defs
+++ b/glib/src/glib_functions.defs
@@ -635,6 +635,17 @@
 )
 
 (define-enum Type
+  (in-module "GTime")
+  (c-name "GTimeType")
+  (gtype-id "G_TYPE_TIME_TYPE")
+  (values
+    '("standard" "G_TIME_TYPE_STANDARD")
+    '("daylight" "G_TIME_TYPE_DAYLIGHT")
+    '("universal" "G_TIME_TYPE_UNIVERSAL")
+  )
+)
+
+(define-enum Type
   (in-module "GUnicode")
   (c-name "GUnicodeType")
   (gtype-id "G_TYPE_UNICODE_TYPE")
@@ -2306,20 +2317,6 @@
   (return-type "gint")
 )
 
-(define-function g_convert
-  (c-name "g_convert")
-  (return-type "gchar*")
-  (parameters
-    '("const-gchar*" "str")
-    '("gssize" "len")
-    '("const-gchar*" "to_codeset")
-    '("const-gchar*" "from_codeset")
-    '("gsize*" "bytes_read")
-    '("gsize*" "bytes_written")
-    '("GError**" "error")
-  )
-)
-
 (define-function g_convert_with_iconv
   (c-name "g_convert_with_iconv")
   (return-type "gchar*")
@@ -2976,65 +2973,10 @@
 
 ;; From gdatetime.h
 
-(define-function g_date_time_new_now
-  (c-name "g_date_time_new_now")
-  (return-type "GDateTime*")
-)
-
-(define-function g_date_time_new_today
-  (c-name "g_date_time_new_today")
-  (return-type "GDateTime*")
-)
-
-(define-function g_date_time_new_utc_now
-  (c-name "g_date_time_new_utc_now")
-  (return-type "GDateTime*")
-)
-
-(define-function g_date_time_new_from_date
-  (c-name "g_date_time_new_from_date")
-  (return-type "GDateTime*")
-  (parameters
-    '("gint" "year")
-    '("gint" "month")
-    '("gint" "day")
-  )
-)
-
-(define-function g_date_time_new_from_epoch
-  (c-name "g_date_time_new_from_epoch")
-  (return-type "GDateTime*")
-  (parameters
-    '("gint64" "secs")
-  )
-)
-
-(define-function g_date_time_new_from_timeval
-  (c-name "g_date_time_new_from_timeval")
-  (return-type "GDateTime*")
-  (parameters
-    '("GTimeVal*" "tv")
-  )
-)
-
-(define-function g_date_time_new_full
-  (c-name "g_date_time_new_full")
-  (return-type "GDateTime*")
-  (parameters
-    '("gint" "year")
-    '("gint" "month")
-    '("gint" "day")
-    '("gint" "hour")
-    '("gint" "minute")
-    '("gint" "second")
-    '("const-gchar*" "time_zone")
-  )
-)
-
-(define-method copy
+(define-method unref
   (of-object "GDateTime")
-  (c-name "g_date_time_copy")
-  (return-type "GDateTime*")
+  (c-name "g_date_time_unref")
+  (return-type "none")
 )
 
 (define-method ref
@@ -3043,113 +2985,97 @@
   (return-type "GDateTime*")
 )
 
-(define-method unref
-  (of-object "GDateTime")
-  (c-name "g_date_time_unref")
-  (return-type "none")
-)
-
-(define-method add
-  (of-object "GDateTime")
-  (c-name "g_date_time_add")
+(define-function g_date_time_new_now
+  (c-name "g_date_time_new_now")
   (return-type "GDateTime*")
   (parameters
-    '("GTimeSpan" "timespan")
+    '("GTimeZone*" "tz")
   )
 )
 
-(define-method add_days
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_days")
+(define-function g_date_time_new_now_local
+  (c-name "g_date_time_new_now_local")
   (return-type "GDateTime*")
-  (parameters
-    '("gint" "days")
-  )
 )
 
-(define-method add_hours
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_hours")
+(define-function g_date_time_new_now_utc
+  (c-name "g_date_time_new_now_utc")
   (return-type "GDateTime*")
-  (parameters
-    '("gint" "hours")
-  )
 )
 
-(define-method add_milliseconds
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_milliseconds")
+(define-function g_date_time_new_from_unix_local
+  (c-name "g_date_time_new_from_unix_local")
   (return-type "GDateTime*")
   (parameters
-    '("gint" "milliseconds")
+    '("gint64" "t")
   )
 )
 
-(define-method add_minutes
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_minutes")
+(define-function g_date_time_new_from_unix_utc
+  (c-name "g_date_time_new_from_unix_utc")
   (return-type "GDateTime*")
   (parameters
-    '("gint" "minutes")
+    '("gint64" "t")
   )
 )
 
-(define-method add_months
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_months")
+(define-function g_date_time_new_from_timeval_local
+  (c-name "g_date_time_new_from_timeval_local")
   (return-type "GDateTime*")
   (parameters
-    '("gint" "months")
+    '("const-GTimeVal*" "tv")
   )
 )
 
-(define-method add_seconds
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_seconds")
+(define-function g_date_time_new_from_timeval_utc
+  (c-name "g_date_time_new_from_timeval_utc")
   (return-type "GDateTime*")
   (parameters
-    '("gint" "seconds")
+    '("const-GTimeVal*" "tv")
   )
 )
 
-(define-method add_weeks
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_weeks")
+(define-function g_date_time_new
+  (c-name "g_date_time_new")
+  (is-constructor-of "GDateTime")
   (return-type "GDateTime*")
   (parameters
-    '("gint" "weeks")
+    '("GTimeZone*" "tz")
+    '("gint" "year")
+    '("gint" "month")
+    '("gint" "day")
+    '("gint" "hour")
+    '("gint" "minute")
+    '("gdouble" "seconds")
   )
 )
 
-(define-method add_years
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_years")
+(define-function g_date_time_new_local
+  (c-name "g_date_time_new_local")
   (return-type "GDateTime*")
   (parameters
-    '("gint" "years")
+    '("gint" "year")
+    '("gint" "month")
+    '("gint" "day")
+    '("gint" "hour")
+    '("gint" "minute")
+    '("gdouble" "seconds")
   )
 )
 
-(define-method add_full
-  (of-object "GDateTime")
-  (c-name "g_date_time_add_full")
+(define-function g_date_time_new_utc
+  (c-name "g_date_time_new_utc")
   (return-type "GDateTime*")
   (parameters
-    '("gint" "years")
-    '("gint" "months")
-    '("gint" "days")
-    '("gint" "hours")
-    '("gint" "minutes")
-    '("gint" "seconds")
+    '("gint" "year")
+    '("gint" "month")
+    '("gint" "day")
+    '("gint" "hour")
+    '("gint" "minute")
+    '("gdouble" "seconds")
   )
 )
 
-(define-method day
-  (of-object "GDateTime")
-  (c-name "g_date_time_day")
-  (return-type "GDateTime*")
-)
-
 (define-function g_date_time_compare
   (c-name "g_date_time_compare")
   (return-type "gint")
@@ -3159,12 +3085,12 @@
   )
 )
 
-(define-function g_date_time_equal
-  (c-name "g_date_time_equal")
-  (return-type "gboolean")
+(define-method difference
+  (of-object "GDateTime")
+  (c-name "g_date_time_difference")
+  (return-type "GTimeSpan")
   (parameters
-    '("gconstpointer" "dt1")
-    '("gconstpointer" "dt2")
+    '("GDateTime*" "begin")
   )
 )
 
@@ -3176,55 +3102,53 @@
   )
 )
 
-(define-method difference
-  (of-object "GDateTime")
-  (c-name "g_date_time_difference")
-  (return-type "GTimeSpan")
+(define-function g_date_time_equal
+  (c-name "g_date_time_equal")
+  (return-type "gboolean")
   (parameters
-    '("const-GDateTime*" "end")
+    '("gconstpointer" "dt1")
+    '("gconstpointer" "dt2")
   )
 )
 
-(define-method get_julian
+(define-method get_ymd
   (of-object "GDateTime")
-  (c-name "g_date_time_get_julian")
+  (c-name "g_date_time_get_ymd")
   (return-type "none")
   (parameters
-    '("gint*" "period")
-    '("gint*" "julian")
-    '("gint*" "hour")
-    '("gint*" "minute")
-    '("gint*" "second")
+    '("gint*" "year")
+    '("gint*" "month")
+    '("gint*" "day")
   )
 )
 
-(define-method get_hour
+(define-method get_year
   (of-object "GDateTime")
-  (c-name "g_date_time_get_hour")
+  (c-name "g_date_time_get_year")
   (return-type "gint")
 )
 
-(define-method get_minute
+(define-method get_month
   (of-object "GDateTime")
-  (c-name "g_date_time_get_minute")
+  (c-name "g_date_time_get_month")
   (return-type "gint")
 )
 
-(define-method get_second
+(define-method get_day_of_month
   (of-object "GDateTime")
-  (c-name "g_date_time_get_second")
+  (c-name "g_date_time_get_day_of_month")
   (return-type "gint")
 )
 
-(define-method get_millisecond
+(define-method get_week_numbering_year
   (of-object "GDateTime")
-  (c-name "g_date_time_get_millisecond")
+  (c-name "g_date_time_get_week_numbering_year")
   (return-type "gint")
 )
 
-(define-method get_microsecond
+(define-method get_week_of_year
   (of-object "GDateTime")
-  (c-name "g_date_time_get_microsecond")
+  (c-name "g_date_time_get_week_of_year")
   (return-type "gint")
 )
 
@@ -3234,44 +3158,54 @@
   (return-type "gint")
 )
 
-(define-method get_day_of_month
+(define-method get_day_of_year
   (of-object "GDateTime")
-  (c-name "g_date_time_get_day_of_month")
+  (c-name "g_date_time_get_day_of_year")
   (return-type "gint")
 )
 
-(define-method get_week_of_year
+(define-method get_hour
   (of-object "GDateTime")
-  (c-name "g_date_time_get_week_of_year")
+  (c-name "g_date_time_get_hour")
   (return-type "gint")
 )
 
-(define-method get_day_of_year
+(define-method get_minute
   (of-object "GDateTime")
-  (c-name "g_date_time_get_day_of_year")
+  (c-name "g_date_time_get_minute")
   (return-type "gint")
 )
 
-(define-method get_month
+(define-method get_second
   (of-object "GDateTime")
-  (c-name "g_date_time_get_month")
+  (c-name "g_date_time_get_second")
   (return-type "gint")
 )
 
-(define-method get_year
+(define-method get_microsecond
   (of-object "GDateTime")
-  (c-name "g_date_time_get_year")
+  (c-name "g_date_time_get_microsecond")
   (return-type "gint")
 )
 
-(define-method get_dmy
+(define-method get_seconds
   (of-object "GDateTime")
-  (c-name "g_date_time_get_dmy")
-  (return-type "none")
+  (c-name "g_date_time_get_seconds")
+  (return-type "gdouble")
+)
+
+(define-method to_unix
+  (of-object "GDateTime")
+  (c-name "g_date_time_to_unix")
+  (return-type "gint64")
+)
+
+(define-method to_timeval
+  (of-object "GDateTime")
+  (c-name "g_date_time_to_timeval")
+  (return-type "gboolean")
   (parameters
-    '("gint*" "day")
-    '("gint*" "month")
-    '("gint*" "year")
+    '("GTimeVal*" "tv")
   )
 )
 
@@ -3281,43 +3215,31 @@
   (return-type "GTimeSpan")
 )
 
-(define-method get_timezone_name
+(define-method get_timezone_abbreviation
   (of-object "GDateTime")
-  (c-name "g_date_time_get_timezone_name")
+  (c-name "g_date_time_get_timezone_abbreviation")
   (return-type "const-gchar*")
 )
 
-(define-method is_leap_year
-  (of-object "GDateTime")
-  (c-name "g_date_time_is_leap_year")
-  (return-type "gboolean")
-)
-
 (define-method is_daylight_savings
   (of-object "GDateTime")
   (c-name "g_date_time_is_daylight_savings")
   (return-type "gboolean")
 )
 
-(define-method to_local
+(define-method to_timezone
   (of-object "GDateTime")
-  (c-name "g_date_time_to_local")
+  (c-name "g_date_time_to_timezone")
   (return-type "GDateTime*")
+  (parameters
+    '("GTimeZone*" "tz")
+  )
 )
 
-(define-method to_epoch
-  (of-object "GDateTime")
-  (c-name "g_date_time_to_epoch")
-  (return-type "gint64")
-)
-
-(define-method to_timeval
+(define-method to_local
   (of-object "GDateTime")
-  (c-name "g_date_time_to_timeval")
-  (return-type "none")
-  (parameters
-    '("GTimeVal*" "tv")
-  )
+  (c-name "g_date_time_to_local")
+  (return-type "GDateTime*")
 )
 
 (define-method to_utc
@@ -3326,9 +3248,9 @@
   (return-type "GDateTime*")
 )
 
-(define-method printf
+(define-method format
   (of-object "GDateTime")
-  (c-name "g_date_time_printf")
+  (c-name "g_date_time_format")
   (return-type "gchar*")
   (parameters
     '("const-gchar*" "format")
@@ -5099,6 +5021,15 @@
   (return-type "none")
 )
 
+(define-method free_full
+  (of-object "GList")
+  (c-name "g_list_free_full")
+  (return-type "none")
+  (parameters
+    '("GDestroyNotify" "free_func")
+  )
+)
+
 (define-method append
   (of-object "GList")
   (c-name "g_list_append")
@@ -5758,6 +5689,12 @@
   )
 )
 
+(define-method get_time
+  (of-object "GSource")
+  (c-name "g_source_get_time")
+  (return-type "gint64")
+)
+
 (define-function g_idle_source_new
   (c-name "g_idle_source_new")
   (is-constructor-of "GIdleSource")
@@ -5798,6 +5735,16 @@
   )
 )
 
+(define-function g_get_monotonic_time
+  (c-name "g_get_monotonic_time")
+  (return-type "gint64")
+)
+
+(define-function g_get_real_time
+  (c-name "g_get_real_time")
+  (return-type "gint64")
+)
+
 (define-function g_source_remove
   (c-name "g_source_remove")
   (return-type "gboolean")
@@ -5917,6 +5864,28 @@
   )
 )
 
+(define-method invoke_full
+  (of-object "GMainContext")
+  (c-name "g_main_context_invoke_full")
+  (return-type "none")
+  (parameters
+    '("gint" "priority")
+    '("GSourceFunc" "function")
+    '("gpointer" "data")
+    '("GDestroyNotify" "notify")
+  )
+)
+
+(define-method invoke
+  (of-object "GMainContext")
+  (c-name "g_main_context_invoke")
+  (return-type "none")
+  (parameters
+    '("GSourceFunc" "function")
+    '("gpointer" "data")
+  )
+)
+
 
 
 ;; From gmappedfile.h
@@ -6005,7 +5974,7 @@
   (c-name "g_markup_parse_context_push")
   (return-type "none")
   (parameters
-    '("GMarkupParser*" "parser")
+    '("const-GMarkupParser*" "parser")
     '("gpointer" "user_data")
   )
 )
@@ -8631,6 +8600,15 @@
   (return-type "none")
 )
 
+(define-method free_full
+  (of-object "GSList")
+  (c-name "g_slist_free_full")
+  (return-type "none")
+  (parameters
+    '("GDestroyNotify" "free_func")
+  )
+)
+
 (define-method append
   (of-object "GSList")
   (c-name "g_slist_append")
@@ -10768,6 +10746,88 @@
 
 
 
+;; From gtimezone.h
+
+(define-function g_time_zone_new
+  (c-name "g_time_zone_new")
+  (is-constructor-of "GTimeZone")
+  (return-type "GTimeZone*")
+  (parameters
+    '("const-gchar*" "identifier")
+  )
+)
+
+(define-function g_time_zone_new_utc
+  (c-name "g_time_zone_new_utc")
+  (return-type "GTimeZone*")
+)
+
+(define-function g_time_zone_new_local
+  (c-name "g_time_zone_new_local")
+  (return-type "GTimeZone*")
+)
+
+(define-method ref
+  (of-object "GTimeZone")
+  (c-name "g_time_zone_ref")
+  (return-type "GTimeZone*")
+)
+
+(define-method unref
+  (of-object "GTimeZone")
+  (c-name "g_time_zone_unref")
+  (return-type "none")
+)
+
+(define-method find_interval
+  (of-object "GTimeZone")
+  (c-name "g_time_zone_find_interval")
+  (return-type "gint")
+  (parameters
+    '("GTimeType" "type")
+    '("gint64" "time")
+  )
+)
+
+(define-method adjust_time
+  (of-object "GTimeZone")
+  (c-name "g_time_zone_adjust_time")
+  (return-type "gint")
+  (parameters
+    '("GTimeType" "type")
+    '("gint64*" "time")
+  )
+)
+
+(define-method get_abbreviation
+  (of-object "GTimeZone")
+  (c-name "g_time_zone_get_abbreviation")
+  (return-type "const-gchar*")
+  (parameters
+    '("gint" "interval")
+  )
+)
+
+(define-method get_offset
+  (of-object "GTimeZone")
+  (c-name "g_time_zone_get_offset")
+  (return-type "gint32")
+  (parameters
+    '("gint" "interval")
+  )
+)
+
+(define-method is_dst
+  (of-object "GTimeZone")
+  (c-name "g_time_zone_is_dst")
+  (return-type "gboolean")
+  (parameters
+    '("gint" "interval")
+  )
+)
+
+
+
 ;; From gtree.h
 
 (define-function g_tree_new
@@ -11522,10 +11582,15 @@
   (c-name "g_win32_get_system_data_dirs_for_module")
   (return-type "const-gchar**")
   (parameters
-    '("somefunc" "address_of_function")
+    '("somepointer" "address_of_function")
   )
 )
 
+(define-function g_get_user_runtime_dir
+  (c-name "g_get_user_runtime_dir")
+  (return-type "const-gchar*")
+)
+
 (define-function g_get_language_names
   (c-name "g_get_language_names")
   (return-type "const-gchar**")
@@ -11655,6 +11720,11 @@
   (return-type "gchar**")
 )
 
+(define-function g_get_environ
+  (c-name "g_get_environ")
+  (return-type "gchar**")
+)
+
 (define-function g_atexit
   (c-name "g_atexit")
   (return-type "none")
@@ -12098,6 +12168,27 @@
   )
 )
 
+(define-method lookup
+  (of-object "GVariant")
+  (c-name "g_variant_lookup")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("const-gchar*" "format_string")
+  )
+  (varargs #t)
+)
+
+(define-method lookup_value
+  (of-object "GVariant")
+  (c-name "g_variant_lookup_value")
+  (return-type "GVariant*")
+  (parameters
+    '("const-gchar*" "key")
+    '("const-GVariantType*" "type")
+  )
+)
+
 (define-method get_fixed_array
   (of-object "GVariant")
   (c-name "g_variant_get_fixed_array")
diff --git a/glib/src/gobject_functions.defs b/glib/src/gobject_functions.defs
index bd373df..d821cef 100644
--- a/glib/src/gobject_functions.defs
+++ b/glib/src/gobject_functions.defs
@@ -686,6 +686,16 @@
   )
 )
 
+(define-method install_properties
+  (of-object "GObjectClass")
+  (c-name "g_object_class_install_properties")
+  (return-type "none")
+  (parameters
+    '("guint" "n_pspecs")
+    '("GParamSpec**" "pspecs")
+  )
+)
+
 (define-function g_object_interface_install_property
   (c-name "g_object_interface_install_property")
   (return-type "none")
@@ -1134,6 +1144,14 @@
   )
 )
 
+(define-function g_clear_object
+  (c-name "g_clear_object")
+  (return-type "none")
+  (parameters
+    '("volatile-GObject**" "object_ptr")
+  )
+)
+
 
 
 ;; From gparam.h
@@ -2088,6 +2106,17 @@
   )
 )
 
+(define-function g_signal_accumulator_first_wins
+  (c-name "g_signal_accumulator_first_wins")
+  (return-type "gboolean")
+  (parameters
+    '("GSignalInvocationHint*" "ihint")
+    '("GValue*" "return_accu")
+    '("const-GValue*" "handler_return")
+    '("gpointer" "dummy")
+  )
+)
+
 (define-function g_signal_handlers_destroy
   (c-name "g_signal_handlers_destroy")
   (return-type "none")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]