[glibmm] Gio::DBus::Server: Change ServerFlags to Server::Flags.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::DBus::Server: Change ServerFlags to Server::Flags.
- Date: Wed, 19 Apr 2017 08:37:46 +0000 (UTC)
commit cfeabd710fe5f029e644353957fc3e92e6314514
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Apr 19 10:09:33 2017 +0200
Gio::DBus::Server: Change ServerFlags to Server::Flags.
gio/src/dbusserver.ccg | 18 ++++++++++--------
gio/src/dbusserver.hg | 26 +++++++++++++-------------
tools/m4/convert_gio.m4 | 2 +-
3 files changed, 24 insertions(+), 22 deletions(-)
---
diff --git a/gio/src/dbusserver.ccg b/gio/src/dbusserver.ccg
index 7134737..403bd3b 100644
--- a/gio/src/dbusserver.ccg
+++ b/gio/src/dbusserver.ccg
@@ -21,6 +21,8 @@
#include <giomm/dbusconnection.h>
#include <giomm/dbusauthobserver.h>
+using Flags = Gio::DBus::Server::Flags;
+
namespace Gio
{
@@ -29,7 +31,7 @@ namespace DBus
Server::Server(const std::string& address, const std::string& guid,
const Glib::RefPtr<AuthObserver>& observer, const Glib::RefPtr<Cancellable>& cancellable,
- ServerFlags flags)
+ Flags flags)
: _CONSTRUCT("address", Glib::c_str_or_nullptr(address), "flags",
static_cast<GDBusServerFlags>(flags), "guid", Glib::c_str_or_nullptr(guid),
"authentication-observer", Glib::unwrap(observer))
@@ -38,7 +40,7 @@ Server::Server(const std::string& address, const std::string& guid,
}
Server::Server(const std::string& address, const std::string& guid,
- const Glib::RefPtr<Cancellable>& cancellable, ServerFlags flags)
+ const Glib::RefPtr<Cancellable>& cancellable, Flags flags)
: _CONSTRUCT("address", Glib::c_str_or_nullptr(address), "flags",
static_cast<GDBusServerFlags>(flags), "guid", Glib::c_str_or_nullptr(guid),
"authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
@@ -47,7 +49,7 @@ Server::Server(const std::string& address, const std::string& guid,
}
Server::Server(const std::string& address, const std::string& guid,
- const Glib::RefPtr<AuthObserver>& observer, ServerFlags flags)
+ const Glib::RefPtr<AuthObserver>& observer, Flags flags)
: _CONSTRUCT("address", Glib::c_str_or_nullptr(address), "flags",
static_cast<GDBusServerFlags>(flags), "guid", Glib::c_str_or_nullptr(guid),
"authentication-observer", Glib::unwrap(observer))
@@ -55,7 +57,7 @@ Server::Server(const std::string& address, const std::string& guid,
init();
}
-Server::Server(const std::string& address, const std::string& guid, ServerFlags flags)
+Server::Server(const std::string& address, const std::string& guid, Flags flags)
: _CONSTRUCT("address", Glib::c_str_or_nullptr(address), "flags",
static_cast<GDBusServerFlags>(flags), "guid", Glib::c_str_or_nullptr(guid),
"authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
@@ -66,27 +68,27 @@ Server::Server(const std::string& address, const std::string& guid, ServerFlags
Glib::RefPtr<Server>
Server::create_sync(const std::string& address, const std::string& guid,
const Glib::RefPtr<AuthObserver>& observer, const Glib::RefPtr<Cancellable>& cancellable,
- ServerFlags flags)
+ Flags flags)
{
return Glib::make_refptr_for_instance<Server>(new Server(address, guid, observer, cancellable, flags));
}
Glib::RefPtr<Server>
Server::create_sync(const std::string& address, const std::string& guid,
- const Glib::RefPtr<Cancellable>& cancellable, ServerFlags flags)
+ const Glib::RefPtr<Cancellable>& cancellable, Flags flags)
{
return Glib::make_refptr_for_instance<Server>(new Server(address, guid, cancellable, flags));
}
Glib::RefPtr<Server>
Server::create_sync(const std::string& address, const std::string& guid,
- const Glib::RefPtr<AuthObserver>& observer, ServerFlags flags)
+ const Glib::RefPtr<AuthObserver>& observer, Flags flags)
{
return Glib::make_refptr_for_instance<Server>(new Server(address, guid, observer, flags));
}
Glib::RefPtr<Server>
-Server::create_sync(const std::string& address, const std::string& guid, ServerFlags flags)
+Server::create_sync(const std::string& address, const std::string& guid, Flags flags)
{
return Glib::make_refptr_for_instance<Server>(new Server(address, guid, flags));
}
diff --git a/gio/src/dbusserver.hg b/gio/src/dbusserver.hg
index 64aefa0..914dd17 100644
--- a/gio/src/dbusserver.hg
+++ b/gio/src/dbusserver.hg
@@ -29,8 +29,6 @@ namespace Gio
namespace DBus
{
-_WRAP_ENUM(ServerFlags, GDBusServerFlags, NO_GTYPE)
-
_GMMPROC_EXTRA_NAMESPACE(DBus)
//TODO: Add example from the C API in class docs.
@@ -54,27 +52,29 @@ class Server : public Glib::Object, public Initable
_CLASS_GOBJECT(Server, GDBusServer, G_DBUS_SERVER, Glib::Object, GObject)
_IMPLEMENTS_INTERFACE(Initable)
-protected:
+public:
+ _WRAP_ENUM(Flags, GDBusServerFlags, NO_GTYPE)
+protected:
Server(const std::string& address,
const std::string& guid,
const Glib::RefPtr<AuthObserver>& observer,
const Glib::RefPtr<Cancellable>& cancellable,
- ServerFlags flags);
+ Flags flags);
Server(const std::string& address,
const std::string& guid,
const Glib::RefPtr<Cancellable>& cancellable,
- ServerFlags flags);
+ Flags flags);
Server(const std::string& address,
const std::string& guid,
const Glib::RefPtr<AuthObserver>& observer,
- ServerFlags flags);
+ Flags flags);
Server(const std::string& address,
const std::string& guid,
- ServerFlags flags);
+ Flags flags);
public:
@@ -84,38 +84,38 @@ public:
const std::string& guid,
const Glib::RefPtr<AuthObserver>& observer,
const Glib::RefPtr<Cancellable>& cancellable,
- ServerFlags flags = Gio::DBus::ServerFlags::NONE);
+ Flags flags = Gio::DBus::Server::Flags::NONE);
_WRAP_METHOD_DOCS_ONLY(g_dbus_server_new_sync)
/// @throw Glib::Error.
static Glib::RefPtr<Server> create_sync(const std::string& address,
const std::string& guid,
const Glib::RefPtr<Cancellable>& cancellable,
- ServerFlags flags = Gio::DBus::ServerFlags::NONE);
+ Flags flags = Gio::DBus::Server::Flags::NONE);
/// Non-cancellable version of create_sync().
static Glib::RefPtr<Server> create_sync(const std::string& address,
const std::string& guid,
const Glib::RefPtr<AuthObserver>& observer,
- ServerFlags flags = Gio::DBus::ServerFlags::NONE);
+ Flags flags = Gio::DBus::Server::Flags::NONE);
/// Non-cancellable version of create_sync().
static Glib::RefPtr<Server> create_sync(const std::string& address,
const std::string& guid,
- ServerFlags flags = Gio::DBus::ServerFlags::NONE);
+ Flags flags = Gio::DBus::Server::Flags::NONE);
_WRAP_METHOD(void start(), g_dbus_server_start)
_WRAP_METHOD(void stop(), g_dbus_server_stop)
_WRAP_METHOD(bool is_active() const, g_dbus_server_is_active)
_WRAP_METHOD(std::string get_guid() const, g_dbus_server_get_guid)
- _WRAP_METHOD(ServerFlags get_flags() const, g_dbus_server_get_flags)
+ _WRAP_METHOD(Flags get_flags() const, g_dbus_server_get_flags)
_WRAP_METHOD(std::string get_client_address() const, g_dbus_server_get_client_address)
_WRAP_PROPERTY("active", bool)
_WRAP_PROPERTY("address", std::string)
_WRAP_PROPERTY("authentication-observer", Glib::RefPtr<AuthObserver>)
_WRAP_PROPERTY("client-address", std::string)
- _WRAP_PROPERTY("flags", ServerFlags)
+ _WRAP_PROPERTY("flags", Flags)
_WRAP_PROPERTY("guid", std::string)
#m4 _CONVERSION(`GDBusConnection*', `const Glib::RefPtr<Connection>&', `Glib::wrap($3, true)')
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index 63f77d4..c9ef2fd 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -42,7 +42,7 @@ _CONV_GIO_DBUS_ENUM(MessageHeaderField)
_CONV_GIO_DBUS_ENUM(MessageType)
_CONV_GIO_DBUS_ENUM(ProxyFlags)
_CONV_GIO_DBUS_ENUM(SendMessageFlags)
-_CONV_GIO_DBUS_ENUM(ServerFlags)
+_CONV_GIO_DBUS_INCLASS_ENUM(Server,Flags)
_CONV_GIO_INCLASS_ENUM(Drive,StartFlags)
_CONV_GIO_INCLASS_ENUM(Drive,StartStopType)
_CONV_GIO_INCLASS_ENUM(Emblem,Origin)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]