1 #ifndef _GLIBMM_VARIANT_DBUS_STRING_H 2 #define _GLIBMM_VARIANT_DBUS_STRING_H 3 /* Copyright (C) 2017 The glibmm Development Team 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #include <glibmm/ustring.h> 20 21 namespace Glib 22 { 23 24 /** String class for D-Bus object paths in Glib::Variant. 25 * 26 * Use it if you want to create a Glib::Variant with D-Bus object paths. 27 * 28 * @code 29 * using opstring_with_string_t = 30 * std::map<Glib::DBusObjectPathString, Glib::Variant<Glib::ustring>>; 31 * opstring_with_string_t map1; 32 * map1["/map1/path1"] = Glib::Variant<Glib::ustring>::create("value1"); 33 * auto variant1 = Glib::Variant<opstring_with_string_t>::create(map1); 34 * @endcode 35 * 36 * @newin{2,54} 37 * @ingroup Variant 38 */ 39 class GLIBMM_API DBusObjectPathString : public Glib::ustring 40 { 41 public: 42 using Glib::ustring::ustring; 43 }; 44 45 /** String class for D-Bus signatures in Glib::Variant. 46 * 47 * Use it if you want to create a Glib::Variant with a D-Bus signature. 48 * 49 * @code 50 * auto variant = Glib::Variant<Glib::DBusSignatureString>::create("s"); 51 * @endcode 52 * 53 * @newin{2,54} 54 * @ingroup Variant 55 */ 56 class GLIBMM_API DBusSignatureString : public Glib::ustring 57 { 58 public: 59 using Glib::ustring::ustring; 60 }; 61 62 } // namespace Glib 63 64 #endif /* _GLIBMM_VARIANT_DBUS_STRING_H */ 65