From: Remi Collet <fedora@xxxxxxxxxxxxxxxxx> --- src/libvirt-php.c | 458 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 371 insertions(+), 87 deletions(-) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index 57e1b83..5f330f8 100644 --- a/src/libvirt-php.c +++ b/src/libvirt-php.c @@ -70,99 +70,370 @@ ZEND_DECLARE_MODULE_GLOBALS(libvirt) ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_connect, 0, 0, 0) ZEND_ARG_INFO(0, url) ZEND_ARG_INFO(0, readonly) +ZEND_ARG_INFO(0, credentials) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_void, 0, 0, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_conn, 0, 0, 1) +ZEND_ARG_INFO(0, conn) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_connect_get_capabilities, 0, 0, 1) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, xpath) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_connect_get_emulator, 0, 0, 1) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, arch) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_connect_get_soundhw_models, 0, 0, 1) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, arch) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_connect_get_all_domain_stats, 0, 0, 1) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, stats) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_stream_send, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, data) +ZEND_ARG_INFO(0, len) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_new, 0, 0, 9) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, name) +ZEND_ARG_INFO(0, arch) +ZEND_ARG_INFO(0, memMB) +ZEND_ARG_INFO(0, maxmemMB) +ZEND_ARG_INFO(0, vcpus) +ZEND_ARG_INFO(0, iso) +ZEND_ARG_INFO(0, disks) +ZEND_ARG_INFO(0, networks) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_lookup_by_name, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, name) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_change_vcpus, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, numCpus) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_change_memory, 0, 0, 3) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, allocMem) +ZEND_ARG_INFO(0, allocMax) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_change_boot_devices, 0, 0, 3) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, first) +ZEND_ARG_INFO(0, second) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_disk_add, 0, 0, 5) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, img) +ZEND_ARG_INFO(0, dev) +ZEND_ARG_INFO(0, type) +ZEND_ARG_INFO(0, driver) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_disk_remove, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, dev) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_nic_add, 0, 0, 4) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, mac) +ZEND_ARG_INFO(0, network) +ZEND_ARG_INFO(0, model) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_nic_remove, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, dev) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_lookup_by_id, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, id) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_lookup_by_uuid, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, uuid) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_conn_xml, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, xml) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_core_dump, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, to) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_conn_flags, 0, 0, 1) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_memory_peek, 0, 0, 4) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, start) +ZEND_ARG_INFO(0, size) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_set_memory, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, memory) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_set_memory_flags, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, memory) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_conn_path, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, path) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_block_resize, 0, 0, 3) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, path) +ZEND_ARG_INFO(0, size) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_block_job_abort, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, path) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_block_job_set_speed, 0, 0, 3) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, path) +ZEND_ARG_INFO(0, bandwidth) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_migrate, 0, 0, 3) +ZEND_ARG_INFO(0, res) +ZEND_ARG_INFO(0, dest_conn) +ZEND_ARG_INFO(0, flags) +ZEND_ARG_INFO(0, dname) +ZEND_ARG_INFO(0, bandwidth) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_migrate_to_uri, 0, 0, 3) +ZEND_ARG_INFO(0, res) +ZEND_ARG_INFO(0, dest_uri) +ZEND_ARG_INFO(0, flags) +ZEND_ARG_INFO(0, dname) +ZEND_ARG_INFO(0, bandwidth) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_migrate_to_uri2, 0, 0, 1) +ZEND_ARG_INFO(0, res) +ZEND_ARG_INFO(0, dconn_uri) +ZEND_ARG_INFO(0, mig_uri) +ZEND_ARG_INFO(0, dxml) +ZEND_ARG_INFO(0, flags) +ZEND_ARG_INFO(0, dname) +ZEND_ARG_INFO(0, bandwidth) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_xml_xpath, 0, 0, 2) +ZEND_ARG_INFO(0, res) +ZEND_ARG_INFO(0, xpath) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_get_block_info, 0, 0, 2) +ZEND_ARG_INFO(0, res) +ZEND_ARG_INFO(0, dev) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_get_network_info, 0, 0, 2) +ZEND_ARG_INFO(0, res) +ZEND_ARG_INFO(0, mac) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_set_autostart, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_get_metadata, 0, 0, 4) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, type) +ZEND_ARG_INFO(0, uri) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_set_metadata, 0, 0, 6) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, type) +ZEND_ARG_INFO(0, metadata) +ZEND_ARG_INFO(0, key) +ZEND_ARG_INFO(0, uri) +ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_get_screenshot, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, server) +ZEND_ARG_INFO(0, scancode) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_get_screenshot_api, 0, 0, 1) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, screenID) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_get_screen_dimensions, 0, 0, 2) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, server) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_send_keys, 0, 0, 3) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, server) +ZEND_ARG_INFO(0, scancode) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_send_pointer_event, 0, 0, 5) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, server) +ZEND_ARG_INFO(0, pos_x) +ZEND_ARG_INFO(0, pox_y) +ZEND_ARG_INFO(0, clicked) +ZEND_ARG_INFO(0, release) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_libvirt_domain_update_device, 0, 0, 3) +ZEND_ARG_INFO(0, conn) +ZEND_ARG_INFO(0, xml) +ZEND_ARG_INFO(0, flags) ZEND_END_ARG_INFO() static zend_function_entry libvirt_functions[] = { /* Common functions */ - PHP_FE(libvirt_get_last_error,NULL) + PHP_FE(libvirt_get_last_error, arginfo_libvirt_void) /* Connect functions */ - PHP_FE(libvirt_connect, arginfo_libvirt_connect) - PHP_FE(libvirt_connect_get_uri, NULL) - PHP_FE(libvirt_connect_get_hostname, NULL) - PHP_FE(libvirt_connect_get_capabilities, NULL) - PHP_FE(libvirt_connect_get_emulator, NULL) - PHP_FE(libvirt_connect_get_nic_models, NULL) - PHP_FE(libvirt_connect_get_soundhw_models, NULL) - PHP_FE(libvirt_connect_get_information, NULL) - PHP_FE(libvirt_connect_get_machine_types, NULL) - PHP_FE(libvirt_connect_get_hypervisor, NULL) - PHP_FE(libvirt_connect_get_sysinfo, NULL) - PHP_FE(libvirt_connect_get_maxvcpus, NULL) - PHP_FE(libvirt_connect_get_encrypted, NULL) - PHP_FE(libvirt_connect_get_secure, NULL) - PHP_FE(libvirt_connect_get_all_domain_stats, NULL) + PHP_FE(libvirt_connect, arginfo_libvirt_connect) + PHP_FE(libvirt_connect_get_uri, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_hostname, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_capabilities, arginfo_libvirt_connect_get_capabilities) + PHP_FE(libvirt_connect_get_emulator, arginfo_libvirt_connect_get_emulator) + PHP_FE(libvirt_connect_get_nic_models, arginfo_libvirt_connect_get_emulator) + PHP_FE(libvirt_connect_get_soundhw_models, arginfo_libvirt_connect_get_soundhw_models) + PHP_FE(libvirt_connect_get_information, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_machine_types, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_hypervisor, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_sysinfo, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_maxvcpus, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_encrypted, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_secure, arginfo_libvirt_conn) + PHP_FE(libvirt_connect_get_all_domain_stats, arginfo_libvirt_connect_get_all_domain_stats) /* Stream functions */ - PHP_FE(libvirt_stream_create, NULL) - PHP_FE(libvirt_stream_close, NULL) - PHP_FE(libvirt_stream_abort, NULL) - PHP_FE(libvirt_stream_finish, NULL) - PHP_FE(libvirt_stream_send, NULL) - PHP_FE(libvirt_stream_recv, NULL) + PHP_FE(libvirt_stream_create, arginfo_libvirt_conn) + PHP_FE(libvirt_stream_close, arginfo_libvirt_conn) + PHP_FE(libvirt_stream_abort, arginfo_libvirt_conn) + PHP_FE(libvirt_stream_finish, arginfo_libvirt_conn) + PHP_FE(libvirt_stream_send, arginfo_libvirt_stream_send) + PHP_FE(libvirt_stream_recv, arginfo_libvirt_stream_send) /* Domain functions */ - PHP_FE(libvirt_domain_new, NULL) - PHP_FE(libvirt_domain_new_get_vnc, NULL) - PHP_FE(libvirt_domain_get_counts, NULL) - PHP_FE(libvirt_domain_is_persistent, NULL) - PHP_FE(libvirt_domain_lookup_by_name, NULL) - PHP_FE(libvirt_domain_get_xml_desc, NULL) - PHP_FE(libvirt_domain_get_disk_devices, NULL) - PHP_FE(libvirt_domain_get_interface_devices, NULL) - PHP_FE(libvirt_domain_change_vcpus, NULL) - PHP_FE(libvirt_domain_change_memory, NULL) - PHP_FE(libvirt_domain_change_boot_devices, NULL) - PHP_FE(libvirt_domain_disk_add, NULL) - PHP_FE(libvirt_domain_disk_remove, NULL) - PHP_FE(libvirt_domain_nic_add, NULL) - PHP_FE(libvirt_domain_nic_remove, NULL) - PHP_FE(libvirt_domain_get_info, NULL) - PHP_FE(libvirt_domain_get_name, NULL) - PHP_FE(libvirt_domain_get_uuid, NULL) - PHP_FE(libvirt_domain_get_uuid_string, NULL) - PHP_FE(libvirt_domain_get_id, NULL) - PHP_FE(libvirt_domain_lookup_by_id, NULL) - PHP_FE(libvirt_domain_lookup_by_uuid, NULL) - PHP_FE(libvirt_domain_lookup_by_uuid_string, NULL) - PHP_FE(libvirt_domain_destroy, NULL) - PHP_FE(libvirt_domain_create, NULL) - PHP_FE(libvirt_domain_resume, NULL) - PHP_FE(libvirt_domain_core_dump, NULL) - PHP_FE(libvirt_domain_shutdown, NULL) - PHP_FE(libvirt_domain_suspend, NULL) - PHP_FE(libvirt_domain_managedsave, NULL) - PHP_FE(libvirt_domain_undefine, NULL) - PHP_FE(libvirt_domain_reboot, NULL) - PHP_FE(libvirt_domain_define_xml, NULL) - PHP_FE(libvirt_domain_create_xml, NULL) - PHP_FE(libvirt_domain_memory_peek,NULL) - PHP_FE(libvirt_domain_memory_stats,NULL) - PHP_FE(libvirt_domain_set_memory,NULL) - PHP_FE(libvirt_domain_set_max_memory,NULL) - PHP_FE(libvirt_domain_set_memory_flags,NULL) - PHP_FE(libvirt_domain_block_stats,NULL) - PHP_FE(libvirt_domain_block_resize,NULL) - PHP_FE(libvirt_domain_block_job_abort,NULL) - PHP_FE(libvirt_domain_block_job_set_speed,NULL) - PHP_FE(libvirt_domain_interface_stats,NULL) - PHP_FE(libvirt_domain_get_connect, NULL) - PHP_FE(libvirt_domain_migrate, NULL) - PHP_FE(libvirt_domain_migrate_to_uri, NULL) - PHP_FE(libvirt_domain_migrate_to_uri2, NULL) - PHP_FE(libvirt_domain_get_job_info, NULL) - PHP_FE(libvirt_domain_xml_xpath, NULL) - PHP_FE(libvirt_domain_get_block_info, NULL) - PHP_FE(libvirt_domain_get_network_info, NULL) - PHP_FE(libvirt_domain_get_autostart, NULL) - PHP_FE(libvirt_domain_set_autostart, NULL) - PHP_FE(libvirt_domain_get_metadata, NULL) - PHP_FE(libvirt_domain_set_metadata, NULL) - PHP_FE(libvirt_domain_is_active, NULL) - PHP_FE(libvirt_domain_get_next_dev_ids, NULL) - PHP_FE(libvirt_domain_get_screenshot, NULL) - PHP_FE(libvirt_domain_get_screenshot_api, NULL) - PHP_FE(libvirt_domain_get_screen_dimensions, NULL) - PHP_FE(libvirt_domain_send_keys, NULL) - PHP_FE(libvirt_domain_send_pointer_event, NULL) - PHP_FE(libvirt_domain_update_device, NULL) + PHP_FE(libvirt_domain_new, arginfo_libvirt_domain_new) + PHP_FE(libvirt_domain_new_get_vnc, arginfo_libvirt_void) + PHP_FE(libvirt_domain_get_counts, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_is_persistent, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_lookup_by_name, arginfo_libvirt_domain_lookup_by_name) + PHP_FE(libvirt_domain_get_xml_desc, arginfo_libvirt_connect_get_capabilities) + PHP_FE(libvirt_domain_get_disk_devices, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_get_interface_devices, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_change_vcpus, arginfo_libvirt_domain_change_vcpus) + PHP_FE(libvirt_domain_change_memory, arginfo_libvirt_domain_change_memory) + PHP_FE(libvirt_domain_change_boot_devices, arginfo_libvirt_domain_change_boot_devices) + PHP_FE(libvirt_domain_disk_add, arginfo_libvirt_domain_disk_add) + PHP_FE(libvirt_domain_disk_remove, arginfo_libvirt_domain_disk_remove) + PHP_FE(libvirt_domain_nic_add, arginfo_libvirt_domain_nic_add) + PHP_FE(libvirt_domain_nic_remove, arginfo_libvirt_domain_nic_remove) + PHP_FE(libvirt_domain_get_info, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_get_name, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_get_uuid, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_get_uuid_string, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_get_id, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_lookup_by_id, arginfo_libvirt_domain_lookup_by_id) + PHP_FE(libvirt_domain_lookup_by_uuid, arginfo_libvirt_domain_lookup_by_uuid) + PHP_FE(libvirt_domain_lookup_by_uuid_string, arginfo_libvirt_domain_lookup_by_uuid) + PHP_FE(libvirt_domain_destroy, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_create, arginfo_libvirt_domain_conn_xml) + PHP_FE(libvirt_domain_resume, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_core_dump, arginfo_libvirt_domain_core_dump) + PHP_FE(libvirt_domain_shutdown, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_suspend, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_managedsave, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_undefine, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_reboot, arginfo_libvirt_conn_flags) + PHP_FE(libvirt_domain_define_xml, arginfo_libvirt_domain_conn_xml) + PHP_FE(libvirt_domain_create_xml, arginfo_libvirt_domain_conn_xml) + PHP_FE(libvirt_domain_memory_peek, arginfo_libvirt_domain_memory_peek) + PHP_FE(libvirt_domain_memory_stats, arginfo_libvirt_conn_flags) + PHP_FE(libvirt_domain_set_memory, arginfo_libvirt_domain_set_memory) + PHP_FE(libvirt_domain_set_max_memory, arginfo_libvirt_domain_set_memory) + PHP_FE(libvirt_domain_set_memory_flags, arginfo_libvirt_domain_set_memory_flags) + PHP_FE(libvirt_domain_block_stats, arginfo_libvirt_conn_path) + PHP_FE(libvirt_domain_block_resize, arginfo_libvirt_domain_block_resize) + PHP_FE(libvirt_domain_block_job_abort, arginfo_libvirt_domain_block_job_abort) + PHP_FE(libvirt_domain_block_job_set_speed, arginfo_libvirt_domain_block_job_set_speed) + PHP_FE(libvirt_domain_interface_stats, arginfo_libvirt_conn_path) + PHP_FE(libvirt_domain_get_connect, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_migrate, arginfo_libvirt_domain_migrate) + PHP_FE(libvirt_domain_migrate_to_uri, arginfo_libvirt_domain_migrate_to_uri) + PHP_FE(libvirt_domain_migrate_to_uri2, arginfo_libvirt_domain_migrate_to_uri2) + PHP_FE(libvirt_domain_get_job_info, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_xml_xpath, arginfo_libvirt_domain_xml_xpath) + PHP_FE(libvirt_domain_get_block_info, arginfo_libvirt_domain_get_block_info) + PHP_FE(libvirt_domain_get_network_info, arginfo_libvirt_domain_get_network_info) + PHP_FE(libvirt_domain_get_autostart, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_set_autostart, arginfo_libvirt_domain_set_autostart) + PHP_FE(libvirt_domain_get_metadata, arginfo_libvirt_domain_get_metadata) + PHP_FE(libvirt_domain_set_metadata, arginfo_libvirt_domain_set_metadata) + PHP_FE(libvirt_domain_is_active, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_get_next_dev_ids, arginfo_libvirt_conn) + PHP_FE(libvirt_domain_get_screenshot, arginfo_libvirt_domain_get_screenshot) + PHP_FE(libvirt_domain_get_screenshot_api, arginfo_libvirt_domain_get_screenshot_api) + PHP_FE(libvirt_domain_get_screen_dimensions, arginfo_libvirt_domain_get_screen_dimensions) + PHP_FE(libvirt_domain_send_keys, arginfo_libvirt_domain_send_keys) + PHP_FE(libvirt_domain_send_pointer_event, arginfo_libvirt_domain_send_pointer_event) + PHP_FE(libvirt_domain_update_device, arginfo_libvirt_domain_update_device) /* Domain snapshot functions */ PHP_FE(libvirt_domain_has_current_snapshot, NULL) PHP_FE(libvirt_domain_snapshot_create, NULL) @@ -245,7 +516,11 @@ static zend_function_entry libvirt_functions[] = { PHP_FE(libvirt_print_binding_resources, NULL) /* Agent functions */ PHP_FE(libvirt_domain_qemu_agent_command, NULL) +#ifdef PHP_FE_END + PHP_FE_END +#else {NULL, NULL, NULL} +#endif }; @@ -5166,6 +5441,7 @@ PHP_FUNCTION(libvirt_domain_change_vcpus) * Arguments: @res [resource]: libvirt domain resource * @allocMem [int]: number of MiBs to be set as immediate memory value * @allocMax [int]: number of MiBs to be set as the maximum allocation + * @flags [int]: flags * Returns: new domain resource */ PHP_FUNCTION(libvirt_domain_change_memory) @@ -5246,6 +5522,7 @@ PHP_FUNCTION(libvirt_domain_change_memory) * Arguments: @res [resource]: libvirt domain resource * @first [string]: first boot device to be set * @second [string]: second boot device to be set + * @flags [int]: flags * Returns: new domain resource */ PHP_FUNCTION(libvirt_domain_change_boot_devices) @@ -5751,6 +6028,7 @@ PHP_FUNCTION(libvirt_domain_resume) * Since version: 0.4.1(-2) * Description: Function is used to dump core of the domain identified by it's resource * Arguments: @res [resource]: libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() + * @to [string]: to * Returns: TRUE for success, FALSE on error */ PHP_FUNCTION(libvirt_domain_core_dump) @@ -5857,6 +6135,7 @@ PHP_FUNCTION(libvirt_domain_undefine) * Since version: 0.4.1(-1) * Description: Function is used to reboot the domain identified by it's resource * Arguments: @res [resource]: libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() + * @flags [int]: optional flags * Returns: TRUE for success, FALSE on error */ PHP_FUNCTION(libvirt_domain_reboot) @@ -5943,6 +6222,9 @@ PHP_FUNCTION(libvirt_domain_create_xml) * Since version: 0.4.1(-1) * Description: Function is used to get the domain's memory peek value * Arguments: @res [resource]: libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() + * @start [int]: start + * @size [int]: size + * @flags [int]: optional flags * Returns: domain memory peek */ PHP_FUNCTION(libvirt_domain_memory_peek) @@ -5951,7 +6233,7 @@ PHP_FUNCTION(libvirt_domain_memory_peek) zval *zdomain; int retval; long flags=0; - long long start; + long start; long size; char *buff; @@ -5967,6 +6249,7 @@ PHP_FUNCTION(libvirt_domain_memory_peek) * Since version: 0.4.1(-1) * Description: Function is used to get the domain's memory stats * Arguments: @res [resource]: libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() + * @flags [int]: optional flags * Returns: domain memory stats array (same fields as virDomainMemoryStats, please see libvirt documentation) */ PHP_FUNCTION(libvirt_domain_memory_stats) @@ -6319,6 +6602,7 @@ PHP_FUNCTION(libvirt_domain_get_block_info) * Description: Function is used to get the result of xPath expression that's run against the domain * Arguments: @res [resource]: libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() * @xpath [string]: xPath expression to parse against the domain + * @flags [int]: optional flags * Returns: result of the expression in an array */ PHP_FUNCTION(libvirt_domain_xml_xpath) -- 2.5.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list