Imported Upstream version 2.43.2 upstream/2.43.2
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 06:48:13 +0000 (23:48 -0700)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 06:48:13 +0000 (23:48 -0700)
31 files changed:
NEWS
configure.ac
gio/src/action.hg
gio/src/cancellable.hg
gio/src/charsetconverter.hg
gio/src/file.hg
gio/src/filelist.am
gio/src/gio_docs.xml
gio/src/gio_enums.defs
gio/src/gio_methods.defs
gio/src/gio_signals.defs
gio/src/mount.hg
gio/src/networkmonitor.ccg [new file with mode: 0644]
gio/src/networkmonitor.hg [new file with mode: 0644]
gio/src/notification.hg
gio/src/simpleaction.hg
gio/src/socket.hg
gio/src/unixfdlist.ccg
gio/src/unixfdlist.hg
gio/src/unixfdmessage.ccg
gio/src/unixfdmessage.hg
glib/src/datetime.hg
glib/src/glib_docs.xml
glib/src/glib_docs_override.xml
glib/src/keyfile.hg
glib/src/variant.hg
tools/extra_defs_gen/generate_defs_gio.cc
tools/m4/convert_gio.m4
tools/m4/enum.m4
tools/pm/DocsParser.pm
tools/pm/Output.pm

diff --git a/NEWS b/NEWS
index 616f720..3b75041 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,20 @@
+2.43.2 (unstable):
+
+Gio:
+* Added NetworkMonitor.
+  (Murray Cumming)
+* UnixFDList, UnixFDMessage: Correct array lengths in steal_fds()
+  (Kjell Ahlstedt) Bug #741365 (Matthew Balkam)
+
+gmmproc:
+* Don't make one very long line for the enum documentation.
+  (Kjell Ahlstedt)
+* Improve the conversion of Since to @newin.
+  (Kjell Ahlstedt)
+* Add an empty line after @newin where it's missing
+  (Kjell Ahlstedt)
+
+
 2.43.1 (unstable):
 
 gmmproc:
index 6a22c4e..547e9ed 100644 (file)
@@ -15,7 +15,7 @@
 ## You should have received a copy of the GNU Lesser General Public License
 ## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([glibmm], [2.43.1],
+AC_INIT([glibmm], [2.43.2],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
         [glibmm], [http://www.gtkmm.org/])
 AC_PREREQ([2.59])
index 932ab8c..5e6dcf8 100644 (file)
@@ -119,6 +119,7 @@ public:
    * See get_state_hint().
    * 
    * @newin{2,38}
+   *
    * @param value The new state.
    */
   template <typename T_Value>
@@ -180,6 +181,7 @@ public:
    * Detailed action names can have three formats. See parse_detailed_name_variant().
    *
    * @newin{2,40}
+   *
    * @param detailed_name A detailed action name.
    * @param[out] action_name The action name.
    * @param[out] target_value The target value.
index 2fcd58b..886dc27 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -75,6 +73,7 @@ public:
    * See Cancellable::signal_cancelled() for details on how to use this.
    * 
    * @newin{2,22}
+   *
    * @param slot The slot to connect.
    * @return The id of the signal handler or 0 if @a cancellable has already
    * been cancelled.
index b4808c8..d5f8d87 100644 (file)
@@ -43,6 +43,7 @@ public:
   /** Creates a new CharsetConverter.
    * 
    * @newin{2,24}
+   *
    * @param to_charset Destination charset.
    * @param from_charset Source charset.
    * @return A new CharsetConverter, or <tt>0</tt> on error.
index 7df94c3..08e4ce8 100644 (file)
@@ -1052,7 +1052,7 @@ public:
                g_file_set_display_name_finish,
                errthrow)
 
-  //TODO: Remove the bool results from this and other methods that thrown an exception.
+  //TODO: Remove the bool results from this and other methods that throw an exception.
 
   /** Deletes a file.
    * If the file is a directory, it will only be deleted if it is empty.
index 8ce9dd5..17737fb 100644 (file)
@@ -87,6 +87,7 @@ giomm_files_any_hg =                  \
        mount.hg                        \
        mountoperation.hg               \
        networkaddress.hg               \
+       networkmonitor.hg               \
        networkservice.hg               \
        notification.hg         \
        outputstream.hg                 \
index 1ddcc56..c2d54f7 100644 (file)
@@ -4269,6 +4269,39 @@ file operations on the mount.
 </parameters>
 </enum>
 
+<enum name="GNetworkConnectivity">
+<description>
+The host's network connectivity state, as reported by #GNetworkMonitor.
+
+Since: 2.44
+
+</description>
+<parameters>
+<parameter name="G_NETWORK_CONNECTIVITY_LOCAL">
+<parameter_description> The host is not configured with a
+route to the Internet; it may or may not be connected to a local
+network.
+</parameter_description>
+</parameter>
+<parameter name="G_NETWORK_CONNECTIVITY_LIMITED">
+<parameter_description> The host is connected to a network, but
+does not appear to be able to reach the full Internet, perhaps
+due to upstream network problems.
+</parameter_description>
+</parameter>
+<parameter name="G_NETWORK_CONNECTIVITY_PORTAL">
+<parameter_description> The host is behind a captive portal and
+cannot reach the full Internet.
+</parameter_description>
+</parameter>
+<parameter name="G_NETWORK_CONNECTIVITY_FULL">
+<parameter_description> The host is connected to a network, and
+appears to be able to reach the full Internet.
+</parameter_description>
+</parameter>
+</parameters>
+</enum>
+
 <signal name="GNetworkMonitor::network-changed">
 <description>
 Emitted when the network configuration changes. If @available is
@@ -47835,6 +47868,42 @@ See g_network_monitor_can_reach_async().
 </return>
 </function>
 
+<function name="g_network_monitor_get_connectivity">
+<description>
+Gets a more detailed networking state than
+g_network_monitor_get_network_available().
+
+If #GNetworkMonitor:network-available is %FALSE, then the
+connectivity state will be %G_NETWORK_CONNECTIVITY_LOCAL.
+
+If #GNetworkMonitor:network-available is %TRUE, then the
+connectivity state will be %G_NETWORK_CONNECTIVITY_FULL (if there
+is full Internet connectivity), %G_NETWORK_CONNECTIVITY_LIMITED (if
+the host has a default route, but appears to be unable to actually
+reach the full Internet), or %G_NETWORK_CONNECTIVITY_PORTAL (if the
+host is trapped behind a &quot;captive portal&quot; that requires some sort
+of login or acknowledgement before allowing full Internet access).
+
+Note that in the case of %G_NETWORK_CONNECTIVITY_LIMITED and
+%G_NETWORK_CONNECTIVITY_PORTAL, it is possible that some sites are
+reachable but others are not. In this case, applications can
+attempt to connect to remote servers, but should gracefully fall
+back to their &quot;offline&quot; behavior if the connection attempt fails.
+
+Since: 2.44
+
+</description>
+<parameters>
+<parameter name="monitor">
+<parameter_description> the #GNetworkMonitor
+</parameter_description>
+</parameter>
+</parameters>
+<return> the network connectivity state
+
+</return>
+</function>
+
 <function name="g_network_monitor_get_default">
 <description>
 Gets the default #GNetworkMonitor for the system.
@@ -58407,6 +58476,78 @@ on error
 </return>
 </function>
 
+<function name="g_socket_send_messages">
+<description>
+Send multiple data messages from @socket in one go.  This is the most
+complicated and fully-featured version of this call. For easier use, see
+g_socket_send(), g_socket_send_to(), and g_socket_send_message().
+
+@messages must point to an array of #GOutputMessage structs and
+@num_messages must be the length of this array. Each #GOutputMessage
+contains an address to send the data to, and a pointer to an array of
+#GOutputVector structs to describe the buffers that the data to be sent
+for each message will be gathered from. Using multiple #GOutputVectors is
+more memory-efficient than manually copying data from multiple sources
+into a single buffer, and more network-efficient than making multiple
+calls to g_socket_send(). Sending multiple messages in one go avoids the
+overhead of making a lot of syscalls in scenarios where a lot of data
+packets need to be sent (e.g. high-bandwidth video streaming over RTP/UDP),
+or where the same data needs to be sent to multiple recipients.
+
+@flags modify how the message is sent. The commonly available arguments
+for this are available in the #GSocketMsgFlags enum, but the
+values there are the same as the system values, and the flags
+are passed in as-is, so you can pass in system-specific flags too.
+
+If the socket is in blocking mode the call will block until there is
+space for all the data in the socket queue. If there is no space available
+and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
+will be returned if no data was written at all, otherwise the number of
+messages sent will be returned. To be notified when space is available,
+wait for the %G_IO_OUT condition. Note though that you may still receive
+%G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
+notified of a %G_IO_OUT condition. (On Windows in particular, this is
+very common due to the way the underlying APIs work.)
+
+On error -1 is returned and @error is set accordingly.
+
+Since: 2.44
+
+</description>
+<parameters>
+<parameter name="socket">
+<parameter_description> a #GSocket
+</parameter_description>
+</parameter>
+<parameter name="messages">
+<parameter_description> an array of #GOutputMessage structs
+</parameter_description>
+</parameter>
+<parameter name="num_messages">
+<parameter_description> the number of elements in @messages
+</parameter_description>
+</parameter>
+<parameter name="flags">
+<parameter_description> an int containing #GSocketMsgFlags flags
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> a %GCancellable or %NULL
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> #GError for error reporting, or %NULL to ignore.
+</parameter_description>
+</parameter>
+</parameters>
+<return> number of messages sent, or -1 on error. Note that the number of
+messages sent may be smaller than @num_messages if the socket is
+non-blocking or if @num_messages was larger than UIO_MAXIOV (1024),
+in which case the caller may re-try to send the remaining messages.
+
+</return>
+</function>
+
 <function name="g_socket_send_to">
 <description>
 Tries to send @size bytes from @buffer to @address. If @address is
index 141c1b6..0e68617 100644 (file)
   )
 )
 
+;; Original typedef:
+;; typedef enum {
+;;   G_NETWORK_CONNECTIVITY_LOCAL       = 1,
+;;   G_NETWORK_CONNECTIVITY_LIMITED     = 2,
+;;   G_NETWORK_CONNECTIVITY_PORTAL      = 3,
+;;   G_NETWORK_CONNECTIVITY_FULL        = 4
+;; } GNetworkConnectivity;
+
+(define-enum-extended NetworkConnectivity
+  (in-module "G")
+  (c-name "GNetworkConnectivity")
+  (values
+    '("local" "G_NETWORK_CONNECTIVITY_LOCAL" "1")
+    '("limited" "G_NETWORK_CONNECTIVITY_LIMITED" "2")
+    '("portal" "G_NETWORK_CONNECTIVITY_PORTAL" "3")
+    '("full" "G_NETWORK_CONNECTIVITY_FULL" "4")
+  )
+)
+
 ;; From gsettings.h
 
 ;; Original typedef:
index 1f43a3a..1170f1e 100644 (file)
   (gtype-id "G_TYPE_NETWORK_MONITOR_NETLINK")
 )
 
+(define-object MonitorNM
+  (in-module "GNetwork")
+  (parent "GNetworkMonitorNetlink")
+  (c-name "GNetworkMonitorNM")
+  (gtype-id "G_TYPE_NETWORK_MONITOR_NM")
+)
+
 (define-object Service
   (in-module "GNetwork")
   (parent "GObject")
   )
 )
 
+(define-enum Connectivity
+  (in-module "GNetwork")
+  (c-name "GNetworkConnectivity")
+  (gtype-id "G_TYPE_NETWORK_CONNECTIVITY")
+  (values
+    '("local" "G_NETWORK_CONNECTIVITY_LOCAL")
+    '("limited" "G_NETWORK_CONNECTIVITY_LIMITED")
+    '("portal" "G_NETWORK_CONNECTIVITY_PORTAL")
+    '("full" "G_NETWORK_CONNECTIVITY_FULL")
+  )
+)
+
 (define-flags BindFlags
   (in-module "GSettings")
   (c-name "GSettingsBindFlags")
   (return-type "GType")
 )
 
+(define-function g_network_connectivity_get_type
+  (c-name "g_network_connectivity_get_type")
+  (return-type "GType")
+)
+
 (define-function g_settings_bind_flags_get_type
   (c-name "g_settings_bind_flags_get_type")
   (return-type "GType")
   (return-type "gboolean")
 )
 
+(define-method get_connectivity
+  (of-object "GNetworkMonitor")
+  (c-name "g_network_monitor_get_connectivity")
+  (return-type "GNetworkConnectivity")
+)
+
 (define-method can_reach
   (of-object "GNetworkMonitor")
   (c-name "g_network_monitor_can_reach")
 
 
 
+;; From gnetworkmonitornm.h
+
+
+
 ;; From gnetworkservice.h
 
 (define-function g_network_service_get_type
   )
 )
 
+(define-method send_messages
+  (of-object "GSocket")
+  (c-name "g_socket_send_messages")
+  (return-type "gint")
+  (parameters
+    '("GOutputMessage*" "messages")
+    '("guint" "num_messages")
+    '("gint" "flags")
+    '("GCancellable*" "cancellable")
+    '("GError**" "error")
+  )
+)
+
 (define-method close
   (of-object "GSocket")
   (c-name "g_socket_close")
index 114a01f..232072f 100644 (file)
   (construct-only #t)
 )
 
+;; From GNetworkMonitor
+
+(define-signal network-changed
+  (of-object "GNetworkMonitor")
+  (return-type "void")
+  (when "last")
+  (parameters
+    '("gboolean" "p0")
+  )
+)
+
+(define-property connectivity
+  (of-object "GNetworkMonitor")
+  (prop-type "GParamEnum")
+  (docs "Level of network connectivity")
+  (readable #t)
+  (writable #f)
+  (construct-only #f)
+)
+
+(define-property network-available
+  (of-object "GNetworkMonitor")
+  (prop-type "GParamBoolean")
+  (docs "Whether the network is available")
+  (readable #t)
+  (writable #f)
+  (construct-only #f)
+)
+
 ;; From GNetworkService
 
 (define-property service
index 18c03b0..7ca1731 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -217,6 +215,7 @@ public:
    * does not support content guessing.
    * 
    * @newin{2,18}
+   *
    * @param result An AsyncResult.
    * @return An array of content types.
    * @throw Glib::Error
diff --git a/gio/src/networkmonitor.ccg b/gio/src/networkmonitor.ccg
new file mode 100644 (file)
index 0000000..aaa5ee1
--- /dev/null
@@ -0,0 +1,38 @@
+/* Copyright (C) 2014 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/exceptionhandler.h>
+#include <gio/gio.h>
+#include "slot_async.h"
+
+namespace Gio {
+
+void NetworkMonitor::can_reach_async(const Glib::RefPtr<SocketConnectable>& connectable, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
+{
+  // 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_network_monitor_can_reach_async(gobj(),
+    Glib::unwrap(connectable),
+    Glib::unwrap(cancellable),
+    &SignalProxy_async_callback,
+    slot_copy);
+}
+
+} // namespace Gio
diff --git a/gio/src/networkmonitor.hg b/gio/src/networkmonitor.hg
new file mode 100644 (file)
index 0000000..4c6ee89
--- /dev/null
@@ -0,0 +1,69 @@
+/* Copyright (C) 2014 The giomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <giomm/asyncresult.h>
+#include <giomm/cancellable.h>
+#include <giomm/socketconnectable.h>
+#include <gio/gio.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(glibmm/private/interface_p.h)
+_PINCLUDE(gio/gio.h)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GNetworkMonitorInterface GNetworkMonitorInterface;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gio
+{
+
+_WRAP_ENUM(NetworkConnectivity, GNetworkConnectivity, NO_GTYPE)
+
+
+/** TODO
+ *
+ * @newin{2,42}
+ */
+class NetworkMonitor : public Glib::Interface
+{
+  _CLASS_INTERFACE(NetworkMonitor, GNetworkMonitor, G_NETWORK_MONITOR, GNetworkMonitorInterface)
+
+public:
+  _WRAP_METHOD(static Glib::RefPtr<NetworkMonitor> get_default(), g_network_monitor_get_default)
+
+  _WRAP_METHOD(bool get_network_available() const, g_network_monitor_get_network_available)
+
+  _WRAP_METHOD(NetworkConnectivity get_connectivity() const, g_network_monitor_get_connectivity)
+
+  _WRAP_METHOD(bool can_reach(const Glib::RefPtr<SocketConnectable>& connectable, const Glib::RefPtr<Cancellable>& cancellable{?}), g_network_monitor_can_reach, errthrow)
+
+  //TODO:
+  void can_reach_async(const Glib::RefPtr<SocketConnectable>& connectable, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable);
+  _IGNORE(g_network_monitor_can_reach_async)
+
+  _WRAP_METHOD(bool can_reach_finish(const Glib::RefPtr<AsyncResult>& result), g_network_monitor_can_reach_finish, errthrow)
+
+  _WRAP_SIGNAL(void network_changed(bool available), "network-changed")
+
+  //TODO: Wrap vfuncs?
+
+  _WRAP_PROPERTY("network-available", bool)
+  _WRAP_PROPERTY("connectivity", NetworkConnectivity)
+};
+
+} // namespace Gio
index b2a891f..caf5f94 100644 (file)
@@ -76,6 +76,7 @@ public:
    * @a action will be activated with @a target as its parameter.
    *
    * @newin{2,40}
+   *
    * @param label Label of the button.
    * @param action An action name.
    * @param target @a action's parameter.
@@ -96,6 +97,7 @@ public:
    * was sent on is activated.
    *
    * @newin{2,40}
+   *
    * @param action An action name.
    * @param target @a action's parameter.
    */
index 4765674..4b5b91e 100644 (file)
@@ -88,6 +88,7 @@ public:
    * must have the same VariantType as the initial state.
    * 
    * @newin{2,38}
+   *
    * @param name The name of the action.
    * @param state The initial state of the action.
    * @return A new SimpleAction.
@@ -103,6 +104,7 @@ public:
    * must also be bool.
    * 
    * @newin{2,38}
+   *
    * @param name The name of the action.
    * @param state The initial state of the action.
    * @return A new SimpleAction.
@@ -118,6 +120,7 @@ public:
   /** Creates a new radio action with a string-based target value.
    * 
    * @newin{2,38}
+   *
    * @param name The name of the action.
    * @param initial_state The initial state of the action.
    * @return A new SimpleAction.
@@ -134,6 +137,7 @@ public:
   /** Creates a new radio action with an integer-based target value.
    * 
    * @newin{2,38}
+   *
    * @param name The name of the action.
    * @param initial_state The initial state of the action.
    * @return A new SimpleAction.
index 55236a4..530a1ab 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2009 Jonathon Jongsma
  *
  * This library is free software; you can redistribute it and/or
@@ -251,6 +249,7 @@ public:
    * Gio::signal_socket().connect() is a simpler interface to the same functionality.
    *
    * @newin{2,42}
+   *
    * @param condition A Glib::IOCondition mask to monitor.
    * @param cancellable A Cancellable. The default value means the source is not cancellable.
    * @return A newly allocated SocketSource.
index 4fbed4d..aa26c9c 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2010 The giomm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -24,24 +22,47 @@ namespace Gio
 {
 
 UnixFDList::UnixFDList(const Glib::ArrayHandle<int>& fds)
-: _CONSTRUCT("fds", fds.data(), "n_fds", fds.size())
-{}
+:
+  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
+  Glib::ObjectBase(0),
+  // g_unix_fd_list_new_from_array() must be called.
+  // Its parameters don't correspond to properties.
+  // _CONSTRUCT() + g_unit_fd_list_append() is not an alternative.
+  // g_unit_fd_list_append() duplicates the file descriptor,
+  // but g_unix_fd_list_new_from_array() does not.
+  Glib::Object((GObject*)g_unix_fd_list_new_from_array(fds.data(), fds.size()))
+{
+}
+
+UnixFDList::UnixFDList(const Glib::ArrayHandle<int>& fds, int n_fds)
+:
+  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
+  Glib::ObjectBase(0),
+  // g_unix_fd_list_new_from_array() must be called.
+  // Its parameters don't correspond to properties.
+  // _CONSTRUCT() + g_unit_fd_list_append() is not an alternative.
+  // g_unit_fd_list_append() duplicates the file descriptor,
+  // but g_unix_fd_list_new_from_array() does not.
+  Glib::Object((GObject*)g_unix_fd_list_new_from_array(fds.data(), n_fds))
+{
+}
 
 const Glib::ArrayHandle<int> UnixFDList::peek_fds() const
 {
   int length = 0;
-  const int* fds = g_unix_fd_list_peek_fds(const_cast<GUnixFDList*>(gobj()),
-    &length);
-  // (length - 1) is used because the array is terminated with a -1.
-  return Glib::ArrayHandle<int>(fds, length - 1, Glib::OWNERSHIP_NONE);
+  const int* fds = g_unix_fd_list_peek_fds(const_cast<GUnixFDList*>(gobj()), &length);
+  // The array is terminated with a -1, but that terminating element is
+  // not included in the length that g_unix_fd_list_peek_fds() returns.
+  return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_NONE);
 }
 
 Glib::ArrayHandle<int> UnixFDList::steal_fds()
 {
   int length = 0;
   const int* fds = g_unix_fd_list_steal_fds(gobj(), &length);
-  // (length - 1) is used because the array is terminated with a -1.
-  return Glib::ArrayHandle<int>(fds, length - 1, Glib::OWNERSHIP_DEEP);
+  // The array is terminated with a -1, but that terminating element is
+  // not included in the length that g_unix_fd_list_steal_fds() returns.
+  return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_DEEP);
 }
 
 } // namespace Gio
index 4ff3ec4..6525f32 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2010 The giomm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -26,7 +24,6 @@ _PINCLUDE(glibmm/private/object_p.h)
 namespace Gio
 {
 
-
 /** UnixFDList - An object containing a set of UNIX file descriptors.
  * A UnixFDList contains a list of file descriptors. It owns the file
  * descriptors that it contains, closing them when finalized.
@@ -49,8 +46,8 @@ protected:
 
   explicit UnixFDList(const Glib::ArrayHandle<int>& fds);
 
-#m4 _CONVERSION(`const Glib::ArrayHandle<int>&', `const gint*', `$3.data()')
-  _WRAP_CTOR(UnixFDList(const Glib::ArrayHandle<int>& fds, int n_fds), g_unix_fd_list_new_from_array)
+  explicit UnixFDList(const Glib::ArrayHandle<int>& fds, int n_fds);
+  _IGNORE(g_unix_fd_list_new_from_array)
 
 public:
   _WRAP_METHOD_DOCS_ONLY(g_unix_fd_list_new)
index ec38df4..d112bb6 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2010 The giomm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -28,8 +26,9 @@ Glib::ArrayHandle<int> UnixFDMessage::steal_fds()
 {
   int length = 0;
   const int* fds = g_unix_fd_message_steal_fds(gobj(), &length);
-  // (length - 1) is used because the array is terminated with a -1.
-  return Glib::ArrayHandle<int>(fds, length - 1, Glib::OWNERSHIP_DEEP);
+  // The array is terminated with a -1, but that terminating element is
+  // not included in the length that g_unix_fd_message_steal_fds() returns.
+  return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_DEEP);
 }
 
 } // namespace Gio
index 05a1e10..d54c8e6 100644 (file)
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2010 The giomm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -57,12 +55,11 @@ public:
   _WRAP_METHOD_DOCS_ONLY(g_unix_fd_message_new_with_fd_list)
   _WRAP_CREATE(const Glib::RefPtr<UnixFDList>& fd_list)
 
-  _WRAP_METHOD(Glib::RefPtr<UnixFDList> get_fd_list(), g_unix_fd_message_get_fd_list)
-  _WRAP_METHOD(Glib::RefPtr<const UnixFDList> get_fd_list() const, g_unix_fd_message_get_fd_list, constversion)
+  _WRAP_METHOD(Glib::RefPtr<UnixFDList> get_fd_list(), g_unix_fd_message_get_fd_list, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const UnixFDList> get_fd_list() const, g_unix_fd_message_get_fd_list, refreturn, constversion)
 
   _WRAP_METHOD(bool append_fd(int fd), g_unix_fd_message_append_fd, errthrow)
 
-
   /** Returns the array of file descriptors that is contained in this object.
    *
    * After this call, the descriptors are no longer contained in message.
index 601d977..a9c4221 100644 (file)
@@ -95,6 +95,7 @@ public:
    * TimeSpan that is returned is effectively @a *this - @a other.
    * 
    * @newin{2,26}
+   *
    * @param other The other DateTime.
    * @return The difference between the two DateTime, as a time
    * span expressed in microseconds.
@@ -106,6 +107,7 @@ public:
    * as a CompareFunc.
    * 
    * @newin{2,26}
+   *
    * @param other The DateTime to compare with.
    * @return -1, 0 or 1 if @a *this is less than, equal to or greater
    * than @a other.
@@ -120,6 +122,7 @@ public:
    * them to the same time zone.
    * 
    * @newin{2,26}
+   *
    * @param other The DateTime to compare with.
    * @return <tt>true</tt> if @a *this and @a other are equal.
    */
index e0ff2b8..3660e8f 100644 (file)
@@ -2811,7 +2811,7 @@ a value never returned from g_unichar_get_script()
 </parameter>
 <parameter name="G_UNICODE_SCRIPT_INHERITED">
 <parameter_description>  a mark glyph that takes its script from the
-i                             base glyph to which it is attached
+base glyph to which it is attached
 </parameter_description>
 </parameter>
 <parameter name="G_UNICODE_SCRIPT_ARABIC">
@@ -3314,7 +3314,10 @@ Old South Arabian. Since 2.26
 </parameter>
 <parameter name="G_UNICODE_SCRIPT_TIRHUTA">
 <parameter_description>              Tirhuta. Since: 2.42
-@G_UNICODE_SCRIPT_WARANG_CITI           Warang Citi. Since: 2.42
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_WARANG_CITI">
+<parameter_description>          Warang Citi. Since: 2.42
 </parameter_description>
 </parameter>
 </parameters>
@@ -10517,7 +10520,9 @@ Since: 2.36
 </parameter_description>
 </parameter>
 </parameters>
-<return></return>
+<return> %TRUE on success, %FALSE if there was an error.
+
+</return>
 </function>
 
 <function name="g_closure_add_finalize_notifier">
@@ -17158,7 +17163,9 @@ Since: 2.32
 </parameter_description>
 </parameter>
 </parameters>
-<return></return>
+<return> %TRUE if @key is in @hash_table, %FALSE otherwise.
+
+</return>
 </function>
 
 <function name="g_hash_table_destroy">
@@ -17357,7 +17364,7 @@ key.  Use @length to determine the true length if it's possible that
 %NULL was used as the value for a key.
 
 Note: in the common case of a string-keyed #GHashTable, the return
-value of this function can be conveniently cast to (gchar **).
+value of this function can be conveniently cast to (const gchar **).
 
 You should always free the return result with g_free().  In the
 above-mentioned case of a string-keyed hash table, it may be
@@ -28951,7 +28958,9 @@ Since: 2.44
 </parameter_description>
 </parameter>
 </parameters>
-<return></return>
+<return> %TRUE if strict POSIX is enabled, %FALSE otherwise.
+
+</return>
 </function>
 
 <function name="g_option_context_get_summary">
@@ -29238,6 +29247,10 @@ Since: 2.44
 <parameter_description> a #GoptionContext
 </parameter_description>
 </parameter>
+<parameter name="strict_posix">
+<parameter_description> the new value
+</parameter_description>
+</parameter>
 </parameters>
 <return></return>
 </function>
@@ -58402,7 +58415,7 @@ Values of this type can range from #G_MINSSIZE
 to #G_MAXSSIZE.
 
 To print or scan values of this type, use
-%G_GSIZE_MODIFIER and/or %G_GSSIZE_FORMAT.
+%G_GSSIZE_MODIFIER and/or %G_GSSIZE_FORMAT.
 
 </description>
 <parameters>
index 77c4d22..9eee106 100644 (file)
@@ -46,6 +46,7 @@ Loads a key file into an empty KeyFile instance.
 If the file could not be loaded then a FileError or KeyFileError exception is thrown.
 
 Since: 2.6
+
 \throw Glib::FileError
 \throw Glib::KeyFileError
 </description>
index 5f7c199..c976a95 100644 (file)
@@ -263,6 +263,7 @@ public:
    * If @a key  cannot be found then it is created.
    *
    * @newin{2,12}
+   *
    * @param key A key.
    * @param value An double value.
    */
index 0cb1a82..be750d0 100644 (file)
@@ -144,6 +144,7 @@ public:
   /** Checks if @a *this and @a other have the same type and value.
    * 
    * @newin{2,24}
+   *
    * @param other The Variant to compare with.
    * @return <tt>true</tt> if @a *this and @a other are equal.
    */
index 213f52e..7fb58f2 100644 (file)
@@ -114,6 +114,7 @@ int main(int, char**)
             << get_defs(G_TYPE_SRV_TARGET)
             << get_defs(G_TYPE_RESOLVER)
             << get_defs(G_TYPE_NETWORK_ADDRESS)
+            << get_defs(G_TYPE_NETWORK_MONITOR)
             << get_defs(G_TYPE_NETWORK_SERVICE)
             << get_defs(G_TYPE_SETTINGS)
             << get_defs(G_TYPE_SIMPLE_PERMISSION)
index 3d17066..9444c32 100644 (file)
@@ -32,6 +32,7 @@ _CONV_ENUM(G,FileType)
 _CONV_ENUM(G,MountMountFlags)
 _CONV_ENUM(G,MountOperationResult)
 _CONV_ENUM(G,MountUnmountFlags)
+_CONV_ENUM(G,NetworkConnectivity)
 _CONV_ENUM(G,OutputStreamSpliceFlags)
 _CONV_ENUM(G,PasswordSave)
 _CONV_ENUM(G,ResolverRecordType)
@@ -240,6 +241,10 @@ _CONVERSION(`PasswordSave',`GPasswordSave',`($2)$3')
 #MountOperation
 #_CONVERSION(`GAskPasswordFlags',`AskPasswordFlags',`($2)$3')
 
+# NetworkMonitor
+_CONVERSION(`GNetworkMonitor*',`Glib::RefPtr<NetworkMonitor>',`Glib::wrap($3)')
+
+
 # Notification
 _CONVERSION(`GNotification*',`Glib::RefPtr<Notification>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Notification>&',`GNotification*',__CONVERT_CONST_REFPTR_TO_P)
index 3ac338b..dc98892 100644 (file)
@@ -1,5 +1,6 @@
 dnl
 dnl _ENUM(cpp_type, c_type, value_suffix, `element_list', `flags', `optional_refdoc_comment', 'get_type_function_name')
+dnl          $1       $2         $3             $4           $5              $6                        $7
 dnl
 m4_define(`_ENUM',`dnl
 _PUSH()
@@ -20,6 +21,7 @@ m4_define(`__DOCGROUP_'__MODULE_CANONICAL__`_ENUMS__')dnl
 dnl
 dnl
 /** $6
+ *
  * @ingroup __MODULE_CANONICAL__`'Enums
 m4_ifelse($3,Flags,`dnl
  * @par Bitwise operators:
index 1997945..0e9e66f 100644 (file)
@@ -285,11 +285,11 @@ sub lookup_enum_documentation($$$$)
     $param =~ s/([a-zA-Z0-9]*(_[a-zA-Z0-9]+)*)_?/$1/g;
     if(length($desc) > 0)
     {
-      $desc =~ s/\n/ /g;
-      $desc =~ s/ $//;
-      $desc =~ s/^\s+//; # Chop off leading whitespace
+      # Chop off leading and trailing whitespace.
+      $desc =~ s/^\s+//;
+      $desc =~ s/\s+$//;
       $desc .= '.' unless($desc =~ /(?:^|\.)$/);
-      $docs .= "\@var $cpp_enum_name ${param}\n \u${desc}\n\n"; # \u = Convert next char to uppercase
+      $docs .= "\@var $cpp_enum_name ${param}\n\u${desc}\n\n"; # \u = Convert next char to uppercase
     }
   }
 
@@ -514,14 +514,20 @@ sub convert_tags_to_doxygen($)
     s"<variablelist>\n?(.*?)</variablelist>\n?"&DocsParser::convert_variablelist($1)"esg;
 
     # Use our Doxygen @newin alias.
-    # If Since is not followed by a colon, substitute @newin only if it's
-    # in a sentence of its own at the end of the string. 
-    s/\bSince:\s*(\d+)\.(\d+)\.(\d+)\b\.?/\@newin{$1,$2,$3}/g;
-    s/\bSince:\s*(\d+)\.(\d+)\b\.?/\@newin{$1,$2}/g;
-    s/(\.\s+)Since\s+(\d+)\.(\d+)\.(\d+)\.?$/$1\@newin{$2,$3,$4}/;
-    s/(\.\s+)Since\s+(\d+)\.(\d+)\.?$/$1\@newin{$2,$3}/;
-
-    s"\b->\b"->"g;
+    # Accept "Since" with or without a following colon.
+    # Require the Since clause to be
+    # - at the end of the string,
+    # - at the end of a line and followed by a blank line, or
+    # - followed by "Deprecated".
+    # If none of these requirements is met, "Since" may be embedded inside
+    # a function description, referring to only a part of the description.
+    # See e.g. g_date_time_format() and gdk_cursor_new_from_pixbuf().
+    # Doxygen assumes that @newin is followed by a paragraph that describes
+    # what is new, but we don't use it that way.
+    my $first_part = '\bSince[:\h]\h*(\d+)\.(\d+)'; # \h == [\t ] (horizontal whitespace)
+    my $last_part = '\.?(\s*$|\h*\n\h*\n|\s+Deprecated)';
+    s/$first_part\.(\d+)$last_part/\@newin{$1,$2,$3}$4/g;
+    s/$first_part$last_part/\@newin{$1,$2}$3/g;
 
     # Doxygen is too dumb to handle &mdash;
     s"&mdash;" \@htmlonly&mdash;\@endhtmlonly "g;
index de13f5e..1b12f4e 100644 (file)
@@ -679,7 +679,7 @@ sub output_wrap_enum($$$$$$$)
     DocsParser::lookup_enum_documentation("$c_type", "$cpp_type", " ", \@flags);
 
   # Merge the passed in comment to the existing enum documentation.
-  $comment = $comment . "\n * " . $enum_docs;
+  $comment .= "\n * " . $enum_docs if $enum_docs ne "";
 
   my $str = sprintf("_ENUM(%s,%s,%s,\`%s\',\`%s\',\`%s\')dnl\n",
     $cpp_type,