summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2022-08-22 13:29:49 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2022-08-22 13:29:49 +0200
commitcf6cbe83089f38e9fb552fa14de163ec94a0f52e (patch)
treed231f359e2edfbf7bb886f916f02bb6a3ce1cb22
parent7768e3c06e08027da24750e1f5132081726bbed0 (diff)
downloadglibmm-cf6cbe83089f38e9fb552fa14de163ec94a0f52e.tar.gz
Gio: Add some methods for glibmm 2.74
* configure.ac: * meson.build: Require glib-2.0 >= 2.73.2. * gio/src/appinfo.hg: Add get_default_for_type_async/finish(), get_default_for_uri_scheme_async/finish(). * gio/src/file.hg: Add make_symbolic_link_async/finish(). * gio/src/liststore.hg: Add property_n_items(). * gio/src/resolver.hg: Add enum Resolver::NameLookupFlags, lookup_by_name_with_flags(), lookup_by_name_with_flags_async/finish(). * gio/src/gio_docs_override.xml: * tools/m4/convert_gio.m4: Add conversions for Resolver::NameLookupFlags.
-rw-r--r--configure.ac2
-rw-r--r--gio/src/appinfo.hg18
-rw-r--r--gio/src/file.hg9
-rw-r--r--gio/src/gio_docs_override.xml1
-rw-r--r--gio/src/liststore.hg1
-rw-r--r--gio/src/resolver.hg17
-rw-r--r--meson.build2
-rw-r--r--tools/m4/convert_gio.m41
8 files changed, 45 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 6950ca77..04ac0460 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ AS_IF([test "x$enable_static" = xyes],
AC_DEFINE([GIOMM_STATIC_LIB], [1], [Define if giomm is built as a static library])
])
-glibreq='2.0 >= 2.71.2'
+glibreq='2.0 >= 2.73.2'
GLIBMM_MODULES="sigc++-3.0 >= 3.0.0 glib-$glibreq gobject-$glibreq gmodule-$glibreq"
GIOMM_MODULES="$GLIBMM_MODULES gio-$glibreq"
diff --git a/gio/src/appinfo.hg b/gio/src/appinfo.hg
index 06d8d515..04721cfd 100644
--- a/gio/src/appinfo.hg
+++ b/gio/src/appinfo.hg
@@ -224,8 +224,22 @@ public:
_WRAP_METHOD(static std::vector<Glib::RefPtr<AppInfo>> get_all(), g_app_info_get_all)
_WRAP_METHOD(static std::vector<Glib::RefPtr<AppInfo>> get_all_for_type(const std::string& content_type), g_app_info_get_all_for_type)
- _WRAP_METHOD(static Glib::RefPtr<AppInfo> get_default_for_type(const std::string& content_type, bool must_support_uris = true), g_app_info_get_default_for_type)
- _WRAP_METHOD(static Glib::RefPtr<AppInfo> get_default_for_uri_scheme(const std::string& uri_scheme), g_app_info_get_default_for_uri_scheme)
+ _WRAP_METHOD(static Glib::RefPtr<AppInfo> get_default_for_type(const std::string& content_type,
+ bool must_support_uris = true), g_app_info_get_default_for_type)
+ _WRAP_METHOD(static void get_default_for_type_async(const std::string& content_type, bool must_support_uris,
+ const SlotAsyncReady& slot{callback?}, const Glib::RefPtr<Cancellable>& cancellable{.} = {}),
+ g_app_info_get_default_for_type_async, slot_name slot, slot_callback SignalProxy_async_callback)
+ _WRAP_METHOD(static Glib::RefPtr<AppInfo> get_default_for_type_finish(const Glib::RefPtr<AsyncResult>& result),
+ g_app_info_get_default_for_type_finish, errthrow)
+
+ _WRAP_METHOD(static Glib::RefPtr<AppInfo> get_default_for_uri_scheme(const std::string& uri_scheme),
+ g_app_info_get_default_for_uri_scheme)
+ _WRAP_METHOD(static void get_default_for_uri_scheme_async(const std::string& content_type,
+ const SlotAsyncReady& slot{callback?}, const Glib::RefPtr<Cancellable>& cancellable{.} = {}),
+ g_app_info_get_default_for_uri_scheme_async, slot_name slot, slot_callback SignalProxy_async_callback)
+ _WRAP_METHOD(static Glib::RefPtr<AppInfo> get_default_for_uri_scheme_finish(const Glib::RefPtr<AsyncResult>& result),
+ g_app_info_get_default_for_uri_scheme_finish, errthrow)
+
_WRAP_METHOD(static void reset_type_associations(const std::string& content_type), g_app_info_reset_type_associations)
_WRAP_METHOD(static bool launch_default_for_uri(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& context{?}), g_app_info_launch_default_for_uri, errthrow)
diff --git a/gio/src/file.hg b/gio/src/file.hg
index e640934b..0f9997cd 100644
--- a/gio/src/file.hg
+++ b/gio/src/file.hg
@@ -1342,7 +1342,6 @@ public:
g_file_make_directory_finish,
errthrow)
-
_WRAP_METHOD(bool make_directory_with_parents(const Glib::RefPtr<Cancellable>& cancellable{?}),
g_file_make_directory_with_parents,
errthrow)
@@ -1351,6 +1350,14 @@ public:
g_file_make_symbolic_link,
errthrow)
+ _WRAP_METHOD(void make_symbolic_link_async(const std::string& symlink_value,
+ const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.} = {},
+ int io_priority{.} = Glib::PRIORITY_DEFAULT), g_file_make_symbolic_link_async,
+ slot_name slot, slot_callback SignalProxy_async_callback)
+
+ _WRAP_METHOD(bool make_symbolic_link_finish(const Glib::RefPtr<AsyncResult>& result),
+ g_file_make_symbolic_link_finish, errthrow)
+
_WRAP_METHOD(Glib::RefPtr<FileAttributeInfoList> query_settable_attributes(const Glib::RefPtr<Cancellable>& cancellable{?}),
g_file_query_settable_attributes,
errthrow)
diff --git a/gio/src/gio_docs_override.xml b/gio/src/gio_docs_override.xml
index b7bbcb3e..e58038f4 100644
--- a/gio/src/gio_docs_override.xml
+++ b/gio/src/gio_docs_override.xml
@@ -75,6 +75,7 @@
<substitute_enumerator_name from_prefix="G_FILE_TYPE_" to_prefix="Gio::FileType::" />
<substitute_enumerator_name from_prefix="G_NETWORK_CONNECTIVITY_" to_prefix="Gio::NetworkConnectivity::" />
<substitute_enumerator_name from_prefix="G_PASSWORD_SAVE_" to_prefix="Gio::PasswordSave::" />
+<substitute_enumerator_name from_prefix="G_RESOLVER_NAME_LOOKUP_FLAGS_" to_prefix="Gio::Resolver::NameLookupFlags::" />
<substitute_enumerator_name from_prefix="G_RESOLVER_RECORD_" to_prefix="Gio::Resolver::RecordType::" />
<substitute_enumerator_name from_prefix="G_RESOURCE_ERROR_" to_prefix="Gio::ResourceError::" />
<substitute_enumerator_name from_prefix="G_SETTINGS_BIND_" to_prefix="Gio::Settings::BindFlags::" />
diff --git a/gio/src/liststore.hg b/gio/src/liststore.hg
index dbe225db..3bef97ec 100644
--- a/gio/src/liststore.hg
+++ b/gio/src/liststore.hg
@@ -99,6 +99,7 @@ public:
_IGNORE(g_list_store_splice)
_WRAP_PROPERTY("item-type", GType, newin "2,50")
+ _WRAP_PROPERTY("n-items", unsigned int)
}; // end class ListStoreBase
diff --git a/gio/src/resolver.hg b/gio/src/resolver.hg
index 5900f3be..1fc983d0 100644
--- a/gio/src/resolver.hg
+++ b/gio/src/resolver.hg
@@ -57,6 +57,7 @@ protected:
public:
_WRAP_ENUM(RecordType, GResolverRecordType, decl_prefix GIOMM_API)
+ _WRAP_ENUM(NameLookupFlags, GResolverNameLookupFlags, decl_prefix GIOMM_API, newin "2,74")
static Glib::RefPtr<Resolver> get_default();
_IGNORE(g_resolver_get_default)
@@ -87,7 +88,21 @@ public:
void lookup_by_name_async(const Glib::ustring& hostname, const SlotAsyncReady& slot);
_IGNORE(g_resolver_lookup_by_name_async)
- _WRAP_METHOD(std::vector<Glib::RefPtr<InetAddress>> lookup_by_name_finish(const Glib::RefPtr<AsyncResult>& result), g_resolver_lookup_by_name_finish, errthrow)
+ _WRAP_METHOD(std::vector<Glib::RefPtr<InetAddress>> lookup_by_name_finish(
+ const Glib::RefPtr<AsyncResult>& result), g_resolver_lookup_by_name_finish, errthrow)
+
+ _WRAP_METHOD(std::vector<Glib::RefPtr<InetAddress>> lookup_by_name_with_flags(const Glib::ustring& hostname,
+ NameLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable = {}), g_resolver_lookup_by_name_with_flags,
+ errthrow, newin "2,74")
+
+ _WRAP_METHOD(void lookup_by_name_with_flags_async(const Glib::ustring& hostname,
+ NameLookupFlags flags, const SlotAsyncReady& slot{callback},
+ const Glib::RefPtr<Cancellable>& cancellable{.} = {}), g_resolver_lookup_by_name_with_flags_async,
+ slot_name slot, slot_callback SignalProxy_async_callback, newin "2,74")
+
+ _WRAP_METHOD(std::vector<Glib::RefPtr<InetAddress>> lookup_by_name_with_flags_finish(
+ const Glib::RefPtr<AsyncResult>& result), g_resolver_lookup_by_name_with_flags_finish,
+ errthrow, newin "2,74")
_WRAP_METHOD(Glib::ustring lookup_by_address(const Glib::RefPtr<InetAddress>& address, const Glib::RefPtr<Cancellable>& cancellable{?}), g_resolver_lookup_by_address, errthrow)
diff --git a/meson.build b/meson.build
index 46b72be0..eafd1c3f 100644
--- a/meson.build
+++ b/meson.build
@@ -104,7 +104,7 @@ install_pkgconfigdir = install_libdir / 'pkgconfig'
# Dependencies when using the <pkg>mm library.
sigcxx_req = '>= 3.0.0'
-glib_req = '>= 2.71.2'
+glib_req = '>= 2.73.2'
# There are pkg-config files for sigc++ and glib on MSVC, so just use that.
sigcxx_dep = dependency('sigc++-3.0', version: sigcxx_req)
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index 2a5ca578..b75ffdfe 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -65,6 +65,7 @@ _CONV_GIO_ENUM(NetworkConnectivity)
_CONV_GIO_INCLASS_ENUM(Notification,Priority)
_CONV_GIO_INCLASS_ENUM(OutputStream,SpliceFlags)
_CONV_GIO_ENUM(PasswordSave)
+_CONV_GIO_INCLASS_ENUM(Resolver,NameLookupFlags)
_CONV_GIO_INCLASS_ENUM(Resolver,RecordType)
_CONV_GIO_INCLASS_ENUM(Resource,Flags)
_CONV_GIO_INCLASS_ENUM(Resource,LookupFlags)