2010-05-12 23:34:42 +04:00
|
|
|
/*
|
|
|
|
* QString Module
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 Red Hat Inc.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
|
|
|
|
* See the COPYING.LIB file in the top-level directory.
|
|
|
|
*/
|
|
|
|
|
2009-08-28 22:27:06 +04:00
|
|
|
#ifndef QSTRING_H
|
|
|
|
#define QSTRING_H
|
|
|
|
|
2012-12-17 21:19:43 +04:00
|
|
|
#include "qapi/qmp/qobject.h"
|
2009-08-28 22:27:06 +04:00
|
|
|
|
2018-02-01 14:18:34 +03:00
|
|
|
struct QString {
|
2018-04-19 18:01:42 +03:00
|
|
|
struct QObjectBase_ base;
|
2020-12-11 20:11:52 +03:00
|
|
|
const char *string;
|
2018-02-01 14:18:34 +03:00
|
|
|
};
|
2009-08-28 22:27:06 +04:00
|
|
|
|
2022-03-23 18:57:20 +03:00
|
|
|
void qstring_unref(QString *q);
|
|
|
|
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(QString, qstring_unref)
|
|
|
|
|
2009-11-11 19:49:51 +03:00
|
|
|
QString *qstring_new(void);
|
2009-08-28 22:27:06 +04:00
|
|
|
QString *qstring_from_str(const char *str);
|
2018-07-24 16:43:39 +03:00
|
|
|
QString *qstring_from_substr(const char *str, size_t start, size_t end);
|
2020-12-11 20:11:36 +03:00
|
|
|
QString *qstring_from_gstring(GString *gstr);
|
2009-08-28 22:27:06 +04:00
|
|
|
const char *qstring_get_str(const QString *qstring);
|
|
|
|
|
|
|
|
#endif /* QSTRING_H */
|