mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
refactor: Remove experimental string_view include
This commit is contained in:
@@ -56,17 +56,17 @@ namespace XSwiftBus
|
|||||||
return dbus_message_get_serial(m_message);
|
return dbus_message_get_serial(m_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
string_view CDBusMessage::getInterfaceName() const
|
std::string_view CDBusMessage::getInterfaceName() const
|
||||||
{
|
{
|
||||||
return dbus_message_get_interface(m_message);
|
return dbus_message_get_interface(m_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
string_view CDBusMessage::getObjectPath() const
|
std::string_view CDBusMessage::getObjectPath() const
|
||||||
{
|
{
|
||||||
return dbus_message_get_path(m_message);
|
return dbus_message_get_path(m_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
string_view CDBusMessage::getMethodName() const
|
std::string_view CDBusMessage::getMethodName() const
|
||||||
{
|
{
|
||||||
return dbus_message_get_member(m_message);
|
return dbus_message_get_member(m_message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,23 +7,10 @@
|
|||||||
#include "dbus/dbus.h"
|
#include "dbus/dbus.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#if defined(_MSC_VER)
|
|
||||||
# include <experimental/string>
|
|
||||||
#elif defined(__clang__)
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#else
|
|
||||||
# include <experimental/string_view>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace XSwiftBus
|
namespace XSwiftBus
|
||||||
{
|
{
|
||||||
|
|
||||||
#if defined(_MSC_VER) || defined(__clang__)
|
|
||||||
using std::string_view;
|
|
||||||
#else
|
|
||||||
using std::experimental::string_view;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! DBus Message
|
//! DBus Message
|
||||||
class CDBusMessage
|
class CDBusMessage
|
||||||
{
|
{
|
||||||
@@ -53,13 +40,13 @@ namespace XSwiftBus
|
|||||||
dbus_uint32_t getSerial() const;
|
dbus_uint32_t getSerial() const;
|
||||||
|
|
||||||
//! Get the called interface name
|
//! Get the called interface name
|
||||||
string_view getInterfaceName() const;
|
std::string_view getInterfaceName() const;
|
||||||
|
|
||||||
//! Get the called object path
|
//! Get the called object path
|
||||||
string_view getObjectPath() const;
|
std::string_view getObjectPath() const;
|
||||||
|
|
||||||
//! Get the called method name
|
//! Get the called method name
|
||||||
string_view getMethodName() const;
|
std::string_view getMethodName() const;
|
||||||
|
|
||||||
//! Begin writing argument
|
//! Begin writing argument
|
||||||
void beginArgumentWrite();
|
void beginArgumentWrite();
|
||||||
|
|||||||
Reference in New Issue
Block a user