X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=internal.h;h=950fd0531c21c132cc1fd1607a4a26d8eb7925e7;hb=0e605c0d34447f049f14dfd96ace73fb1c0cffaf;hp=2fbf2c7939f6de5490190f791338a6203d8358e0;hpb=dc0e64a4c244fa084eb7bfce4503404824ada6ef;p=ovirt-viewer.git diff --git a/internal.h b/internal.h index 2fbf2c7..950fd05 100644 --- a/internal.h +++ b/internal.h @@ -61,6 +61,12 @@ extern gboolean check_cert; extern void start_wui_thread (void); extern void stop_wui_thread (void); +extern void assert_is_main_thread (const char *, int); +extern void assert_is_wui_thread (const char *, int); + +#define ASSERT_IS_MAIN_THREAD() assert_is_main_thread(__FILE__,__LINE__) +#define ASSERT_IS_WUI_THREAD() assert_is_wui_thread(__FILE__,__LINE__) + /* These are messages (instructions) which can be sent from the main * thread to the WUI thread. */ @@ -97,13 +103,20 @@ struct vm { char *description; int hostid; int id; + int vnc_port; + int forward_vnc_port; + char *uuid; /* Printable UUID. */ + + /* 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. */ - int vnc_port; char *mac_addr; /* Printable MAC addr. */ }; @@ -163,4 +176,7 @@ extern gboolean main_login_error (gpointer str); /* The WUI thread reports a general status error. */ extern gboolean main_status_error (gpointer str); +/* The WUI thread has updated the vm list. */ +extern gboolean main_vmlist_updated (gpointer); + #endif /* OVIRT_VIEWER_INTERNAL_H */