"Fossies" - the Fresh Open Source Software Archive

Member "glibmm-2.74.0/untracked/gio/giomm/appinfo.cc" (19 Sep 2022, 18920 Bytes) of package /linux/misc/glibmm-2.74.0.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "appinfo.cc" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes reports: 2.73.2_vs_2.74.0 or 2.72.1_vs_2.74.0.

    1 // Generated by gmmproc 2.74.0 -- DO NOT MODIFY!
    2 
    3 
    4 #include <glibmm.h>
    5 
    6 #include <giomm/appinfo.h>
    7 #include <giomm/private/appinfo_p.h>
    8 
    9 
   10 /* Copyright (C) 2007 The gtkmm Development Team
   11  *
   12  * This library is free software; you can redistribute it and/or
   13  * modify it under the terms of the GNU Lesser General Public
   14  * License as published by the Free Software Foundation; either
   15  * version 2.1 of the License, or (at your option) any later version.
   16  *
   17  * This library is distributed in the hope that it will be useful,
   18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   20  * Lesser General Public License for more details.
   21  *
   22  * You should have received a copy of the GNU Lesser General Public
   23  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
   24  */
   25 
   26 #include <giomm/file.h>
   27 #include <glibmm/vectorutils.h>
   28 #include <giomm/slot_async.h>
   29 #include <gio/gio.h>
   30 
   31 namespace
   32 {
   33 /* Special type traits for pointers to the GAppInfo interface.
   34  * The partial specialization in glibmm/glib/glibmm/containerhandle_shared.h
   35  * is not well suited for interfaces which do not already have a wrapper.
   36  * Its to_cpp_type() calls Glib::wrap_auto() instead id Glib::wrap_auto_interface().
   37  * These type traits are used by Glib::ListHandler<>::list_to_vector() in
   38  * Gio::AppInfo::get_all() and Gio::AppInfo::get_all_for_type().
   39  * https://gitlab.gnome.org/GNOME/glibmm/-/issues/94
   40  */
   41 struct TypeTraits_AppInfo
   42 {
   43   using T = Gio::AppInfo;
   44   using CppType = Glib::RefPtr<T>;
   45   using CType = typename T::BaseObjectType*;
   46   using CTypeNonConst = typename T::BaseObjectType*;
   47 
   48   static CType to_c_type(const CppType& ptr) { return Glib::unwrap(ptr); }
   49   static CType to_c_type(CType ptr) { return ptr; }
   50   static CppType to_cpp_type(CType ptr) { return Glib::wrap(ptr, true); }
   51 
   52   static void release_c_type(CType ptr)
   53   {
   54     GLIBMM_DEBUG_UNREFERENCE(nullptr, ptr);
   55     g_object_unref(ptr);
   56   }
   57 };
   58 } // anonymous namespace
   59 
   60 namespace Gio
   61 {
   62 
   63 Glib::RefPtr<AppInfo>
   64 AppInfo::create_from_commandline(
   65   const std::string& commandline, const std::string& application_name, CreateFlags flags)
   66 {
   67   GAppInfo* capp_info = nullptr;
   68   GError* gerror = nullptr;
   69 
   70   capp_info = g_app_info_create_from_commandline(commandline.c_str(), application_name.c_str(),
   71     static_cast<GAppInfoCreateFlags>(flags), &gerror);
   72 
   73   if (gerror)
   74     ::Glib::Error::throw_exception(gerror);
   75 
   76   return Glib::wrap(capp_info);
   77 }
   78 
   79 Glib::RefPtr<AppInfo>
   80 AppInfo::create_duplicate() const
   81 {
   82   return Glib::wrap(g_app_info_dup(const_cast<GAppInfo*>(gobj())));
   83 }
   84 
   85 bool
   86 AppInfo::launch(
   87   const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<AppLaunchContext>& launch_context)
   88 {
   89   std::vector<Glib::RefPtr<Gio::File>> vec = { file };
   90 
   91   GError* gerror = nullptr;
   92   const bool retvalue = g_app_info_launch(gobj(),
   93     Glib::ListHandler<Glib::RefPtr<Gio::File>>::vector_to_list(vec).data(),
   94     Glib::unwrap(launch_context), &(gerror));
   95   if (gerror)
   96     ::Glib::Error::throw_exception(gerror);
   97 
   98   return retvalue;
   99 }
  100 
  101 bool
  102 AppInfo::launch(const Glib::RefPtr<Gio::File>& file)
  103 {
  104   std::vector<Glib::RefPtr<Gio::File>> vec = { file };
  105 
  106   GError* gerror = nullptr;
  107   const bool retvalue = g_app_info_launch(gobj(),
  108     Glib::ListHandler<Glib::RefPtr<Gio::File>>::vector_to_list(vec).data(), nullptr, &(gerror));
  109   if (gerror)
  110     ::Glib::Error::throw_exception(gerror);
  111 
  112   return retvalue;
  113 }
  114 
  115 bool
  116 AppInfo::launch_uri(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& launch_context)
  117 {
  118   std::vector<std::string> vec = { uri };
  119 
  120   GError* gerror = nullptr;
  121   const bool retvalue =
  122     g_app_info_launch_uris(gobj(), Glib::ListHandler<std::string>::vector_to_list(vec).data(),
  123       Glib::unwrap(launch_context), &(gerror));
  124   if (gerror)
  125     ::Glib::Error::throw_exception(gerror);
  126 
  127   return retvalue;
  128 }
  129 
  130 bool
  131 AppInfo::launch_uri(const std::string& uri)
  132 {
  133   std::vector<std::string> vec = { uri };
  134 
  135   GError* gerror = nullptr;
  136   const bool retvalue = g_app_info_launch_uris(
  137     gobj(), Glib::ListHandler<std::string>::vector_to_list(vec).data(), nullptr, &(gerror));
  138   if (gerror)
  139     ::Glib::Error::throw_exception(gerror);
  140 
  141   return retvalue;
  142 }
  143 
  144 } // namespace Gio
  145 
  146 namespace
  147 {
  148 } // anonymous namespace
  149 
  150 
  151 namespace Glib
  152 {
  153 
  154 Glib::RefPtr<Gio::AppInfo> wrap(GAppInfo* object, bool take_copy)
  155 {
  156   return Glib::make_refptr_for_instance<Gio::AppInfo>( dynamic_cast<Gio::AppInfo*> (Glib::wrap_auto_interface<Gio::AppInfo> ((GObject*)(object), take_copy)) );
  157   //We use dynamic_cast<> in case of multiple inheritance.
  158 }
  159 
  160 } // namespace Glib
  161 
  162 
  163 namespace Gio
  164 {
  165 
  166 
  167 /* The *_Class implementation: */
  168 
  169 const Glib::Interface_Class& AppInfo_Class::init()
  170 {
  171   if(!gtype_) // create the GType if necessary
  172   {
  173     // Glib::Interface_Class has to know the interface init function
  174     // in order to add interfaces to implementing types.
  175     class_init_func_ = &AppInfo_Class::iface_init_function;
  176 
  177     // We can not derive from another interface, and it is not necessary anyway.
  178     gtype_ = g_app_info_get_type();
  179   }
  180 
  181   return *this;
  182 }
  183 
  184 void AppInfo_Class::iface_init_function(void* g_iface, void*)
  185 {
  186   const auto klass = static_cast<BaseClassType*>(g_iface);
  187 
  188   //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
  189   //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
  190   g_assert(klass != nullptr);
  191 
  192 
  193 }
  194 
  195 
  196 Glib::ObjectBase* AppInfo_Class::wrap_new(GObject* object)
  197 {
  198   return new AppInfo((GAppInfo*)(object));
  199 }
  200 
  201 
  202 /* The implementation: */
  203 
  204 AppInfo::AppInfo()
  205 :
  206   Glib::Interface(appinfo_class_.init())
  207 {}
  208 
  209 AppInfo::AppInfo(GAppInfo* castitem)
  210 :
  211   Glib::Interface((GObject*)(castitem))
  212 {}
  213 
  214 AppInfo::AppInfo(const Glib::Interface_Class& interface_class)
  215 : Glib::Interface(interface_class)
  216 {
  217 }
  218 
  219 AppInfo::AppInfo(AppInfo&& src) noexcept
  220 : Glib::Interface(std::move(src))
  221 {}
  222 
  223 AppInfo& AppInfo::operator=(AppInfo&& src) noexcept
  224 {
  225   Glib::Interface::operator=(std::move(src));
  226   return *this;
  227 }
  228 
  229 AppInfo::~AppInfo() noexcept
  230 {}
  231 
  232 // static
  233 void AppInfo::add_interface(GType gtype_implementer)
  234 {
  235   appinfo_class_.init().add_interface(gtype_implementer);
  236 }
  237 
  238 AppInfo::CppClassType AppInfo::appinfo_class_; // initialize static member
  239 
  240 GType AppInfo::get_type()
  241 {
  242   return appinfo_class_.init().get_type();
  243 }
  244 
  245 
  246 GType AppInfo::get_base_type()
  247 {
  248   return g_app_info_get_type();
  249 }
  250 
  251 
  252 bool AppInfo::equal(const Glib::RefPtr<AppInfo>& other) const
  253 {
  254   return g_app_info_equal(const_cast<GAppInfo*>(gobj()), Glib::unwrap(other));
  255 }
  256 
  257 std::string AppInfo::get_id() const
  258 {
  259   return Glib::convert_const_gchar_ptr_to_stdstring(g_app_info_get_id(const_cast<GAppInfo*>(gobj())));
  260 }
  261 
  262 std::string AppInfo::get_name() const
  263 {
  264   return Glib::convert_const_gchar_ptr_to_stdstring(g_app_info_get_name(const_cast<GAppInfo*>(gobj())));
  265 }
  266 
  267 std::string AppInfo::get_display_name() const
  268 {
  269   return Glib::convert_const_gchar_ptr_to_stdstring(g_app_info_get_display_name(const_cast<GAppInfo*>(gobj())));
  270 }
  271 
  272 std::string AppInfo::get_description() const
  273 {
  274   return Glib::convert_const_gchar_ptr_to_stdstring(g_app_info_get_description(const_cast<GAppInfo*>(gobj())));
  275 }
  276 
  277 std::string AppInfo::get_executable() const
  278 {
  279   return Glib::convert_const_gchar_ptr_to_stdstring(g_app_info_get_executable(const_cast<GAppInfo*>(gobj())));
  280 }
  281 
  282 std::string AppInfo::get_commandline() const
  283 {
  284   return Glib::convert_const_gchar_ptr_to_stdstring(g_app_info_get_commandline(const_cast<GAppInfo*>(gobj())));
  285 }
  286 
  287 Glib::RefPtr<Icon> AppInfo::get_icon()
  288 {
  289   auto retvalue = Glib::wrap(g_app_info_get_icon(gobj()));
  290   if(retvalue)
  291     retvalue->reference(); //The function does not do a ref for us.
  292   return retvalue;
  293 }
  294 
  295 const Glib::RefPtr<const Icon> AppInfo::get_icon() const
  296 {
  297   return const_cast<AppInfo*>(this)->get_icon();
  298 }
  299 
  300 bool AppInfo::launch(const std::vector< Glib::RefPtr<Gio::File> >& files, const Glib::RefPtr<AppLaunchContext>& context)
  301 {
  302   GError* gerror = nullptr;
  303   auto retvalue = g_app_info_launch(gobj(), Glib::ListHandler<Glib::RefPtr<Gio::File> >::vector_to_list(files).data (), Glib::unwrap(context), &(gerror));
  304   if(gerror)
  305     ::Glib::Error::throw_exception(gerror);
  306   return retvalue;
  307 }
  308 
  309 bool AppInfo::launch(const std::vector< Glib::RefPtr<Gio::File> >& files)
  310 {
  311   GError* gerror = nullptr;
  312   auto retvalue = g_app_info_launch(gobj(), Glib::ListHandler<Glib::RefPtr<Gio::File> >::vector_to_list(files).data (), nullptr, &(gerror));
  313   if(gerror)
  314     ::Glib::Error::throw_exception(gerror);
  315   return retvalue;
  316 }
  317 
  318 bool AppInfo::supports_uris() const
  319 {
  320   return g_app_info_supports_uris(const_cast<GAppInfo*>(gobj()));
  321 }
  322 
  323 bool AppInfo::supports_files() const
  324 {
  325   return g_app_info_supports_files(const_cast<GAppInfo*>(gobj()));
  326 }
  327 
  328 bool AppInfo::launch_uris(const std::vector<std::string>& uris, const Glib::RefPtr<AppLaunchContext>& context)
  329 {
  330   GError* gerror = nullptr;
  331   auto retvalue = g_app_info_launch_uris(gobj(), Glib::ListHandler<std::string>::vector_to_list(uris).data(), Glib::unwrap(context), &(gerror));
  332   if(gerror)
  333     ::Glib::Error::throw_exception(gerror);
  334   return retvalue;
  335 }
  336 
  337 bool AppInfo::launch_uris(const std::vector<std::string>& uris)
  338 {
  339   GError* gerror = nullptr;
  340   auto retvalue = g_app_info_launch_uris(gobj(), Glib::ListHandler<std::string>::vector_to_list(uris).data(), nullptr, &(gerror));
  341   if(gerror)
  342     ::Glib::Error::throw_exception(gerror);
  343   return retvalue;
  344 }
  345 
  346 void AppInfo::launch_uris_async(const std::vector<std::string>& uris, const Glib::RefPtr<AppLaunchContext>& context, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
  347 {
  348   // Create a copy of the slot.
  349   auto slot_copy = new SlotAsyncReady(slot); 
  350 
  351   g_app_info_launch_uris_async(gobj(), Glib::ListHandler<std::string>::vector_to_list(uris).data(), Glib::unwrap(context), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
  352 }
  353 
  354 void AppInfo::launch_uris_async(const std::vector<std::string>& uris, const Glib::RefPtr<AppLaunchContext>& context, const Glib::RefPtr<Cancellable>& cancellable)
  355 {
  356   g_app_info_launch_uris_async(gobj(), Glib::ListHandler<std::string>::vector_to_list(uris).data(), Glib::unwrap(context), const_cast<GCancellable*>(Glib::unwrap(cancellable)), nullptr, nullptr);
  357 }
  358 
  359 bool AppInfo::launch_uris_finish(const Glib::RefPtr<AsyncResult>& result)
  360 {
  361   GError* gerror = nullptr;
  362   auto retvalue = g_app_info_launch_uris_finish(gobj(), Glib::unwrap(result), &(gerror));
  363   if(gerror)
  364     ::Glib::Error::throw_exception(gerror);
  365   return retvalue;
  366 }
  367 
  368 bool AppInfo::should_show() const
  369 {
  370   return g_app_info_should_show(const_cast<GAppInfo*>(gobj()));
  371 }
  372 
  373 bool AppInfo::can_delete() const
  374 {
  375   return g_app_info_can_delete(const_cast<GAppInfo*>(gobj()));
  376 }
  377 
  378 bool AppInfo::do_delete()
  379 {
  380   return g_app_info_delete(gobj());
  381 }
  382 
  383 bool AppInfo::set_as_default_for_type(const std::string& content_type)
  384 {
  385   GError* gerror = nullptr;
  386   auto retvalue = g_app_info_set_as_default_for_type(gobj(), content_type.c_str(), &(gerror));
  387   if(gerror)
  388     ::Glib::Error::throw_exception(gerror);
  389   return retvalue;
  390 }
  391 
  392 bool AppInfo::set_as_default_for_extension(const std::string& extension)
  393 {
  394   GError* gerror = nullptr;
  395   auto retvalue = g_app_info_set_as_default_for_extension(gobj(), extension.c_str(), &(gerror));
  396   if(gerror)
  397     ::Glib::Error::throw_exception(gerror);
  398   return retvalue;
  399 }
  400 
  401 bool AppInfo::add_supports_type(const std::string& content_type)
  402 {
  403   GError* gerror = nullptr;
  404   auto retvalue = g_app_info_add_supports_type(gobj(), content_type.c_str(), &(gerror));
  405   if(gerror)
  406     ::Glib::Error::throw_exception(gerror);
  407   return retvalue;
  408 }
  409 
  410 bool AppInfo::can_remove_supports_type() const
  411 {
  412   return g_app_info_can_remove_supports_type(const_cast<GAppInfo*>(gobj()));
  413 }
  414 
  415 bool AppInfo::remove_supports_type(const std::string& content_type)
  416 {
  417   GError* gerror = nullptr;
  418   auto retvalue = g_app_info_remove_supports_type(gobj(), content_type.c_str(), &(gerror));
  419   if(gerror)
  420     ::Glib::Error::throw_exception(gerror);
  421   return retvalue;
  422 }
  423 
  424 std::vector<Glib::ustring> AppInfo::get_supported_types() const
  425 {
  426   return Glib::ArrayHandler<Glib::ustring>::array_to_vector(g_app_info_get_supported_types(const_cast<GAppInfo*>(gobj())), Glib::OWNERSHIP_NONE);
  427 }
  428 
  429 bool AppInfo::set_as_last_used_for_type(const std::string& content_type)
  430 {
  431   GError* gerror = nullptr;
  432   auto retvalue = g_app_info_set_as_last_used_for_type(gobj(), content_type.c_str(), &(gerror));
  433   if(gerror)
  434     ::Glib::Error::throw_exception(gerror);
  435   return retvalue;
  436 }
  437 
  438 std::vector<Glib::RefPtr<AppInfo>> AppInfo::get_all()
  439 {
  440   return Glib::ListHandler<Glib::RefPtr<AppInfo>, TypeTraits_AppInfo>::list_to_vector(g_app_info_get_all(), Glib::OWNERSHIP_DEEP);
  441 }
  442 
  443 std::vector<Glib::RefPtr<AppInfo>> AppInfo::get_all_for_type(const std::string& content_type)
  444 {
  445   return Glib::ListHandler<Glib::RefPtr<AppInfo>, TypeTraits_AppInfo>::list_to_vector(g_app_info_get_all_for_type(content_type.c_str()), Glib::OWNERSHIP_DEEP);
  446 }
  447 
  448 Glib::RefPtr<AppInfo> AppInfo::get_default_for_type(const std::string& content_type, bool must_support_uris)
  449 {
  450   return Glib::wrap(g_app_info_get_default_for_type(content_type.c_str(), static_cast<int>(must_support_uris)));
  451 }
  452 
  453 void AppInfo::get_default_for_type_async(const std::string& content_type, bool must_support_uris, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
  454 {
  455   // Create a copy of the slot.
  456   auto slot_copy = new SlotAsyncReady(slot); 
  457 
  458   g_app_info_get_default_for_type_async(content_type.c_str(), static_cast<int>(must_support_uris), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
  459 }
  460 
  461 void AppInfo::get_default_for_type_async(const std::string& content_type, bool must_support_uris, const Glib::RefPtr<Cancellable>& cancellable)
  462 {
  463   g_app_info_get_default_for_type_async(content_type.c_str(), static_cast<int>(must_support_uris), const_cast<GCancellable*>(Glib::unwrap(cancellable)), nullptr, nullptr);
  464 }
  465 
  466 Glib::RefPtr<AppInfo> AppInfo::get_default_for_type_finish(const Glib::RefPtr<AsyncResult>& result)
  467 {
  468   GError* gerror = nullptr;
  469   auto retvalue = Glib::wrap(g_app_info_get_default_for_type_finish(Glib::unwrap(result), &(gerror)));
  470   if(gerror)
  471     ::Glib::Error::throw_exception(gerror);
  472   return retvalue;
  473 }
  474 
  475 Glib::RefPtr<AppInfo> AppInfo::get_default_for_uri_scheme(const std::string& uri_scheme)
  476 {
  477   return Glib::wrap(g_app_info_get_default_for_uri_scheme(uri_scheme.c_str()));
  478 }
  479 
  480 void AppInfo::get_default_for_uri_scheme_async(const std::string& content_type, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
  481 {
  482   // Create a copy of the slot.
  483   auto slot_copy = new SlotAsyncReady(slot); 
  484 
  485   g_app_info_get_default_for_uri_scheme_async(content_type.c_str(), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
  486 }
  487 
  488 void AppInfo::get_default_for_uri_scheme_async(const std::string& content_type, const Glib::RefPtr<Cancellable>& cancellable)
  489 {
  490   g_app_info_get_default_for_uri_scheme_async(content_type.c_str(), const_cast<GCancellable*>(Glib::unwrap(cancellable)), nullptr, nullptr);
  491 }
  492 
  493 Glib::RefPtr<AppInfo> AppInfo::get_default_for_uri_scheme_finish(const Glib::RefPtr<AsyncResult>& result)
  494 {
  495   GError* gerror = nullptr;
  496   auto retvalue = Glib::wrap(g_app_info_get_default_for_uri_scheme_finish(Glib::unwrap(result), &(gerror)));
  497   if(gerror)
  498     ::Glib::Error::throw_exception(gerror);
  499   return retvalue;
  500 }
  501 
  502 void AppInfo::reset_type_associations(const std::string& content_type)
  503 {
  504   g_app_info_reset_type_associations(content_type.c_str());
  505 }
  506 
  507 bool AppInfo::launch_default_for_uri(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& context)
  508 {
  509   GError* gerror = nullptr;
  510   auto retvalue = g_app_info_launch_default_for_uri(uri.c_str(), Glib::unwrap(context), &(gerror));
  511   if(gerror)
  512     ::Glib::Error::throw_exception(gerror);
  513   return retvalue;
  514 }
  515 
  516 bool AppInfo::launch_default_for_uri(const std::string& uri)
  517 {
  518   GError* gerror = nullptr;
  519   auto retvalue = g_app_info_launch_default_for_uri(uri.c_str(), nullptr, &(gerror));
  520   if(gerror)
  521     ::Glib::Error::throw_exception(gerror);
  522   return retvalue;
  523 }
  524 
  525 void AppInfo::launch_default_for_uri_async(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& context, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
  526 {
  527   // Create a copy of the slot.
  528   auto slot_copy = new SlotAsyncReady(slot); 
  529 
  530   g_app_info_launch_default_for_uri_async(uri.c_str(), Glib::unwrap(context), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
  531 }
  532 
  533 void AppInfo::launch_default_for_uri_async(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& context, const SlotAsyncReady& slot)
  534 {
  535   // Create a copy of the slot.
  536   auto slot_copy = new SlotAsyncReady(slot); 
  537 
  538   g_app_info_launch_default_for_uri_async(uri.c_str(), Glib::unwrap(context), nullptr, &SignalProxy_async_callback, slot_copy);
  539 }
  540 
  541 void AppInfo::launch_default_for_uri_async(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& context, const Glib::RefPtr<Cancellable>& cancellable)
  542 {
  543   g_app_info_launch_default_for_uri_async(uri.c_str(), Glib::unwrap(context), const_cast<GCancellable*>(Glib::unwrap(cancellable)), nullptr, nullptr);
  544 }
  545 
  546 void AppInfo::launch_default_for_uri_async(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& context)
  547 {
  548   g_app_info_launch_default_for_uri_async(uri.c_str(), Glib::unwrap(context), nullptr, nullptr, nullptr);
  549 }
  550 
  551 void AppInfo::launch_default_for_uri_async(const std::string& uri, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
  552 {
  553   // Create a copy of the slot.
  554   auto slot_copy = new SlotAsyncReady(slot); 
  555 
  556   g_app_info_launch_default_for_uri_async(uri.c_str(), nullptr, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
  557 }
  558 
  559 void AppInfo::launch_default_for_uri_async(const std::string& uri, const SlotAsyncReady& slot)
  560 {
  561   // Create a copy of the slot.
  562   auto slot_copy = new SlotAsyncReady(slot); 
  563 
  564   g_app_info_launch_default_for_uri_async(uri.c_str(), nullptr, nullptr, &SignalProxy_async_callback, slot_copy);
  565 }
  566 
  567 void AppInfo::launch_default_for_uri_async(const std::string& uri, const Glib::RefPtr<Cancellable>& cancellable)
  568 {
  569   g_app_info_launch_default_for_uri_async(uri.c_str(), nullptr, const_cast<GCancellable*>(Glib::unwrap(cancellable)), nullptr, nullptr);
  570 }
  571 
  572 void AppInfo::launch_default_for_uri_async(const std::string& uri)
  573 {
  574   g_app_info_launch_default_for_uri_async(uri.c_str(), nullptr, nullptr, nullptr, nullptr);
  575 }
  576 
  577 bool AppInfo::launch_default_for_uri_finish(const Glib::RefPtr<AsyncResult>& result)
  578 {
  579   GError* gerror = nullptr;
  580   auto retvalue = g_app_info_launch_default_for_uri_finish(Glib::unwrap(result), &(gerror));
  581   if(gerror)
  582     ::Glib::Error::throw_exception(gerror);
  583   return retvalue;
  584 }
  585 
  586 
  587 } // namespace Gio
  588 
  589