seamless.c revision d65680efa46fa49e8bf14e67b29b782510ff934c
/* -*- c-basic-offset: 8 -*-
rdesktop: A Remote Desktop Protocol client.
Seamless Windows support
Copyright 2005-2007 Peter Astrand <astrand@cendio.se> for Cendio AB
Copyright 2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Sun GPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Sun elects to use only
* the General Public License version 2 (GPLv2) at this time for any software where
* a choice of GPL license versions is made available with the language indicating
* that GPLv2 or any later version may be used, or where a choice of which version
* of the GPL is applied is otherwise unspecified.
*/
#include "rdesktop.h"
#include <stdarg.h>
#include <assert.h>
#ifdef WITH_DEBUG_SEAMLESS
#else
#define DEBUG_SEAMLESS(args)
#endif
extern RD_BOOL g_seamless_rdp;
static VCHANNEL *seamless_channel;
static unsigned int seamless_serial;
static char icon_buf[1024];
static char *
seamless_get_token(char **s)
{
head = *s;
if (!head)
return NULL;
if (comma)
{
*comma = '\0';
*s = comma + 1;
}
else
{
*s = NULL;
}
return head;
}
static RD_BOOL
{
char *p, *l;
char *endptr;
p = l;
DEBUG_SEAMLESS(("seamlessrdp got:%s\n", p));
tok1 = seamless_get_token(&p);
tok2 = seamless_get_token(&p);
tok3 = seamless_get_token(&p);
tok4 = seamless_get_token(&p);
tok5 = seamless_get_token(&p);
tok6 = seamless_get_token(&p);
tok7 = seamless_get_token(&p);
tok8 = seamless_get_token(&p);
{
if (!tok6)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
}
{
if (!tok4)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
}
{
if (!tok4)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
}
{
char byte[3];
if (!tok8)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
len = 0;
while (*tok8 != '\0')
{
tok8++;
if (*tok8 == '\0')
return False;
tok8++;
len++;
}
}
{
if (!tok6)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
}
{
if (!tok8)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
}
{
unsigned long behind;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
}
{
if (!tok5)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
}
{
unsigned int state;
if (!tok5)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
if (*endptr)
return False;
}
{
}
{
if (!tok3)
return False;
if (*endptr)
return False;
}
{
if (!tok3)
return False;
if (*endptr)
return False;
/* do nothing, currently */
}
{
if (!tok3)
return False;
if (*endptr)
return False;
}
{
unsigned int serial;
if (*endptr)
return False;
}
{
if (!tok3)
return False;
if (*endptr)
return False;
}
{
if (!tok3)
return False;
if (*endptr)
return False;
}
xfree(l);
return True;
}
static RD_BOOL
{
{
}
return True;
}
static void
{
unsigned int pkglen;
char *buf;
/* str_handle_lines requires null terminated strings */
#if 0
printf("seamless recv:\n");
#endif
}
seamless_init(void)
{
if (!g_seamless_rdp)
return False;
seamless_serial = 0;
return (seamless_channel != NULL);
}
static unsigned int
{
STREAM s;
char buf[1025];
len++;
#if 0
printf("seamless send:\n");
#endif
return seamless_serial++;
}
unsigned int
{
if (!g_seamless_rdp)
return (unsigned int) -1;
}
unsigned int
{
if (!g_seamless_rdp)
return (unsigned int) -1;
}
unsigned int
{
flags);
}
/* Update select timeout */
void
{
if (g_seamless_rdp)
{
{
}
}
}
unsigned int
{
if (!g_seamless_rdp)
return (unsigned int) -1;
}
unsigned int
{
if (!g_seamless_rdp)
return (unsigned int) -1;
}
/* Send client-to-server message to destroy process on the server. */
unsigned int
seamless_send_destroy(unsigned long id)
{
}