Add support for SPICE.
[virt-click.git] / click.h
diff --git a/click.h b/click.h
index 64daefc..0f81203 100644 (file)
--- a/click.h
+++ b/click.h
@@ -19,8 +19,9 @@
 #ifndef click_h_
 #define click_h_
 
-#include <vncconnection.h>
 #include <glib-object.h>
+#include <vncconnection.h>
+#include <spice-client.h>
 
 enum command_qual {
   CMD_CLICK
@@ -31,7 +32,7 @@ typedef struct {
   union {
     struct {
       int x, y;                 /* x, y location */
-      unsigned mask;            /* button mask */
+      int b;                    /* button number */
     } click;
   };
 } command_t;
@@ -40,12 +41,13 @@ struct self_t;
 
 typedef struct {
   void (*shutdown) (struct self_t *self);
-  int (*click) (struct self_t *self, int x, int y, unsigned mask);
+  int (*click) (struct self_t *self, int x, int y, int b);
 } callbacks_t;
 
 typedef struct self_t {
   GMainLoop *loop;
   int ret;
+  gboolean connected;
 
   /* Callbacks. */
   callbacks_t *callbacks;
@@ -54,10 +56,12 @@ typedef struct self_t {
   command_t command;
 
   /* Private data for VNC connections: */
-  gchar *host;
-  int port;
   VncConnection *conn;
-  gboolean connected;
+
+  /* Private data for SPICE connections. */
+  SpiceSession *session;
+  SpiceChannel *display_channel;
+  SpiceChannel *inputs_channel;
 } self_t;
 
 extern gboolean verbose;
@@ -66,8 +70,15 @@ extern gboolean verbose;
 extern int vc_parse_command (self_t *self, gchar **args, guint nr_args);
 extern void vc_issue_command (self_t *self);
 
+/* spice.c */
+extern GOptionGroup *vc_spice_cmdline_get_option_group (void);
+extern gboolean vc_spice_is_selected (void);
+extern void vc_spice_setup (self_t *self);
+
 /* vnc.c */
-extern void vc_vnc_setup (self_t *click, gchar *vnc);
+extern GOptionGroup *vc_vnc_cmdline_get_option_group (void);
+extern gboolean vc_vnc_is_selected (void);
+extern void vc_vnc_setup (self_t *self);
 
 /* vnc-auth.c */
 extern void vc_vnc_auth_credential (VncConnection *conn, GValueArray *credList, gpointer opaque);