From 1eb15995edb840fb9823d9e8a0c1ca381c174141 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 29 Jan 2018 12:54:59 +0300 Subject: unused code cleaned --- plugins/ExternalAPI/m_statusplugins.h | 26 ---------------------- .../src/AdvancedAutoAway/advancedautoaway.cpp | 6 ----- .../src/AdvancedAutoAway/advancedautoaway.h | 9 ++++++++ 3 files changed, 9 insertions(+), 32 deletions(-) (limited to 'plugins') diff --git a/plugins/ExternalAPI/m_statusplugins.h b/plugins/ExternalAPI/m_statusplugins.h index a13fb31c44..85e2ab1b84 100644 --- a/plugins/ExternalAPI/m_statusplugins.h +++ b/plugins/ExternalAPI/m_statusplugins.h @@ -66,32 +66,6 @@ typedef struct { // returns 0 on success #define MS_SS_GETPROFILENAME "StartupStatus/GetProfileName" -// -- AdvancedAutoAway -- -typedef enum { - ACTIVE, // user is active - STATUS1_SET, // first status change happened - STATUS2_SET, // second status change happened - SET_ORGSTATUS, // user was active again, original status will be restored - HIDDEN_ACTIVE // user is active, but this is not shown to the outside world -} STATES; - -typedef struct { - PROTOCOLSETTINGEX* protocolSetting; - int originalStatusMode; // this is set only when going from ACTIVE to STATUS1_SET (or to STATUS2_SET) - // (note: this is therefore not always valid) - STATES - oldState, // state before the call - curState; // current state - BOOL bStatusChanged; // the status of the protocol will actually be changed - // (note: unlike the name suggests, the status is changed AFTER this hook is called) - BOOL bManual; // state changed becuase status was changed manually -} AUTOAWAYSETTING; -// wParam = 0; -// lParam = AUTOAWAYSETTING* -// Called when a protocol's state in AAA is changed this does NOT necessary means the status was changed -// note: this hook is called for each protocol seperately -#define ME_AAA_STATECHANGED "AdvancedAutoAway/StateChanged" - // -- KeepStatus -- #define KS_CONN_STATE_LOST 1 // lParam = protocol diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp index 50cf03813d..81cff37ffd 100644 --- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp @@ -51,7 +51,6 @@ TAAAProtoSetting::~TAAAProtoSetting() int AAALangPack; -static HANDLE hStateChangedEvent = nullptr; static HANDLE hEvents[4]; static BOOL ignoreLockKeys = FALSE; @@ -227,7 +226,6 @@ static int changeState(TAAAProtoSetting &setting, STATES newState) log_debugA("%s state change: %s -> %s", setting.m_szName, status2descr(setting.oldState), status2descr(setting.curState)); - NotifyEventHooks(hStateChangedEvent, 0, (LPARAM)&setting); if (setting.curState != SET_ORGSTATUS && setting.curState != ACTIVE && setting.statusChanged) { /* change the awaymessage */ if (setting.m_szMsg != nullptr) { @@ -588,8 +586,6 @@ void AdvancedAutoAwayLoad() AutoAwayOptInitialise(0, 0); } else HookEvent(ME_SYSTEM_MODULESLOADED, AAAModuleLoaded); - - hStateChangedEvent = CreateHookableEvent(ME_AAA_STATECHANGED); } void AdvancedAutoAwayUnload() @@ -604,7 +600,5 @@ void AdvancedAutoAwayUnload() it = nullptr; } - DestroyHookableEvent(hStateChangedEvent); hStateChangedEvent = nullptr; - autoAwaySettings.destroy(); } diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h index 43f9637d79..8ba6e3f606 100644 --- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h +++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h @@ -50,6 +50,15 @@ #define FLAG_ONLOCK 0x0080 // db: on work station lock #define FLAG_FULLSCREEN 0x0100 // db: on full screen +typedef enum +{ + ACTIVE, // user is active + STATUS1_SET, // first status change happened + STATUS2_SET, // second status change happened + SET_ORGSTATUS, // user was active again, original status will be restored + HIDDEN_ACTIVE // user is active, but this is not shown to the outside world +} STATES; + struct TAAAProtoSetting : public PROTOCOLSETTINGEX, public MZeroedObject { TAAAProtoSetting(PROTOACCOUNT *pa); -- cgit v1.2.3