Commit Graph

80 Commits

Author SHA1 Message Date
tt2468
ee751edf54 SettingsDialog: Mild refactor and add Connect Info dialog
Among lots of stuff:

- Generate a random password on first load

- Add `ConnectInfo` dialog including QR code display

- Add `Generate Password` button to generate a new random
password

- Delete `Copy Password to Clipboard` button

- Delete `GetConnectString` or whatever from WebSocketServer
(reimplemented the functionality directly into ConnectInfo)

- Added `GeneratePassword()` to Utils

Todo: Show warning when users specify their own passwords
2021-05-08 04:29:03 -07:00
tt2468
600505b60a Utils: Add Obs utils namespace 2021-05-08 00:54:35 -07:00
tt2468
8a18d3603c RequestStatus: Add a few items 2021-05-04 15:50:38 -07:00
tt2468
160ef4d771 RequestHandler: Add RequestBatch logic 2021-05-03 18:44:13 -07:00
tt2468
2aba810ce1 RequestHandler: Finish checks system and first request 2021-05-03 16:55:30 -07:00
tt2468
c2b717cabf RequestStatus: Put into namespace
Apparently this is supposed to help?
2021-05-03 13:43:59 -07:00
tt2468
807a1501b7 base: Refactor request stuff and finish more logic 2021-05-03 13:31:22 -07:00
tt2468
687f53bc6d plugin-macros: Include base.h directly (to avoid missing blog()) 2021-05-03 10:34:36 -07:00
tt2468
36af7f6f58 base: Lots of stuff, including RequestHandler progress 2021-05-02 19:48:44 -07:00
tt2468
04f7b33755 SettingsDialog: Add Identified column to session table 2021-04-30 11:24:09 -07:00
tt2468
997dc40d6c WebSocketProtocol: Fix compare (oops) 2021-04-30 10:46:53 -07:00
tt2468
7f503d846b WebSocketProtocol: Fix vector initialization 2021-04-30 10:42:53 -07:00
tt2468
51e7fdae9e SettingsDialog: Add debug setting hover text
Debug mode requires a restart of the websocket server by design.
However, to avoid interrupting connections, the websocket server is
not automatically restarted when the setting is changed
2021-04-30 10:27:41 -07:00
tt2468
df8ef87dc5 WebSocketServer: Add parts for availableRequests/availableEvents 2021-04-30 10:13:42 -07:00
tt2468
45367a7355 WebSocketProtocol: Session parameter stuff 2021-04-30 10:03:38 -07:00
tt2468
ffaac93ba6 WebSocketSession: Add mutex for operations which change session parameters 2021-04-30 08:56:08 -07:00
tt2468
4be9b995fb base: Use shared_ptr instead of explicit ref counts
Took a night of sleep but I realized how I could solve the
concurrency issues in a good way. Uses shared_ptr, where the map
always accounts for one reference to a session.
2021-04-30 08:45:34 -07:00
tt2468
32758198ab WebSocketSession: Add refcount
Working towards fixing concurrency issues. Todo:

- Wait for refcount to be 0 before deleting object
- Use .at() instead of operator[] to prevent recreating deleted
sessions
- There was a third thing. Dont remember what it was
2021-04-29 22:11:24 -07:00
tt2468
e151a9a8db base: Use Unix EOL 2021-04-29 21:13:34 -07:00
tt2468
904e866a07 WebSocketProtocol: Delete left over log message 2021-04-29 21:10:19 -07:00
tt2468
09bfea0628 WebSocketProtocol: Add Identify logic (not tested well) 2021-04-29 20:37:28 -07:00
tt2468
f57d03e4bb WebSocketProtocol: Rename Process to ProcessMessage 2021-04-29 19:14:23 -07:00
tt2468
e0183d2f85 WebSocketServer: This *should* complete the functionality of WebSocketServer. 2021-04-29 19:03:32 -07:00
tt2468
ad8b13606f Base: Add WebSocketProtocol
Will be used to handle incoming websocket messages. Initially I was
going to handle messages within WebSocketServer, but the file is
starting to get very large and so it's only fair to split it up.
2021-04-29 10:52:29 -07:00
tt2468
44c5683ec4 WebSocketServer: Fix some bugs 2021-04-29 10:11:19 -07:00
tt2468
7c80a5d050 WebSocketServer: Add incoming and outgoing message logging and incrementing 2021-04-29 09:56:21 -07:00
tt2468
190d42fdf2 WebSocketServer: Initial onMessage handling 2021-04-29 09:42:22 -07:00
tt2468
724a63f1c8 WebSocketServer: Catch and ignore errors in Hello sending. 2021-04-29 09:14:35 -07:00
tt2468
561ba907d4 WebSocketServer: Ignore send errors 2021-04-29 09:09:20 -07:00
tt2468
ba710efe09 WebSocketServer: Include password in changed GetConnectString()
New format is `obswebsocket|ip:port|password`
2021-04-29 09:06:12 -07:00
tt2468
4028d42931 WebSocketServer: Only encode event once and when it's required 2021-04-29 08:52:40 -07:00
tt2468
d8e84321b1 WebSocketServer: Clarify logging 2021-04-29 08:34:50 -07:00
tt2468
1cee256cb3 WebSocketServer: Store debug setting 2021-04-29 08:24:27 -07:00
tt2468
fa259b43a9 WebSocketServer: Finish BroadcastEvent() 2021-04-28 22:52:19 -07:00
tt2468
b43fc4fec6 WebSocketServer: Make QObject again 2021-04-28 22:13:02 -07:00
tt2468
0370b5882d WebSocketServer: Finish GetConnectUrl() 2021-04-28 22:07:52 -07:00
tt2468
d1d5dd74ea WebSocketServer: Send hello in onOpen 2021-04-28 22:03:23 -07:00
tt2468
b0a594e509 WebSocketCloseCode: Add InvalidContentType 2021-04-28 20:54:31 -07:00
tt2468
c73f6608b9 Config: Add command line parameters to override port and password 2021-04-28 15:59:29 -07:00
tt2468
1dcf6460f1 Utils: Add Platform helpers 2021-04-28 14:24:05 -07:00
tt2468
af46271b27 WebSocketServer: Add some onOpen and onClose logic, make websocketpp logging mirror debug setting 2021-04-28 13:26:22 -07:00
tt2468
0be9174bb1 WebSocketServer: Don't call stop() on the server
For some reason I thought I was supposed to call it /shrug
2021-04-28 12:36:15 -07:00
tt2468
af7a539e84 Only stop server if its running 2021-04-28 12:20:56 -07:00
tt2468
c91b924f0e SettingsDialog: Server port had no logic for some reason. Also restart server if settings are changed 2021-04-28 12:18:46 -07:00
tt2468
a70e18a2bf WebSocketServer: Add some error handling 2021-04-28 12:09:12 -07:00
tt2468
fb01a28623 SettingsDialog: Add timer to constantly update session table 2021-04-28 11:56:41 -07:00
tt2468
aa241ecc9e base: Make sure config is saved on exit 2021-04-28 11:45:34 -07:00
tt2468
b53b40d9c8 base: Improve logging 2021-04-28 11:43:39 -07:00
tt2468
e2d837958f WebSocketServer: Fix shutdown order 2021-04-28 11:40:07 -07:00
tt2468
5348c80aa8 WebSocketServer: Add GetWebSocketSessions() logic 2021-04-28 11:28:07 -07:00