4 * Copyright (C) 2009 Red Hat Inc.
7 * Luiz Capitulino <lcapitulino@redhat.com>
8 * Anthony Liguori <aliguori@us.ibm.com>
9 * Marc-André Lureau <marcandre.lureau@redhat.com>
11 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
12 * See the COPYING.LIB file in the top-level directory.
18 #include "qapi/qmp/qobject.h"
36 QNum
*qnum_from_int(int64_t value
);
37 QNum
*qnum_from_uint(uint64_t value
);
38 QNum
*qnum_from_double(double value
);
40 bool qnum_get_try_int(const QNum
*qn
, int64_t *val
);
41 int64_t qnum_get_int(const QNum
*qn
);
43 bool qnum_get_try_uint(const QNum
*qn
, uint64_t *val
);
44 uint64_t qnum_get_uint(const QNum
*qn
);
46 double qnum_get_double(QNum
*qn
);
48 char *qnum_to_string(QNum
*qn
);
50 QNum
*qobject_to_qnum(const QObject
*obj
);
51 void qnum_destroy_obj(QObject
*obj
);