[glibmm] Put _WRAP_VFUNC in protected sections



commit c095eeaee5d498b26ff4fb59a97b1b4c3c7951b7
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri Mar 15 18:20:50 2019 +0100

    Put _WRAP_VFUNC in protected sections

 gio/src/action.hg               | 1 +
 gio/src/actiongroup.hg          | 1 +
 gio/src/actionmap.hg            | 2 +-
 gio/src/asyncresult.hg          | 1 +
 gio/src/converter.hg            | 1 +
 gio/src/dbusinterface.hg        | 1 +
 gio/src/dbusobject.hg           | 1 +
 gio/src/drive.hg                | 1 +
 gio/src/file.hg                 | 2 +-
 gio/src/filemonitor.hg          | 5 +++--
 gio/src/icon.hg                 | 1 +
 gio/src/initable.hg             | 1 +
 gio/src/listmodel.hg            | 1 +
 gio/src/pollableinputstream.hg  | 1 +
 gio/src/pollableoutputstream.hg | 1 +
 gio/src/remoteactiongroup.hg    | 2 +-
 gio/src/seekable.hg             | 1 +
 gio/src/socketcontrolmessage.hg | 1 +
 gio/src/tlscertificate.hg       | 1 +
 gio/src/tlsconnection.hg        | 1 +
 gio/src/tlsdatabase.hg          | 1 +
 gio/src/tlsinteraction.hg       | 4 +---
 gio/src/tlspassword.hg          | 1 +
 gio/src/volume.hg               | 1 +
 gio/src/volumemonitor.hg        | 3 ++-
 25 files changed, 28 insertions(+), 9 deletions(-)
---
diff --git a/gio/src/action.hg b/gio/src/action.hg
index 50758467..6ceb81c0 100644
--- a/gio/src/action.hg
+++ b/gio/src/action.hg
@@ -202,6 +202,7 @@ public:
   _WRAP_PROPERTY("state", Glib::VariantBase)
   _WRAP_PROPERTY("state-type", Glib::VariantType)
 
+protected:
 #m4 _CONVERSION(`Glib::ustring',`const gchar*',`$3.c_str()')
   _WRAP_VFUNC(Glib::ustring get_name() const, "get_name", keep_return)
 
diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg
index de43abf6..0a693143 100644
--- a/gio/src/actiongroup.hg
+++ b/gio/src/actiongroup.hg
@@ -136,6 +136,7 @@ public:
 
   _WRAP_SIGNAL(void action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& value), 
"action-state-changed", detail_name action_name)
 
+protected:
   _WRAP_VFUNC(bool has_action(const Glib::ustring& name) const, "has_action")
 
 #m4 
_CONVERSION(`std::vector<Glib::ustring>',`gchar**',`g_strdupv(const_cast<gchar**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data()))')
diff --git a/gio/src/actionmap.hg b/gio/src/actionmap.hg
index b3fa9e23..8e8f4371 100644
--- a/gio/src/actionmap.hg
+++ b/gio/src/actionmap.hg
@@ -182,7 +182,7 @@ public:
    */
   Glib::RefPtr<SimpleAction> add_action_radio_integer(const Glib::ustring& name, const 
ActivateWithIntParameterSlot& slot, gint32 state);
 
-
+protected:
 #m4 _CONVERSION(`Glib::RefPtr<Action>', `GAction*', `Glib::unwrap($3)')
   _WRAP_VFUNC(Glib::RefPtr<Action> lookup_action(const Glib::ustring& name) const, "lookup_action", 
refreturn)
 
diff --git a/gio/src/asyncresult.hg b/gio/src/asyncresult.hg
index 3076a0a3..892072b5 100644
--- a/gio/src/asyncresult.hg
+++ b/gio/src/asyncresult.hg
@@ -113,6 +113,7 @@ public:
 
   _WRAP_METHOD(bool is_tagged(gpointer source_tag) const, g_async_result_is_tagged)
 
+protected:
   // The compiler cannot find an unwrap() for ObjectBase, because
   // ObjectBase::BaseObjectType is not declared.
   //#m4 _CONVERSION(`Glib::RefPtr<Glib::ObjectBase>',`GObject*',__CONVERT_REFPTR_TO_P)
diff --git a/gio/src/converter.hg b/gio/src/converter.hg
index c34ea63d..21f8e081 100644
--- a/gio/src/converter.hg
+++ b/gio/src/converter.hg
@@ -48,6 +48,7 @@ public:
   _WRAP_METHOD(Result convert(const void* inbuf, gsize inbuf_size, void* outbuf, gsize outbuf_size, Flags 
flags, gsize& bytes_read, gsize& bytes_written), g_converter_convert, errthrow)
   _WRAP_METHOD(void reset(), g_converter_reset)
 
+protected:
 #m4 _CONVERSION(`gsize*',`gsize&',`*($3)')
   _WRAP_VFUNC(Result convert(const void* inbuf, gsize inbuf_size, void* outbuf, gsize outbuf_size, Flags 
flags, gsize& bytes_read, gsize& bytes_written), "convert", errthrow)
 
diff --git a/gio/src/dbusinterface.hg b/gio/src/dbusinterface.hg
index 41cd5ece..f85c8961 100644
--- a/gio/src/dbusinterface.hg
+++ b/gio/src/dbusinterface.hg
@@ -57,6 +57,7 @@ public:
 
   _WRAP_METHOD(void set_object(const Glib::RefPtr<Gio::DBus::Object>& object), g_dbus_interface_set_object)
 
+protected:
   _WRAP_VFUNC(Glib::RefPtr<InterfaceInfo> get_info() const, "get_info")
   _WRAP_VFUNC(Glib::RefPtr<Gio::DBus::Object> get_object() const, "get_object")
 
diff --git a/gio/src/dbusobject.hg b/gio/src/dbusobject.hg
index 3be72cf0..633898f1 100644
--- a/gio/src/dbusobject.hg
+++ b/gio/src/dbusobject.hg
@@ -65,6 +65,7 @@ public:
   _WRAP_SIGNAL(void interface_added(const Glib::RefPtr<Gio::DBus::Interface>& iface), "interface_added")
   _WRAP_SIGNAL(void interface_removed(const Glib::RefPtr<Gio::DBus::Interface>& iface), "interface_removed")
 
+protected:
 #m4 _CONVERSION(`Glib::ustring',`const gchar*',`$3.c_str()')
   _WRAP_VFUNC(Glib::ustring get_object_path() const, "get_object_path", keep_return)
 
diff --git a/gio/src/drive.hg b/gio/src/drive.hg
index a65d0834..23ad141c 100644
--- a/gio/src/drive.hg
+++ b/gio/src/drive.hg
@@ -156,6 +156,7 @@ public:
   _WRAP_SIGNAL(void eject_button(), eject_button, newin "2,20")
   _WRAP_SIGNAL(void stop_button(), stop_button)
 
+protected:
   //_WRAP_VFUNC(Glib::ustring get_name() const, get_name)
   //Careful of ref-counting: //_WRAP_VFUNC(Glib::RefPtr<Icon> get_icon() const, get_icon)
   //_WRAP_VFUNC(bool has_volumes() const, has_volumes)
diff --git a/gio/src/file.hg b/gio/src/file.hg
index 1d321507..32e2b0e1 100644
--- a/gio/src/file.hg
+++ b/gio/src/file.hg
@@ -2398,9 +2398,9 @@ public:
 
   _IGNORE(g_file_replace_contents_async)
 
-
   _WRAP_METHOD(bool supports_thread_contexts() const, g_file_supports_thread_contexts)
 
+protected:
   // *** vfuncs ***
 
   //_WRAP_VFUNC(Glib::RefPtr<File> dup() const, "dup")
diff --git a/gio/src/filemonitor.hg b/gio/src/filemonitor.hg
index e51eddfd..32643bab 100644
--- a/gio/src/filemonitor.hg
+++ b/gio/src/filemonitor.hg
@@ -55,10 +55,11 @@ public:
 #m4 _CONVERSION(`GFile*',`const Glib::RefPtr<File>&',`Glib::wrap($3, true)')
   _WRAP_SIGNAL(void changed(const Glib::RefPtr<File>& file, const Glib::RefPtr<File>& other_file, Event 
event_type), "changed")
 
-  //_WRAP_VFUNC(bool cancel(), cancel);
-
   _WRAP_PROPERTY("rate-limit", int)
   _WRAP_PROPERTY("cancelled", bool)
+
+protected:
+  //_WRAP_VFUNC(bool cancel(), cancel);
 };
 
 } // namespace Gio
diff --git a/gio/src/icon.hg b/gio/src/icon.hg
index ce9b07ae..23cba525 100644
--- a/gio/src/icon.hg
+++ b/gio/src/icon.hg
@@ -77,6 +77,7 @@ public:
   _WRAP_METHOD(Glib::VariantBase serialize() const, g_icon_serialize, newin "2,48")
   _WRAP_METHOD(static Glib::RefPtr<Icon> deserialize(const Glib::VariantBase& value), g_icon_deserialize, 
newin "2,48")
 
+protected:
   //_WRAP_VFUNC(guint hash() const, "hash")
 
   // TODO: also kind of related to equal() being virtual or not,
diff --git a/gio/src/initable.hg b/gio/src/initable.hg
index 27e9e1ba..09bca9fd 100644
--- a/gio/src/initable.hg
+++ b/gio/src/initable.hg
@@ -56,6 +56,7 @@ protected:
   _WRAP_METHOD(void init(const Glib::RefPtr<Cancellable>& cancellable{?}),
     g_initable_init, errthrow)
 
+protected:
   _WRAP_VFUNC(bool init(const Glib::RefPtr<Cancellable>& cancellable, GError** error), "init")
 };
 
diff --git a/gio/src/listmodel.hg b/gio/src/listmodel.hg
index b7abfe96..324a9ecc 100644
--- a/gio/src/listmodel.hg
+++ b/gio/src/listmodel.hg
@@ -93,6 +93,7 @@ public:
 
   _WRAP_SIGNAL(void items_changed(guint position, guint removed, guint added), "items-changed", 
no_default_handler, newin "2,50")
 
+protected:
   _WRAP_VFUNC(GType get_item_type(), "get_item_type")
   _WRAP_VFUNC(guint get_n_items(), "get_n_items")
   _WRAP_VFUNC(gpointer get_item(guint position), "get_item")
diff --git a/gio/src/pollableinputstream.hg b/gio/src/pollableinputstream.hg
index 0000620e..e834c3f1 100644
--- a/gio/src/pollableinputstream.hg
+++ b/gio/src/pollableinputstream.hg
@@ -54,6 +54,7 @@ public:
 
   _WRAP_METHOD(gssize read_nonblocking(void* buffer, gsize count, const Glib::RefPtr<Cancellable>& 
cancellable{?}), g_pollable_input_stream_read_nonblocking, errthrow)
 
+protected:
   _WRAP_VFUNC(bool can_poll() const, "can_poll")
   _WRAP_VFUNC(bool is_readable() const, "is_readable")
 
diff --git a/gio/src/pollableoutputstream.hg b/gio/src/pollableoutputstream.hg
index d2858242..e761a872 100644
--- a/gio/src/pollableoutputstream.hg
+++ b/gio/src/pollableoutputstream.hg
@@ -55,6 +55,7 @@ public:
 
   _WRAP_METHOD(gssize write_nonblocking(const void* buffer, gsize count, const Glib::RefPtr<Cancellable>& 
cancellable{?}), g_pollable_output_stream_write_nonblocking, errthrow)
 
+protected:
   _WRAP_VFUNC(bool can_poll() const, "can_poll")
   _WRAP_VFUNC(bool is_writable() const, "is_writable")
 
diff --git a/gio/src/remoteactiongroup.hg b/gio/src/remoteactiongroup.hg
index 77c3fe2f..e4a63df4 100644
--- a/gio/src/remoteactiongroup.hg
+++ b/gio/src/remoteactiongroup.hg
@@ -56,8 +56,8 @@ public:
   _WRAP_METHOD(void activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter, 
const Glib::VariantBase& platform_data), g_remote_action_group_activate_action_full)
   _WRAP_METHOD(void change_action_state(const Glib::ustring& action_name, const Glib::VariantBase& value, 
const Glib::VariantBase& platform_data), g_remote_action_group_change_action_state_full)
 
+protected:
 #m4 _CONVERSION(`GVariant*',`const Glib::VariantBase&',`Glib::wrap($3, true)')
-
   _WRAP_VFUNC(void activate_action_full(const Glib::ustring& action_name, const Glib::VariantBase& 
parameter, const Glib::VariantBase& platform_data), "activate_action_full")
   _WRAP_VFUNC(void change_action_state_full(const Glib::ustring& action_name, const Glib::VariantBase& 
value, const Glib::VariantBase& platform_data), "change_action_state_full")
 };
diff --git a/gio/src/seekable.hg b/gio/src/seekable.hg
index ec3a635b..f32f90dc 100644
--- a/gio/src/seekable.hg
+++ b/gio/src/seekable.hg
@@ -59,6 +59,7 @@ public:
 
   //TODO: Document the exception in the C API: https://bugzilla.gnome.org/show_bug.cgi?id=509990#c1
 
+protected:
   //_WRAP_VFUNC(goffset tell() const, tell)
   //_WRAP_VFUNC(goffset can_seek() const, can_seek)
   //_WRAP_VFUNC(goffset seek(goffset offset, Glib::SeekType type, const Glib::RefPtr<Cancellable>& 
cancellable, GError** error), seek)
diff --git a/gio/src/socketcontrolmessage.hg b/gio/src/socketcontrolmessage.hg
index 96e5f36a..9f9845c4 100644
--- a/gio/src/socketcontrolmessage.hg
+++ b/gio/src/socketcontrolmessage.hg
@@ -59,6 +59,7 @@ public:
   _WRAP_METHOD(gsize get_size() const, g_socket_control_message_get_size)
   _WRAP_METHOD(void serialize(gpointer data), g_socket_control_message_serialize)
 
+protected:
   //TODO: The deserialize vfunc does not have a GSocketControlMessage for its
   //first parameter so it is difficult to wrap.
   //_WRAP_VFUNC(Glib::RefPtr<SocketControlMessage> deserialize(int level, int type, gsize size, gpointer 
data), "deserialize")
diff --git a/gio/src/tlscertificate.hg b/gio/src/tlscertificate.hg
index 09c992e2..3f36566a 100644
--- a/gio/src/tlscertificate.hg
+++ b/gio/src/tlscertificate.hg
@@ -79,6 +79,7 @@ public:
   // Write-only and construct-only
   //_WRAP_PROPERTY("private-key-pem", std::string)
 
+protected:
 #m4 _CONVERSION(`GSocketConnectable*',`const Glib::RefPtr<const SocketConnectable>&',`Glib::wrap($3, true)')
 #m4 _CONVERSION(`GTlsCertificate*',`const Glib::RefPtr<const TlsCertificate>&',`Glib::wrap($3, true)')
   _WRAP_VFUNC(TlsCertificateFlags verify(const Glib::RefPtr<const SocketConnectable>& identity, const 
Glib::RefPtr<const TlsCertificate>& trusted_ca) const, "verify")
diff --git a/gio/src/tlsconnection.hg b/gio/src/tlsconnection.hg
index 5c923b36..6ba9c73b 100644
--- a/gio/src/tlsconnection.hg
+++ b/gio/src/tlsconnection.hg
@@ -90,6 +90,7 @@ public:
 #m4 _CONVERSION(`GTlsCertificate*',`const Glib::RefPtr<const TlsCertificate>&',`Glib::wrap($3, true)')
   _WRAP_SIGNAL(bool accept_certificate(const Glib::RefPtr<const TlsCertificate>& peer_cert, 
TlsCertificateFlags errors), "accept_certificate")
 
+protected:
   _WRAP_VFUNC(bool handshake(const Glib::RefPtr<Cancellable>& cancellable), "handshake", errthrow)
   _WRAP_VFUNC(void handshake_async(const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& 
cancellable{.}, int io_priority{.} = Glib::PRIORITY_DEFAULT), "handshake_async", slot_name slot, 
slot_callback SignalProxy_async_callback)
 
diff --git a/gio/src/tlsdatabase.hg b/gio/src/tlsdatabase.hg
index c53ef51a..773e6c91 100644
--- a/gio/src/tlsdatabase.hg
+++ b/gio/src/tlsdatabase.hg
@@ -87,6 +87,7 @@ public:
   _WRAP_METHOD(void lookup_certificate_for_handle_async(const Glib::ustring& handle, const 
Glib::RefPtr<TlsInteraction>& interaction{?}, const SlotAsyncReady& slot{callback}, const 
Glib::RefPtr<Cancellable>& cancellable{.?}, LookupFlags flags{.} = LookupFlags::NONE), 
g_tls_database_lookup_certificate_for_handle_async, slot_name slot, slot_callback SignalProxy_async_callback)
   _WRAP_METHOD(Glib::RefPtr<TlsCertificate> lookup_certificate_for_handle_finish(const 
Glib::RefPtr<AsyncResult>& result), g_tls_database_lookup_certificate_for_handle_finish, errthrow)
 
+protected:
 #m4 _CONVERSION(`GTlsCertificate*',`const Glib::RefPtr<TlsCertificate>&',`Glib::wrap($3, true)')
 #m4 _CONVERSION(`GSocketConnectable*',`const Glib::RefPtr<const SocketConnectable>&',`Glib::wrap($3, true)')
 #m4 _CONVERSION(`GTlsInteraction*',`const Glib::RefPtr<TlsInteraction>&',`Glib::wrap($3, true)')
diff --git a/gio/src/tlsinteraction.hg b/gio/src/tlsinteraction.hg
index 09bb2cb8..bcb3ec6b 100644
--- a/gio/src/tlsinteraction.hg
+++ b/gio/src/tlsinteraction.hg
@@ -66,8 +66,6 @@ public:
   _WRAP_METHOD(TlsInteractionResult ask_password_finish(const Glib::RefPtr<AsyncResult>& result), 
g_tls_interaction_ask_password_finish, errthrow)
   _WRAP_METHOD(TlsInteractionResult invoke_ask_password(const Glib::RefPtr<TlsPassword>& password, const 
Glib::RefPtr<Cancellable>& cancellable{?}), g_tls_interaction_invoke_ask_password, errthrow)
 
-
-
   _WRAP_METHOD(TlsInteractionResult invoke_request_certificate(const Glib::RefPtr<TlsConnection>& 
connection, TlsCertificateRequestFlags flags, const Glib::RefPtr<Cancellable>& cancellable{?}), 
g_tls_interaction_invoke_request_certificate, errthrow)
 
   _WRAP_METHOD(TlsInteractionResult request_certificate(const Glib::RefPtr<TlsConnection>& connection, 
TlsCertificateRequestFlags flags, const Glib::RefPtr<Cancellable>& cancellable{?}), 
g_tls_interaction_request_certificate, errthrow)
@@ -76,7 +74,7 @@ public:
 
   _WRAP_METHOD(TlsInteractionResult request_certificate_finish(const Glib::RefPtr<AsyncResult>& result), 
g_tls_interaction_request_certificate_finish, errthrow)
 
-
+protected:
 #m4 _CONVERSION(`GTlsPassword*',`const Glib::RefPtr<TlsPassword>&',`Glib::wrap($3, true)')
   _WRAP_VFUNC(TlsInteractionResult ask_password(const Glib::RefPtr<TlsPassword>& password, const 
Glib::RefPtr<Cancellable>& cancellable), "ask_password", errthrow)
   _WRAP_VFUNC(void ask_password_async(const Glib::RefPtr<TlsPassword>& password, const SlotAsyncReady& 
slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.}), "ask_password_async", slot_name slot, 
slot_callback SignalProxy_async_callback)
diff --git a/gio/src/tlspassword.hg b/gio/src/tlspassword.hg
index 917061ca..e314af89 100644
--- a/gio/src/tlspassword.hg
+++ b/gio/src/tlspassword.hg
@@ -62,6 +62,7 @@ public:
   _WRAP_PROPERTY("flags", Flags)
   _WRAP_PROPERTY("warning", Glib::ustring)
 
+protected:
 #m4 _CONVERSION(`gsize*', `gsize&', `*($3)')
   _WRAP_VFUNC(const guchar* get_value(gsize& length) const, "get_value")
 
diff --git a/gio/src/volume.hg b/gio/src/volume.hg
index 37b51e25..4bad6c45 100644
--- a/gio/src/volume.hg
+++ b/gio/src/volume.hg
@@ -156,6 +156,7 @@ public:
   _WRAP_SIGNAL(void changed(), changed)
   _WRAP_SIGNAL(void removed(), removed)
 
+protected:
   //_WRAP_VFUNC(std::string get_name(), get_name)
   //_WRAP_VFUNC(Glib::RefPtr<Icon> get_icon(), get_icon)
   //_WRAP_VFUNC(std::string get_uuid(), get_uuid)
diff --git a/gio/src/volumemonitor.hg b/gio/src/volumemonitor.hg
index d36e0d31..bba03cce 100644
--- a/gio/src/volumemonitor.hg
+++ b/gio/src/volumemonitor.hg
@@ -75,7 +75,8 @@ public:
   _WRAP_SIGNAL(void drive_eject_button(const Glib::RefPtr<Drive>& drive), drive_eject_button)
   _WRAP_SIGNAL(void drive_stop_button(const Glib::RefPtr<Drive>& drive), drive_stop_button)
 
-  //TODO: Use ListHandle?
+protected:
+  //TODO: Use ListHandler?
   //_WRAP_VFUNC(GList* get_volumes(), get_volumes)
   //_WRAP_VFUNC(GList* get_mounts(), get_mounts)
 


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