X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=internal.h;h=04512f9a97124893af9bae04964d008f58ec2ca4;hb=2c24cea28b2f4702105fcf4f54fc4e923697174a;hp=8f5ec0128a9f4c1e9bf273d513d66600578a5487;hpb=432ef642869fbbac2d6f6d111d80137cc5e7b119;p=ovirt-viewer.git diff --git a/internal.h b/internal.h index 8f5ec01..04512f9 100644 --- a/internal.h +++ b/internal.h @@ -104,17 +104,19 @@ struct vm { int hostid; int id; int vnc_port; + int forward_vnc_port; + char *uuid; /* Printable UUID. */ + char *state; - /* Only description, hostid, id and vnc_port fields are required. - * The remainder may be NULL / -1 to indicate they were missing in - * the data we got back from the WUI. + /* Only the fields above this point are required. The remainder may + * be NULL / -1 to indicate they were missing in the data we got + * back from the WUI. */ + long mem_allocated; /* Kbytes */ long mem_used; /* Kbytes */ int vcpus_allocated; int vcpus_used; - char *state; - char *uuid; /* Printable UUID. */ char *mac_addr; /* Printable MAC addr. */ }; @@ -142,6 +144,11 @@ extern gboolean wui_thread_has_valid_vmlist (void); */ extern gboolean wui_thread_is_busy (void); +/* Returns true if the main vm list contains a + * running vm w/ the same name as specified one + */ +extern gboolean main_vmlist_has_running_vm(struct vm*); + /* Callbacks from the WUI thread to the main thread. The WUI thread * adds these to the Glib main loop using g_idle_add, which means they * actually get executed in the context of the main thread.