Skip to content

Commit

Permalink
More features for user idle mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JPersson77 committed Jan 1, 2023
1 parent dc02e45 commit 6f1dd31
Show file tree
Hide file tree
Showing 10 changed files with 593 additions and 237 deletions.
2 changes: 1 addition & 1 deletion LGTV Companion Service/Service.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#pragma comment(lib, "Iphlpapi.lib")

#define APPNAME L"LGTV Companion"
#define APPVERSION L"1.8.7"
#define APPVERSION L"1.9.0"
#define SVCNAME L"LGTVsvc"
#define SVCDISPLAYNAME L"LGTV Companion Service"
#define SERVICE_PORT "3000"
Expand Down
2 changes: 1 addition & 1 deletion LGTV Companion Setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?define LGTV Companion Service_TargetDir=$(var.LGTV Companion Service.TargetDir)?><?define LGTV Companion UI_TargetDir=$(var.LGTV Companion UI.TargetDir)?>
<Product Id="73337AE2-4CD1-4283-97CC-392CAFDBBCE6" Name="LGTV Companion" Language="1033" Version="1.8.7" Manufacturer="J Persson" UpgradeCode="0BA17E5B-11CE-491D-B1A1-05DD2D9F610A">
<Product Id="23818710-A2F2-4C03-892C-6A181A31CD27" Name="LGTV Companion" Language="1033" Version="1.9.0" Manufacturer="J Persson" UpgradeCode="0BA17E5B-11CE-491D-B1A1-05DD2D9F610A">
<Package Id="*" InstallerVersion="301" Compressed="yes" InstallScope="perMachine" Platform='x64' Description="LGTV Companion installer" InstallPrivileges="elevated" AdminImage="yes"/>
<Media Id="1" Cabinet="LGTVapp.cab" EmbedCab="yes" />

Expand Down
538 changes: 395 additions & 143 deletions LGTV Companion UI/LGTV Companion UI.cpp

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion LGTV Companion UI/LGTV Companion UI.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

#define APPNAME_SHORT L"LGTVcomp"
#define APPNAME_FULL L"LGTV Companion"
#define APP_VERSION L"1.8.7"
#define APP_VERSION L"1.9.0"
#define WINDOW_CLASS_UNIQUE L"YOLOx0x0x0181818"
#define NOTIFY_NEW_COMMANDLINE 1

Expand All @@ -67,6 +67,10 @@
#define JSON_IDLEBLANK "BlankWhenIdle"
#define JSON_IDLEBLANKDELAY "BlankWhenIdleDelay"
#define JSON_ADHERETOPOLOGY "AdhereDisplayTopology"
#define JSON_IDLEWHITELIST "IdleWhiteListEnabled"
#define JSON_IDLEFULLSCREEN "IdleFullscreen"
#define JSON_WHITELIST "IdleWhiteList"

#define DEFAULT_RESTART {"restart"}
#define DEFAULT_SHUTDOWN {"shutdown","power off"}
#define JSON_RDP_POWEROFF "PowerOffDuringRDP"
Expand All @@ -89,6 +93,10 @@
#define APP_TOP_PHASE_2 WM_USER+11
#define APP_TOP_PHASE_3 WM_USER+12
#define APP_TOP_NEXT_DISPLAY WM_USER+13
#define APP_LISTBOX_EDIT WM_USER+14
#define APP_LISTBOX_ADD WM_USER+15
#define APP_LISTBOX_DELETE WM_USER+16
#define APP_LISTBOX_REDRAW WM_USER+17

#define APP_CMDLINE_ON 1
#define APP_CMDLINE_OFF 2
Expand All @@ -109,6 +117,10 @@
#define VERSIONCHECKLINK L"https://api.github.com/repos/JPersson77/LGTVCompanion/releases"
#define DONATELINK L"https://www.paypal.com/donate/?hosted_button_id=TGZRPAHV4QC62"

struct WHITELIST {
std::wstring Name;
std::wstring Application;
};
struct PREFS {
std::vector<std::string> EventLogRestartString = DEFAULT_RESTART;
std::vector<std::string> EventLogShutdownString = DEFAULT_SHUTDOWN;
Expand All @@ -121,6 +133,9 @@ struct PREFS {
int BlankScreenWhenIdleDelay = 10;
bool PowerOffDuringRDP = false;
bool AdhereTopology = false;
bool bIdleWhitelistEnabled = false;
bool bFullscreenCheckEnabled = false;
std::vector<WHITELIST> WhiteList;
};
struct SESSIONPARAMETERS {
std::string DeviceId;
Expand Down Expand Up @@ -156,6 +171,7 @@ LRESULT CALLBACK DeviceWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK OptionsWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK ConfigureTopologyWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK UserIdleConfWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK WhitelistConfWndProc(HWND, UINT, WPARAM, LPARAM);

bool MessageExistingProcess(std::wstring);
bool ReadConfigFile();
Expand Down
Binary file modified LGTV Companion UI/LGTV Companion UI.rc
Binary file not shown.
26 changes: 16 additions & 10 deletions LGTV Companion UI/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define IDI_ICON4 149
#define IDI_ICON3 150
#define IDD_ADVANCEDIDLE 153
#define IDD_WHITELIST_EDIT 154
#define IDC_COMBO 1000
#define IDC_SPLIT 1001
#define IDC_OPTIONS 1002
Expand Down Expand Up @@ -83,15 +84,20 @@
#define IDC_SYSLINK_CONF 1044
#define IDC_GO2 1045
#define IDC_SYSLINK_CONF2 1045
#define IDC_CHECK1 1045
#define IDC_CHECK_FULLSCREEN 1045
#define IDC_STATIC_NO_5 1046
#define IDC_EDIT1 1046
#define IDC_SPIN1 1047
#define IDC_CHECK2 1049
#define IDC_BUTTON1 1050
#define IDC_BUTTON2 1051
#define IDC_DEVICES 1053
#define IDC_DEVICES2 1054
#define IDC_EDIT_TIME 1046
#define IDC_CHECK_WHITELIST 1049
#define IDC_SYSLINK_ADD 1055
#define IDC_SYSLINK_DELETE 1056
#define IDC_SYSLINK_EDIR 1057
#define IDC_EDIT_NAME 1057
#define IDC_SYSLINK_INFO_2 1058
#define IDC_EDIT_PROCESS 1058
#define IDC_SYSLINK_INFO_3 1059
#define IDC_SYSLINK1 1059
#define IDC_SYSLINK_BROWSE 1059
#define IDC_SYSLINK_INFO_1 1060
#define ID_ADD_MANAGE 32771
#define ID_ADD_MANAGE32772 32772
#define ID_ADD_REMOVE 32773
Expand All @@ -116,9 +122,9 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 154
#define _APS_NEXT_RESOURCE_VALUE 155
#define _APS_NEXT_COMMAND_VALUE 32788
#define _APS_NEXT_CONTROL_VALUE 1054
#define _APS_NEXT_CONTROL_VALUE 1060
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif
Loading

0 comments on commit 6f1dd31

Please sign in to comment.