X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=internal.h;fp=internal.h;h=80e675e6750a8246ec0ad4c55c9b306221302f35;hb=c333f350d703997b67db67b8a578ea4bc70089fa;hp=04512f9a97124893af9bae04964d008f58ec2ca4;hpb=efd8c4e6a2aaab12972ebe9d0c70f1d4d7a41435;p=ovirt-viewer.git diff --git a/internal.h b/internal.h index 04512f9..80e675e 100644 --- a/internal.h +++ b/internal.h @@ -39,6 +39,21 @@ extern gboolean debug; } \ } while (0) +/* Verbose messages are always compiled in, but have to + * be turned on using the --verbose command line switch. + */ +extern gboolean verbose; + +#define VERBOSE(fs,...) \ + do { \ + if (verbose) { \ + fprintf (stderr, "%s:%d: [thread %p] ", __FILE__, __LINE__, \ + g_thread_self ()); \ + fprintf (stderr, (fs), ## __VA_ARGS__); \ + fprintf (stderr, "\n"); \ + } \ + } while (0) + /* String equality tests, suggested by Jim Meyering. */ #define STREQ(a,b) (strcmp((a),(b)) == 0) #define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0) @@ -53,6 +68,12 @@ extern gboolean debug; extern const char *cainfo; extern gboolean check_cert; +/* server we're connecting to */ +extern const char* hostname; + +/* vm currently in focus */ +extern struct vm* vm_in_focus; + /* Communications between the main thread and the WUI thread. For * an explanation of the threading model, please see the comment in * main(). @@ -144,6 +165,15 @@ extern gboolean wui_thread_has_valid_vmlist (void); */ extern gboolean wui_thread_is_busy (void); + +/* Communications between the main thread and the tunnel thread.*/ +extern void start_tunnel (void); +extern void stop_tunnel (void); + +/* port which local tunnel is listening on */ +extern int tunnel_port; + + /* Returns true if the main vm list contains a * running vm w/ the same name as specified one */