Skip to content

Commit

Permalink
Async client, updated logging, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
JPersson77 committed May 17, 2024
1 parent f08a658 commit 34769df
Show file tree
Hide file tree
Showing 50 changed files with 6,690 additions and 6,914 deletions.
1,269 changes: 0 additions & 1,269 deletions Common/Common.cpp

This file was deleted.

306 changes: 0 additions & 306 deletions Common/Common.h

This file was deleted.

15 changes: 15 additions & 0 deletions Common/common_app_define.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

// common application definitions
#define APPNAME L"LGTV Companion"
#define APP_VERSION L"4.0.0"
#define CONFIG_FILE L"config.json"
#define LOG_FILE L"log.txt"
#define WINDOW_CLASS_UNIQUE L"YOLOx0x0x0181818"
#define PIPENAME TEXT("\\\\.\\pipe\\LGTVyolo")
#define NEWRELEASELINK L"https://github.com/JPersson77/LGTVCompanion/releases"
#define VERSIONCHECKLINK L"https://api.github.com/repos/JPersson77/LGTVCompanion/releases"
#define DONATELINK L"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&lc=US&item_name=Friendly+gift+for+the+development+of+LGTV+Companion&no_note=0&cn=&currency_code=EUR&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted"
#define DISCORDLINK L"https://discord.gg/7KkTPrP3fq"
#define RESTARTWORDSLINK L"https://docs.google.com/spreadsheets/d/1SNjYh7kt4aVhHg0ZjI3i96vCeOJZJS73o9Wl-OVEvzk/edit#gid=0"

43 changes: 43 additions & 0 deletions Common/device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#pragma once
#include <string>
#include <vector>


#define WOL_TYPE_NETWORKBROADCAST 1
#define WOL_TYPE_IP 2
#define WOL_TYPE_SUBNETBROADCAST 3
#define WOL_TYPE_AUTO 4
#define WOL_DEFAULT_SUBNET "255.255.255.0"

#define PERSISTENT_CONNECTION_OFF 0
#define PERSISTENT_CONNECTION_ON 1
#define PERSISTENT_CONNECTION_KEEPALIVE 2

// Additional device flags and configuration
struct DeviceAdditionalConf
{
bool user_idle_mode_mute_speakers;
int log_level;
std::string data_path;
int timeout;
};
// Properties, configuration and default values for a webOS device
struct Device {
std::string id;
std::string ip;
std::vector<std::string> mac_addresses;
std::string session_key;
std::string name;
std::string uniqueDeviceKey;
std::string uniqueDeviceKeyTemporary;
std::string subnet = WOL_DEFAULT_SUBNET;
bool enabled = true;
int wake_method = WOL_TYPE_AUTO;
bool input_control_hdmi = false;
int input_control_hdmi_number = 1;
bool set_hdmi_input_on_power_on = false;
int set_hdmi_input_on_power_on_number = 1;
bool ssl = true;
int persistent_connection_level = PERSISTENT_CONNECTION_OFF;
DeviceAdditionalConf extra;
};
Loading

0 comments on commit 34769df

Please sign in to comment.