Use correct signature for C callbacks
This commit is contained in:
@@ -47,6 +47,7 @@ static const char introspection_xml[] =
|
|||||||
|
|
||||||
class wxWebViewWebKitExtension;
|
class wxWebViewWebKitExtension;
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
static gboolean
|
static gboolean
|
||||||
wxgtk_webview_authorize_authenticated_peer_cb(GDBusAuthObserver *observer,
|
wxgtk_webview_authorize_authenticated_peer_cb(GDBusAuthObserver *observer,
|
||||||
GIOStream *stream,
|
GIOStream *stream,
|
||||||
@@ -55,7 +56,8 @@ wxgtk_webview_authorize_authenticated_peer_cb(GDBusAuthObserver *observer,
|
|||||||
static void
|
static void
|
||||||
wxgtk_webview_dbus_connection_created_cb(GObject *source_object,
|
wxgtk_webview_dbus_connection_created_cb(GObject *source_object,
|
||||||
GAsyncResult *result,
|
GAsyncResult *result,
|
||||||
wxWebViewWebKitExtension *extension);
|
void* user_data);
|
||||||
|
} // extern "C"
|
||||||
|
|
||||||
static wxWebViewWebKitExtension *gs_extension = NULL;
|
static wxWebViewWebKitExtension *gs_extension = NULL;
|
||||||
|
|
||||||
@@ -93,7 +95,7 @@ wxWebViewWebKitExtension::wxWebViewWebKitExtension(WebKitWebExtension *extension
|
|||||||
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT,
|
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT,
|
||||||
observer,
|
observer,
|
||||||
NULL,
|
NULL,
|
||||||
(GAsyncReadyCallback)wxgtk_webview_dbus_connection_created_cb,
|
wxgtk_webview_dbus_connection_created_cb,
|
||||||
this);
|
this);
|
||||||
g_object_unref(observer);
|
g_object_unref(observer);
|
||||||
}
|
}
|
||||||
@@ -299,6 +301,7 @@ void wxWebViewWebKitExtension::SetDBusConnection(GDBusConnection *dbusConnection
|
|||||||
m_dbusConnection = dbusConnection;
|
m_dbusConnection = dbusConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
static void
|
static void
|
||||||
wxgtk_webview_handle_method_call(GDBusConnection *connection,
|
wxgtk_webview_handle_method_call(GDBusConnection *connection,
|
||||||
const char *sender,
|
const char *sender,
|
||||||
@@ -345,6 +348,7 @@ wxgtk_webview_handle_method_call(GDBusConnection *connection,
|
|||||||
extension->HasSelection(parameters, invocation);
|
extension->HasSelection(parameters, invocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} // extern "C"
|
||||||
|
|
||||||
static const GDBusInterfaceVTable interface_vtable = {
|
static const GDBusInterfaceVTable interface_vtable = {
|
||||||
wxgtk_webview_handle_method_call,
|
wxgtk_webview_handle_method_call,
|
||||||
@@ -352,6 +356,7 @@ static const GDBusInterfaceVTable interface_vtable = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static
|
||||||
gboolean
|
gboolean
|
||||||
wxgtk_webview_dbus_peer_is_authorized(GCredentials *peer_credentials)
|
wxgtk_webview_dbus_peer_is_authorized(GCredentials *peer_credentials)
|
||||||
{
|
{
|
||||||
@@ -371,6 +376,7 @@ wxgtk_webview_dbus_peer_is_authorized(GCredentials *peer_credentials)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
static gboolean
|
static gboolean
|
||||||
wxgtk_webview_authorize_authenticated_peer_cb(GDBusAuthObserver *observer,
|
wxgtk_webview_authorize_authenticated_peer_cb(GDBusAuthObserver *observer,
|
||||||
GIOStream *stream,
|
GIOStream *stream,
|
||||||
@@ -383,7 +389,7 @@ wxgtk_webview_authorize_authenticated_peer_cb(GDBusAuthObserver *observer,
|
|||||||
static void
|
static void
|
||||||
wxgtk_webview_dbus_connection_created_cb(GObject *source_object,
|
wxgtk_webview_dbus_connection_created_cb(GObject *source_object,
|
||||||
GAsyncResult *result,
|
GAsyncResult *result,
|
||||||
wxWebViewWebKitExtension *extension)
|
void* user_data)
|
||||||
{
|
{
|
||||||
static GDBusNodeInfo *introspection_data =
|
static GDBusNodeInfo *introspection_data =
|
||||||
g_dbus_node_info_new_for_xml(introspection_xml, NULL);
|
g_dbus_node_info_new_for_xml(introspection_xml, NULL);
|
||||||
@@ -398,6 +404,8 @@ wxgtk_webview_dbus_connection_created_cb(GObject *source_object,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxWebViewWebKitExtension* extension = static_cast<wxWebViewWebKitExtension*>(user_data);
|
||||||
|
|
||||||
guint registration_id =
|
guint registration_id =
|
||||||
g_dbus_connection_register_object(connection,
|
g_dbus_connection_register_object(connection,
|
||||||
WXGTK_WEB_EXTENSION_OBJECT_PATH,
|
WXGTK_WEB_EXTENSION_OBJECT_PATH,
|
||||||
@@ -417,7 +425,7 @@ wxgtk_webview_dbus_connection_created_cb(GObject *source_object,
|
|||||||
extension->SetDBusConnection(connection);
|
extension->SetDBusConnection(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" WXEXPORT void
|
WXEXPORT void
|
||||||
webkit_web_extension_initialize_with_user_data (WebKitWebExtension *webkit_extension,
|
webkit_web_extension_initialize_with_user_data (WebKitWebExtension *webkit_extension,
|
||||||
GVariant *user_data)
|
GVariant *user_data)
|
||||||
{
|
{
|
||||||
@@ -428,3 +436,4 @@ webkit_web_extension_initialize_with_user_data (WebKitWebExtension *webkit_exten
|
|||||||
gs_extension = new wxWebViewWebKitExtension(webkit_extension,
|
gs_extension = new wxWebViewWebKitExtension(webkit_extension,
|
||||||
server_address);
|
server_address);
|
||||||
}
|
}
|
||||||
|
} // extern "C"
|
||||||
|
Reference in New Issue
Block a user