Permalink
Browse files

Initial commit

  • Loading branch information...
DisplayCast committed May 22, 2012
1 parent 115efbe commit 48fbf06c45d845f0e72a22150f3972597c122a25
Showing with 45,476 additions and 0 deletions.
  1. +1 −0 .gitattributes
  2. +65 −0 Control Service API.txt
  3. +716 −0 ControllerService/APIresponder.cs
  4. +163 −0 ControllerService/ControllerService.csproj
  5. +61 −0 ControllerService/JSONresponses.cs
  6. +29 −0 ControllerService/Program.cs
  7. +60 −0 ControllerService/ProjectInstaller.Designer.cs
  8. +24 −0 ControllerService/ProjectInstaller.cs
  9. +129 −0 ControllerService/ProjectInstaller.resx
  10. +40 −0 ControllerService/Properties/AssemblyInfo.cs
  11. +36 −0 ControllerService/Service.Designer.cs
  12. +79 −0 ControllerService/Service.cs
  13. +3 −0 ControllerService/app.config
  14. BIN ControllerService/dc.ico
  15. +376 −0 ControllerService/monitorPlayers.cs
  16. +1,044 −0 ControllerServiceInstaller/ControllerServiceInstaller.vdproj
  17. +219 −0 DisplayCast.sln
  18. +1,482 −0 DisplayCastInstaller/DisplayCastInstaller.vdproj
  19. BIN Installers/Controller Service/ControllerServiceInstaller.msi
  20. BIN Installers/Controller Service/setup.exe
  21. BIN Installers/DisplayCast/DisplayCastInstaller.msi
  22. BIN Installers/DisplayCast/setup.exe
  23. +20 −0 Location/Location.sln
  24. +304 −0 Location/Location/ImageParser.cs
  25. +83 −0 Location/Location/Location.cs
  26. +64 −0 Location/Location/Location.csproj
  27. +25,066 −0 Location/Location/LocationService.cs
  28. +40 −0 Location/Location/Properties/AssemblyInfo.cs
  29. +162 −0 Location/Location/QueryMSE.cs
  30. +58 −0 Location/Location/XmlNoNamespaceWriter.cs
  31. +1,855 −0 Location/Location/aaaService.cs
  32. +176 −0 Player/AboutBox.Designer.cs
  33. +103 −0 Player/AboutBox.cs
  34. +926 −0 Player/AboutBox.resx
  35. +64 −0 Player/AssemblyInfo.cs
  36. +244 −0 Player/Player.csproj
  37. BIN Player/Player.ico
  38. BIN Player/Player_TemporaryKey.pfx
  39. +74 −0 Player/Properties/Resources.Designer.cs
  40. +124 −0 Player/Properties/Resources.resx
  41. +47 −0 Player/Properties/app.manifest
  42. BIN Player/Resources/displayCast-PLAY-512.png
  43. +85 −0 Player/Streamer.Designer.cs
  44. +463 −0 Player/Streamer.cs
  45. +500 −0 Player/Streamer.resx
  46. +1,170 −0 Player/StreamerList.cs
  47. +120 −0 Player/StreamerList.resx
  48. +3 −0 Player/app.config
  49. +65 −0 Shared/DisplayCastGlobals.cs
  50. +320 −0 Shared/License.rtf
  51. +40 −0 Shared/Properties/AssemblyInfo.cs
  52. +67 −0 Shared/Shared.csproj
  53. BIN Shared/dc.ico
  54. BIN Shared/displayCast-BASIC-LOGO.jpg
  55. +176 −0 Streamer/AboutBox.Designer.cs
  56. +103 −0 Streamer/AboutBox.cs
  57. +968 −0 Streamer/AboutBox.resx
  58. +104 −0 Streamer/Adler32.cs
  59. +12 −0 Streamer/ClassDiagram1.cd
  60. +57 −0 Streamer/Console.Designer.cs
  61. +716 −0 Streamer/Console.cs
  62. +587 −0 Streamer/Console.resx
  63. +85 −0 Streamer/GCbuf.cs
  64. +945 −0 Streamer/MirrorDriver/DesktopMirror.cs
  65. +165 −0 Streamer/MirrorDriver/Interop.cs
  66. +439 −0 Streamer/Program.cs
  67. +32 −0 Streamer/Properties/AssemblyInfo.cs
  68. +77 −0 Streamer/Properties/Resources.Designer.cs
  69. +127 −0 Streamer/Properties/Resources.resx
  70. +30 −0 Streamer/Properties/Settings.Designer.cs
  71. +7 −0 Streamer/Properties/Settings.settings
  72. +47 −0 Streamer/Properties/app.manifest
  73. BIN Streamer/Resources/Streamer.bmp
  74. BIN Streamer/Resources/StreamerIcon.ico
  75. BIN Streamer/Resources/displayCast-STREAM-512.png
  76. +32 −0 Streamer/Settings.cs
  77. +238 −0 Streamer/Streamer.csproj
  78. BIN Streamer/Streamer.ico
  79. BIN Streamer/Streamer_TemporaryKey.pfx
  80. +10 −0 Streamer/app.config
  81. +308 −0 Streamer/sendUpdate.cs
  82. +98 −0 Streamer/serverThread.cs
  83. +169 −0 Streamer/streamThread.cs
  84. +269 −0 ZeroconfService/DNSService.cs
  85. +75 −0 ZeroconfService/DNSServiceException.cs
  86. +1,108 −0 ZeroconfService/NetService.cs
  87. +282 −0 ZeroconfService/NetServiceBrowser.cs
  88. +39 −0 ZeroconfService/Properties/AssemblyInfo.cs
  89. +183 −0 ZeroconfService/Public Interfaces.cd
  90. +155 −0 ZeroconfService/UnixSocket.cs
  91. +59 −0 ZeroconfService/Utf8Marshaler.cs
  92. +94 −0 ZeroconfService/ZeroconfService-Hammerton.csproj
  93. +120 −0 ZeroconfService/ZeroconfService.csproj
  94. +790 −0 ZeroconfService/mDNSImports.cs
View
@@ -0,0 +1 @@
+
View
@@ -0,0 +1,65 @@
+ DisplayCast Controller API
+ --------------------------
+
+The API uses an HTTP/REST interface with responses in JSONP. By default, the service runs on port 11223.
+
+e.g.,/ http://displaycast.fxpal.net:11223/connect?source=34546&sink=34256&callback=foobar
+
+STATUS:
+-------
+-whoami
+ Parameters: none
+ Returns: Returns the Player, Archiver and Streamer that is running on the same IP address as the requester. Web based client can use this call to identify all the local services.
+
+-listPlayers // sink
+-listArchivers // sink
+-listStreamers // source
+ Parameters: none
+ Returns: array of (id /* immutable and used for further operations */,
+ description /* name used by users */,
+ x, y, width,height /* dimension */,
+ locationID /* to be sent to a location service for resolution */
+ os, machineName /* ??? */
+
+- status
+ Parameters: id /* source or sink */
+ Returns: (id, description, x, y, width, height, locationID, os, machineName)
+
+- sessionStatus
+ Parameters: id /* session */
+ Returns: (id, srcID, sinkId, x, y, w, h, iconified, fullscreen)
+
+- snapshot
+ Parameters: id=id&width=num /* source */
+ Returns: PNG of desktop, optionally scaled to fit into width pixels
+
+SINK OPERATIONS:
+----------------
+- connect
+ Parameters: source=id&sink=id
+ Returns: id /* sessionID */
+
+- disconnect
+ Parameters: id /* sessionID */
+ Returns: none
+
+- move
+ Parameters: sessionID=id&x=&y=&width=&height= /* new dimensions - used for resizing and moving */
+ Returns: none /* issue a sessionstatus to get the final location */
+
+- iconify
+ Parameters: id /* sessionID, toggles state */
+ Returns: none
+
+- fullscreen
+ Parameters: id /* sessionID, toggles state */
+ Returns: none
+
+SOURCE OPERATION:
+-----------------
+- createRegion
+ Parameters: source=id&x=&y=&w=&h=
+ Returns: id /* new source id */
+
+
+

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{DEAB3158-3B56-4E30-BC9D-D17BE2DBB219}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>FXPAL.DisplayCast.ControllerService</RootNamespace>
+ <AssemblyName>FXPAL.DisplayCast.ControllerService</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>
+ </TargetFrameworkProfile>
+ <FileAlignment>512</FileAlignment>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <SccProjectName>Svn</SccProjectName>
+ <SccLocalPath>Svn</SccLocalPath>
+ <SccAuxPath>Svn</SccAuxPath>
+ <SccProvider>SubversionScc</SccProvider>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>USE_BITMAP_COMPRESS;USE_BLUETOOTH;USE_IONIC_ZLIB_N;USE_WIFI_LOCALIZATION_N;PLAYER_TASKBAR;CONTROLLER_DEBUG_SERVICE_N</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup>
+ <StartupObject>FXPAL.DisplayCast.ControllerService.Program</StartupObject>
+ </PropertyGroup>
+ <PropertyGroup>
+ <ApplicationIcon>dc.ico</ApplicationIcon>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Configuration.Install" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Management" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.ServiceProcess" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="APIresponder.cs" />
+ <Compile Include="JSONresponses.cs" />
+ <Compile Include="monitorPlayers.cs" />
+ <Compile Include="ProjectInstaller.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="ProjectInstaller.Designer.cs">
+ <DependentUpon>ProjectInstaller.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Service.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="Service.Designer.cs">
+ <DependentUpon>Service.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="ProjectInstaller.resx">
+ <DependentUpon>ProjectInstaller.cs</DependentUpon>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="dc.ico">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Shared\Shared.csproj">
+ <Project>{7C03A308-2C6B-489F-A009-AE224B92FE26}</Project>
+ <Name>Shared</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\ZeroconfService\ZeroconfService.csproj">
+ <Project>{DF49DC31-7E4D-44C2-8E35-51E61762265A}</Project>
+ <Name>ZeroconfService</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.0">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <COMReference Include="Bonjour">
+ <Guid>{18FBED6D-F2B7-4EC8-A4A4-46282E635308}</Guid>
+ <VersionMajor>1</VersionMajor>
+ <VersionMinor>0</VersionMinor>
+ <Lcid>0</Lcid>
+ <WrapperTool>tlbimp</WrapperTool>
+ <Isolated>False</Isolated>
+ <EmbedInteropTypes>True</EmbedInteropTypes>
+ </COMReference>
+ </ItemGroup>
+ <ItemGroup>
+ <WCFMetadata Include="Service References\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
@@ -0,0 +1,61 @@
+// Copyright (c) 2012, Fuji Xerox Co., Ltd.
+// All rights reserved.
+// Author: Surendar Chandra, FX Palo Alto Laboratory, Inc.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace FXPAL.DisplayCast.ControllerService {
+ // Responses sent to end users as JSON objects
+ /// <summary>
+ /// Structure for sources (Streamer) and Sinks (Players, Archivers)
+ /// </summary>
+ class JSONSrcSink {
+ public String id; // Immutable ID.
+ public String description; // User defined name. Names are used by users and can change at any time
+ public int x, y, width, height; // Dimensions in pixels
+ public int maskX, maskY, maskWidth, maskHeight; // The API now sends out both the actual screen dimensions (above) and the masked region
+ public String locationID; // Must be sent to the location server for resolution
+
+ public String os; // Just in case
+ public String machineName; // Just in case
+ public String userName; // User name for better sorting of Streamers
+ public String nearBy; // Currently uses BlueTooth to locate nearby players
+ // public Double version; // Make sure that we are talking to the right person
+ // public int imagePort;
+ }
+
+ /// <summary>
+ /// Sessions. They are reported by Players/Archivers
+ /// </summary>
+ class JSONSession {
+ public String id; // Immutable ID.
+ public String srcId; // JSONSrcSrink.id
+ public String sinkId; // JSONSrcSrink.id
+ public int x, y, width, height; // Location on sink
+ public int iconified; // window state
+ public int fullScreen; // window state
+ }
+
+ /// <summary>
+ /// One a successful session creation, return the new session ID
+ /// </summary>
+ class JSONnewSession {
+ public String id; // Immutable ID.
+ }
+
+ /// <summary>
+ /// Return the status of the operation
+ /// </summary>
+ class JSONstatus {
+ public String result;
+ }
+
+ class JSONwhoami {
+ public String player; // Return the Player running at the IP address which sends a WHOAMI command
+ public String streamer; // Returns the Stream
+ public String archiver; // Returns the Archiver
+ }
+}
@@ -0,0 +1,29 @@
+// Copyright (c) 2012, Fuji Xerox Co., Ltd.
+// All rights reserved.
+// Author: Surendar Chandra, FX Palo Alto Laboratory, Inc.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.ServiceProcess;
+using System.Text;
+
+namespace FXPAL.DisplayCast.ControllerService {
+ static class Program {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ static void Main() {
+#if CONTROLLER_DEBUG_SERVICE
+ Service s = new Service();
+ s.Start();
+#else
+ ServiceBase[] ServicesToRun;
+ ServicesToRun = new ServiceBase[] {
+ new Service()
+ };
+ ServiceBase.Run(ServicesToRun);
+#endif
+ }
+ }
+}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 48fbf06

Please sign in to comment.