Skip to content

Commit

Permalink
Add WebRTC DTOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Apr 14, 2020
1 parent 6f50fe6 commit d284988
Show file tree
Hide file tree
Showing 61 changed files with 782 additions and 277 deletions.
2 changes: 1 addition & 1 deletion Desktop.Win/Properties/PublishProfiles/win-x64.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<TargetFramework>netcoreapp3.1</TargetFramework>
<PublishDir>..\Server\wwwroot\Downloads\Win-x64\</PublishDir>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<SelfContained>True</SelfContained>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
<PublishTrimmed>True</PublishTrimmed>
Expand Down
16 changes: 2 additions & 14 deletions Server/Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,14 @@
<Content Remove="wwwroot\scripts\Models\GenericCommandResult.ts" />
<Content Remove="wwwroot\scripts\Models\Parameter.ts" />
<Content Remove="wwwroot\scripts\Models\Point.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\RtcDtos\ClipboardTextDto.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\RtcDtos\MachineNameDto.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\RtcDtos\ScreenDataDto.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\MessageSender.ts" />
<Content Remove="wwwroot\scripts\Models\UserOptions.ts" />
<Content Remove="wwwroot\scripts\Pages\ApiTokens.ts" />
<Content Remove="wwwroot\scripts\Pages\IndexNotLoggedIn.ts" />
<Content Remove="wwwroot\scripts\Pages\OrganizationManagement.ts" />
<Content Remove="wwwroot\scripts\Pages\ServerConfig.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\ClipboardWatcher.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\Main.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\RtcDtos\ScreenSizeDto.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\RtcMessageHandler.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\RtcSession.ts" />
<Content Remove="wwwroot\scripts\RemoteControl\UI.ts" />
Expand Down Expand Up @@ -156,18 +153,9 @@
<TypeScriptCompile Include="wwwroot\scripts\CommandProcessor.ts" />
<TypeScriptCompile Include="wwwroot\scripts\Models\CommandLineParameter.ts" />
<TypeScriptCompile Include="wwwroot\scripts\Models\ConsoleCommand.ts" />
<TypeScriptCompile Include="wwwroot\scripts\RemoteControl\DynamicDto.ts" />
<TypeScriptCompile Include="wwwroot\scripts\Enums\DynamicDtoType.ts" />
<TypeScriptCompile Include="wwwroot\scripts\RemoteControl\RtcDtos\CaptureFrameDto.ts" />
<TypeScriptCompile Include="wwwroot\scripts\RemoteControl\MessageSender.ts" />
<TypeScriptCompile Include="wwwroot\scripts\Models\Point.ts" />
<TypeScriptCompile Include="wwwroot\scripts\RemoteControl\RtcDtos\ClipboardTextDto.ts" />
<TypeScriptCompile Include="wwwroot\scripts\RemoteControl\RtcDtos\MachineNameDto.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="wwwroot\scripts\RemoteControl\RtcDtos\ScreenSizeDto.ts">
<SubType>Code</SubType>
</TypeScriptCompile>
<TypeScriptCompile Include="wwwroot\scripts\RemoteControl\RtcDtos\ScreenDataDto.ts" />
<TypeScriptCompile Include="wwwroot\scripts\Models\UserOptions.ts" />
<TypeScriptCompile Include="wwwroot\scripts\Models\Device.ts" />
<TypeScriptCompile Include="wwwroot\scripts\Models\Parameter.ts" />
Expand Down
26 changes: 26 additions & 0 deletions Server/wwwroot/scripts/Enums/BinaryDtoType.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Server/wwwroot/scripts/Enums/BinaryDtoType.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions Server/wwwroot/scripts/Enums/BinaryDtoType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export enum BinaryDtoType {
CaptureFrame = 0,
ScreenData = 1,
ScreenSize = 2,
MachineName = 3,
ClipboardText = 4,
AudioSample = 5,
CursorChange = 6,
SelectScreen = 7,
MouseMove = 8,
MouseDown = 9,
MouseUp = 10,
Tap = 11,
MouseWheel = 12,
KeyDown = 13,
KeyUp = 14,
CtrlAltDel = 15,
AutoQualityAdjust = 16,
ToggleAudio = 17,
ToggleBlockInput = 18,
ClipboardTransfer = 19,
KeyPress = 20,
QualityChange = 21
}
9 changes: 0 additions & 9 deletions Server/wwwroot/scripts/Enums/DynamicDtoType.js

This file was deleted.

1 change: 0 additions & 1 deletion Server/wwwroot/scripts/Enums/DynamicDtoType.js.map

This file was deleted.

7 changes: 0 additions & 7 deletions Server/wwwroot/scripts/Enums/DynamicDtoType.ts

This file was deleted.

1 change: 1 addition & 0 deletions Server/wwwroot/scripts/RemoteControl/BinaryDto.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Server/wwwroot/scripts/RemoteControl/BinaryDto.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Server/wwwroot/scripts/RemoteControl/BinaryDto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { BinaryDtoType } from "../Enums/BinaryDtoType.js";

export interface BinaryDto {
DtoType: BinaryDtoType
}
4 changes: 2 additions & 2 deletions Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClipboardTransferTextArea } from "./UI.js";
import { Remotely } from "./Main.js";
import { MainRc } from "./Main.js";

export class ClipboardWatcher {
ClipboardTimer: number;
Expand All @@ -22,7 +22,7 @@ export class ClipboardWatcher {
if (this.LastClipboardText != newText) {
this.LastClipboardText = newText;
ClipboardTransferTextArea.value = newText;
Remotely.RCBrowserSockets.SendClipboardTransfer(newText, false);
MainRc.RCBrowserSockets.SendClipboardTransfer(newText, false);
}
})
}, 100);
Expand Down
1 change: 0 additions & 1 deletion Server/wwwroot/scripts/RemoteControl/DynamicDto.js

This file was deleted.

1 change: 0 additions & 1 deletion Server/wwwroot/scripts/RemoteControl/DynamicDto.js.map

This file was deleted.

5 changes: 0 additions & 5 deletions Server/wwwroot/scripts/RemoteControl/DynamicDto.ts

This file was deleted.

18 changes: 9 additions & 9 deletions Server/wwwroot/scripts/RemoteControl/Main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Server/wwwroot/scripts/RemoteControl/Main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Server/wwwroot/scripts/RemoteControl/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { RtcMessageHandler } from "./RtcMessageHandler.js";

var queryString = Utilities.ParseSearchString();

export const Remotely = {
export const MainRc = {
ClipboardWatcher: new ClipboardWatcher(),
Debug: false,
RCBrowserSockets: new RCBrowserSockets(),
Expand All @@ -21,12 +21,12 @@ export const Remotely = {
Mode: RemoteControlMode.None,

Init: () => {
UI.ApplyInputHandlers(Remotely.RCBrowserSockets);
UI.ApplyInputHandlers(MainRc.RCBrowserSockets);

if (queryString["clientID"]) {
Remotely.Mode = RemoteControlMode.Unattended;
MainRc.Mode = RemoteControlMode.Unattended;
UI.ConnectBox.style.display = "none";
Remotely.RCBrowserSockets.Connect();
MainRc.RCBrowserSockets.Connect();
}
else if (queryString["sessionID"]) {
UI.SessionIDInput.value = decodeURIComponent(queryString["sessionID"]);
Expand All @@ -38,12 +38,12 @@ export const Remotely = {
},
ConnectToClient: () => {
UI.ConnectButton.disabled = true;
Remotely.ClientID = UI.SessionIDInput.value.split(" ").join("");
Remotely.RequesterName = UI.RequesterNameInput.value;
Remotely.Mode = RemoteControlMode.Normal;
Remotely.RCBrowserSockets.Connect();
MainRc.ClientID = UI.SessionIDInput.value.split(" ").join("");
MainRc.RequesterName = UI.RequesterNameInput.value;
MainRc.Mode = RemoteControlMode.Normal;
MainRc.RCBrowserSockets.Connect();
UI.StatusMessage.innerHTML = "Sending connection request...";
}
}

window["Remotely"] = Remotely;
window["Remotely"] = MainRc;
Loading

0 comments on commit d284988

Please sign in to comment.