void do_info_vnc(Monitor *mon, QObject **ret_data)

{

    if (vnc_display == NULL || vnc_display->display == NULL) {

        *ret_data = qobject_from_jsonf("{ 'enabled': false }");

    } else {

        QDict *qdict;

        QList *clist;



        clist = qlist_new();

        if (vnc_display->clients) {

            VncState *client = vnc_display->clients;

            while (client) {

                qdict = do_info_vnc_client(mon, client);

                if (qdict)

                    qlist_append(clist, qdict);

                client = client->next;

            }

        }



        *ret_data = qobject_from_jsonf("{ 'enabled': true, 'clients': %p }",

                                       QOBJECT(clist));

        assert(*ret_data != NULL);



        if (vnc_server_info_put(qobject_to_qdict(*ret_data)) < 0) {

            qobject_decref(*ret_data);

            *ret_data = NULL;

        }

    }

}

void do_info_vnc(Monitor *mon, QObject **ret_data)

{

    if (vnc_display == NULL || vnc_display->display == NULL) {

        *ret_data = qobject_from_jsonf("{ 'enabled': false }");

    } else {

        QDict *qdict;

        QList *clist;



        clist = qlist_new();

        if (vnc_display->clients) {

            VncState *client = vnc_display->clients;

            while (client) {

                qdict = do_info_vnc_client(mon, client);

                if (qdict)

                    qlist_append(clist, qdict);

                client = client->next;

            }

        }



        *ret_data = qobject_from_jsonf("{ 'enabled': true, 'clients': %p }",

                                       QOBJECT(clist));

        assert(*ret_data != NULL);



        if (vnc_server_info_put(qobject_to_qdict(*ret_data)) < 0) {

            qobject_decref(*ret_data);

            *ret_data = NULL;

        }

    }

}

void FUNC_0(Monitor *VAR_0, QObject **VAR_1)

{

    if (vnc_display == NULL || vnc_display->display == NULL) {

        *VAR_1 = qobject_from_jsonf("{ 'enabled': false }");

    } else {

        QDict *qdict;

        QList *clist;



        clist = qlist_new();

        if (vnc_display->clients) {

            VncState *client = vnc_display->clients;

            while (client) {

                qdict = do_info_vnc_client(VAR_0, client);

                if (qdict)

                    qlist_append(clist, qdict);

                client = client->next;

            }

        }



        *VAR_1 = qobject_from_jsonf("{ 'enabled': true, 'clients': %p }",

                                       QOBJECT(clist));

        assert(*VAR_1 != NULL);



        if (vnc_server_info_put(qobject_to_qdict(*VAR_1)) < 0) {

            qobject_decref(*VAR_1);

            *VAR_1 = NULL;

        }

    }

}

void FUNC_0(Monitor *VAR_0, QObject **VAR_1)
{ if (vnc_display == NULL || vnc_display->display == NULL) { *VAR_1 = qobject_from_jsonf("{ 'enabled': false }"); } else { QDict *qdict; QList *clist; clist = qlist_new(); if (vnc_display->clients) { VncState *client = vnc_display->clients; while (client) { qdict = do_info_vnc_client(VAR_0, client); if (qdict)
qlist_append(clist, qdict); client = client->next; } } *VAR_1 = qobject_from_jsonf("{ 'enabled': true, 'clients': %p }", QOBJECT(clist)); assert(*VAR_1 != NULL); if (vnc_server_info_put(qobject_to_qdict(*VAR_1)) < 0) { qobject_decref(*VAR_1); *VAR_1 = NULL; } } }