aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lufa/Projects/LEDNotifier/LEDMixerApp/Properties/AssemblyInfo.cs
blob: c88194381e4ffe0b79436bda393c1f88ab1c00f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("LEDMixer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("LEDMixer")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible 
// to COM components.  If you need to access a type in this assembly from 
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("335c1112-9aa6-42a0-9765-5cc6deb78c88")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers 
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * keydis.c:
 *
 * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

static char rcsid[] = "$Id$";

/*
 * $Log$
 * Revision 1.5  2008/02/23 11:48:37  james
 * *** empty log message ***
 *
 * Revision 1.4  2008/02/22 17:07:00  james
 * *** empty log message ***
 *
 * Revision 1.3  2008/02/15 23:52:12  james
 * *** empty log message ***
 *
 * Revision 1.2  2008/02/15 03:32:07  james
 * *** empty log message ***
 *
 * Revision 1.1  2008/02/14 02:46:44  james
 * *** empty log message ***
 *
 * Revision 1.1  2008/02/14 01:55:57  james
 * *** empty log message ***
 *
 */


#include "project.h"

#define CMD_BUFLEN	128

typedef struct
{
  KEYDIS_SIGNATURE;
} KeyDis_VT102;

typedef struct
{
  KEYDIS_SIGNATURE;
  Socket *s;
} KeyDis_IPC;


static void
keydis_close (KeyDis * t)
{
  free (t);
}


static int
keydis_ipc_key (KeyDis * _t, Context * c, int key)
{
  KeyDis_IPC *t = (KeyDis_IPC *) _t;

  return ipc_msg_send_key (t->s, key);
}

static int
keydis_ipc_set_baud (KeyDis * _t, Context * c, int baud)
{
  KeyDis_IPC *t = (KeyDis_IPC *) _t;

  ipc_msg_send_setbaud (t->s, baud);

  return 0;
}

static int
keydis_ipc_send_break (KeyDis * _t, Context * c)
{
  KeyDis_IPC *t = (KeyDis_IPC *) _t;

  ipc_msg_send_sendbreak (t->s);

  return 0;
}

static int
keydis_ipc_set_flow (KeyDis * _t, Context * c, int flow)
{
  KeyDis_IPC *t = (KeyDis_IPC *) _t;

  ipc_msg_send_setflow (t->s, flow);

  return 0;
}


static int
keydis_ipc_set_ansi (KeyDis * _t, Context * c, int ansi)
{
  KeyDis_IPC *t = (KeyDis_IPC *) _t;

  vt102_set_ansi (c->v, ansi);

  ipc_msg_send_setansi (t->s, ansi);

  return 0;
}


static int
keydis_ipc_hangup (KeyDis * _t, Context * c)
{
  KeyDis_IPC *t = (KeyDis_IPC *) _t;

  ipc_msg_send_hangup (t->s);

  return 0;
}

static int
keydis_vt102_key (KeyDis * _t, Context * c, int key)
{
  KeyDis_VT102 *t = (KeyDis_VT102 *) _t;

  vt102_send (c, key);
  return 0;
}

static int
keydis_vt102_set_baud (KeyDis * _t, Context * c, int baud)
{
  KeyDis_VT102 *t = (KeyDis_VT102 *) _t;

  tty_set_baud (c->t, baud);
  tty_parse_reset (c);

  log_f (c->l, "<baud changed to %d>", baud);

  return 0;
}

static int
keydis_vt102_send_break (KeyDis * _t, Context * c)
{
  KeyDis_VT102 *t = (KeyDis_VT102 *) _t;

  tty_send_break (c->t);

  return 0;
}

static int
keydis_vt102_set_flow (KeyDis * _t, Context * c, int flow)
{
  KeyDis_VT102 *t = (KeyDis_VT102 *) _t;

  tty_set_flow (c->t, flow);

  return 0;
}

static int
keydis_vt102_set_ansi (KeyDis * _t, Context * c, int ansi)
{
  KeyDis_VT102 *t = (KeyDis_VT102 *) _t;

  if (c->v)
    c->v->xn_glitch = ansi ? 0 : 1;
  return 0;
}


static int
keydis_vt102_hangup (KeyDis * _t, Context * c)
{
  KeyDis_VT102 *t = (KeyDis_VT102 *) _t;

  tty_hangup (c->t);

  return 0;
}



KeyDis *
keydis_vt102_new (void)
{
  KeyDis_VT102 *t = malloc (sizeof (KeyDis_VT102));
  t->key = keydis_vt102_key;
  t->close = keydis_close;
  t->set_baud = keydis_vt102_set_baud;
  t->send_break = keydis_vt102_send_break;
  t->set_flow = keydis_vt102_set_flow;
  t->set_ansi = keydis_vt102_set_ansi;
  t->hangup = keydis_vt102_hangup;
  return (KeyDis *) t;
}


KeyDis *
keydis_ipc_new (Socket * s)
{
  KeyDis_IPC *t = malloc (sizeof (KeyDis_IPC));
  t->key = keydis_ipc_key;
  t->close = keydis_close;
  t->set_baud = keydis_ipc_set_baud;
  t->send_break = keydis_ipc_send_break;
  t->set_flow = keydis_ipc_set_flow;
  t->set_ansi = keydis_ipc_set_ansi;
  t->hangup = keydis_ipc_hangup;
  t->s = s;
  return (KeyDis *) t;
}






int
keydis_key (KeyDis * t, Context * c, int key)
{

  if (!c->d)
    return t->key (t, c, key);

  cmd_show_status (c->d, c);

  if (c->d->active)
    return cmd_key (c->d, c, key);

  if (key == CMD_KEY)
    return cmd_activate (c->d, c);


  return t->key (t, c, key);
}