Import Upstream version 1.9.1.0.svn346
This commit is contained in:
1 parent
9404a6167d
commit
9602397440
24 files changed
+134
-247
No files matched your search
@@ -17,7 +17,7 @@
|
||||
|
||||
(c) 2006 Mike Lampard, Philip Lawatsch, and others
|
||||
|
||||
$Revision: 301 $ - $Date: 2007-09-10 09:55:15 +0200 (Mon, 10 Sep 2007) $ $Author: mlampard $
|
||||
$Revision: 322 $ - $Date: 2007-11-29 01:04:29 +0100 (Thu, 29 Nov 2007) $ $Author: mlampard $
|
||||
|
||||
This daemon listens on localhost port 15550 for client connections,
|
||||
and arbitrates LCD display. Allows for multiple simultaneous clients.
|
||||
@@ -67,7 +67,7 @@ int g15_send(int sock, char *buf, unsigned int len);
|
||||
int g15_recv(int sock, char *buf, unsigned int len);
|
||||
|
||||
/* send a command (defined above) to the daemon. any replies from the daemon are returned */
|
||||
int g15_send_cmd (int sock, unsigned char command, unsigned char value);
|
||||
unsigned long g15_send_cmd (int sock, unsigned char command, unsigned char value);
|
||||
/* receive an oob byte from the daemon, used internally by g15_send_cmd, but useful elsewhere */
|
||||
#define G15_FOREGROUND_SENT_OOB 1
|
||||
int g15_recv_oob_answer(int sock);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
(c) 2006 Mike Lampard, Philip Lawatsch, and others
|
||||
|
||||
$Revision: 301 $ - $Date: 2007-09-10 09:55:15 +0200 (Mon, 10 Sep 2007) $ $Author: mlampard $
|
||||
$Revision: 322 $ - $Date: 2007-11-29 01:04:29 +0100 (Thu, 29 Nov 2007) $ $Author: mlampard $
|
||||
|
||||
This daemon listens on localhost port 15550 for client connections,
|
||||
and arbitrates LCD display. Allows for multiple simultaneous clients.
|
||||
@@ -177,7 +177,7 @@ int g15_recv_oob_answer(int sock) {
|
||||
return packet[0];
|
||||
}
|
||||
|
||||
int g15_send_cmd (int sock, unsigned char command, unsigned char value)
|
||||
unsigned long g15_send_cmd (int sock, unsigned char command, unsigned char value)
|
||||
{
|
||||
int retval;
|
||||
unsigned char packet[2];
|
||||
@@ -219,9 +219,9 @@ int g15_send_cmd (int sock, unsigned char command, unsigned char value)
|
||||
break;
|
||||
case G15DAEMON_GET_KEYSTATE:{
|
||||
retval = 0;
|
||||
packet[0] = (unsigned char)command;
|
||||
send( sock, packet, 1, MSG_OOB );
|
||||
g15_recv(sock, (char*)&retval, sizeof(retval));
|
||||
unsigned long keystate = 0;
|
||||
g15_recv(sock, (char*)&keystate, sizeof(keystate));
|
||||
return keystate;
|
||||
break;
|
||||
}
|
||||
case G15DAEMON_IS_FOREGROUND:{
|
||||
|
||||
Reference in new issue
Block a user