vnc: split encoding in specific files
[qemu/mdroth.git] / qstring.h
blob6aaa7d5c830c5c58beecd8cb298464e0346b6618
1 #ifndef QSTRING_H
2 #define QSTRING_H
4 #include <stdint.h>
5 #include "qobject.h"
7 typedef struct QString {
8 QObject_HEAD;
9 char *string;
10 size_t length;
11 size_t capacity;
12 } QString;
14 QString *qstring_new(void);
15 QString *qstring_from_str(const char *str);
16 QString *qstring_from_substr(const char *str, int start, int end);
17 const char *qstring_get_str(const QString *qstring);
18 void qstring_append_int(QString *qstring, int64_t value);
19 void qstring_append(QString *qstring, const char *str);
20 void qstring_append_chr(QString *qstring, int c);
21 QString *qobject_to_qstring(const QObject *obj);
23 #endif /* QSTRING_H */