diff options
Diffstat (limited to 'gio/src/resolver.ccg')
-rw-r--r-- | gio/src/resolver.ccg | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gio/src/resolver.ccg b/gio/src/resolver.ccg index 093f6981..df3e0df1 100644 --- a/gio/src/resolver.ccg +++ b/gio/src/resolver.ccg @@ -19,6 +19,22 @@ #include <glibmm/error.h> #include "slot_async.h" +namespace { + +struct SrvTargetListTraits +{ + using CppType = Gio::SrvTarget; + using CType = const GSrvTarget*; + using CTypeNonConst = GSrvTarget*; + + static CType to_c_type(const CppType& item) { return item.gobj(); } + static CType to_c_type(CType ptr) { return ptr; } + static CppType to_cpp_type(CType item) { return CppType(const_cast<CTypeNonConst>(item), true /* take_copy */); } + static void release_c_type(CType item) { g_srv_target_free(const_cast<CTypeNonConst>(item)); } +}; + +} // anonymous namespace + namespace Gio { |