summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins/AdvancedAutoAway
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-07 20:25:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-07 20:25:38 +0000
commit920aa970afa086a3a143b39005747210b94f237b (patch)
tree10e5bdc77f6a533772e4509e4a56ba3f7dc46722 /plugins/StatusPlugins/AdvancedAutoAway
parent097c52ad9a2928422084bf76cebee58958341574 (diff)
Trigger plugin's support removed, cause this plugin is dead
git-svn-id: http://svn.miranda-ng.org/main/trunk@4374 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/AdvancedAutoAway')
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj2
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj.filters6
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj2
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj.filters6
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp12
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp161
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.h7
7 files changed, 0 insertions, 196 deletions
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj
index 4b072d286c..e205120f39 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj
+++ b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj
@@ -229,13 +229,11 @@
<ClCompile Include="main.cpp" />
<ClCompile Include="msgoptions.cpp" />
<ClCompile Include="options.cpp" />
- <ClCompile Include="trigger_aaa.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="advancedautoaway.h" />
<ClInclude Include="..\commonstatus.h" />
<ClInclude Include="..\resource.h" />
- <ClInclude Include="trigger_aaa.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\useronli.ico" />
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj.filters b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj.filters
index 4df6386e1f..fc5daed232 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj.filters
+++ b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj.filters
@@ -36,9 +36,6 @@
<ClCompile Include="options.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="trigger_aaa.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -53,9 +50,6 @@
<ClInclude Include="..\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="trigger_aaa.h">
- <Filter>Header Files</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\useronli.ico">
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj
index 1f5c689c58..a4074685fb 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj
+++ b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj
@@ -234,13 +234,11 @@
<ClCompile Include="main.cpp" />
<ClCompile Include="msgoptions.cpp" />
<ClCompile Include="options.cpp" />
- <ClCompile Include="trigger_aaa.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="advancedautoaway.h" />
<ClInclude Include="..\commonstatus.h" />
<ClInclude Include="..\resource.h" />
- <ClInclude Include="trigger_aaa.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\useronli.ico" />
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj.filters b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj.filters
index 4df6386e1f..fc5daed232 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj.filters
+++ b/plugins/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_11.vcxproj.filters
@@ -36,9 +36,6 @@
<ClCompile Include="options.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="trigger_aaa.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -53,9 +50,6 @@
<ClInclude Include="..\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="trigger_aaa.h">
- <Filter>Header Files</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\useronli.ico">
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
index 6e53e477f3..f08ed86d13 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
@@ -30,13 +30,6 @@
#define SECS_PER_MINUTE 60 /* default I believe */
#endif
-#define TRIGGERPLUGIN /* remove this to compile without it */
-
-#ifdef TRIGGERPLUGIN
-extern int InitTrigger();
-extern int DeInitTrigger();
-#endif
-
/////////////////////////////////////////////////////////////////////////////////////////
int CompareSettings( const TAAAProtoSetting* p1, const TAAAProtoSetting* p2 )
@@ -629,10 +622,5 @@ int CSModuleLoaded(WPARAM wParam, LPARAM lParam)
////////////////////////////////////////////////////////////////////////////////////////
LoadOptions(*autoAwaySettings, FALSE);
-
-#ifdef TRIGGERPLUGIN
- InitTrigger();
-#endif
-
return 0;
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp
deleted file mode 100644
index 47740ac56a..0000000000
--- a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-#include "../commonstatus.h"
-#include "advancedautoaway.h"
-#include <m_trigger.h>
-#include "trigger_aaa.h"
-#include "../resource.h"
-
-extern HINSTANCE hInst;
-static HANDLE hAAAStateChangedHook;
-
-static int AAAStateChanged(WPARAM wParam, LPARAM lParam) {
-
- AUTOAWAYSETTING *aas;
- DWORD triggerID;
- REPORTINFO ri;
- TRIGGERDATA td;
- BOOL bReport;
-
- aas = (AUTOAWAYSETTING *)lParam;
- triggerID = 0;
- do {
- triggerID = (DWORD)CallService(MS_TRIGGER_FINDNEXTTRIGGERID, triggerID, (LPARAM)TRIGGERNAME);
- if (triggerID == 0) {
- continue;
- }
- bReport = FALSE;
- switch (aas->curState) {
- case STATUS1_SET:
- if (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_ENTERFIRST, 0)) {
- bReport = TRUE;
- }
- break;
- case STATUS2_SET:
- if (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_ENTERSECOND, 0)) {
- bReport = TRUE;
- }
- break;
- case SET_ORGSTATUS:
- if ( (aas->oldState == STATUS1_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0))) {
- bReport = TRUE;;
- }
- if ( (aas->oldState == STATUS2_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0))) {
- bReport = TRUE;;
- }
- break;
- case HIDDEN_ACTIVE:
- if (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_BECOMEACTIVE, 0)) {
- bReport = TRUE;
- }
- break;
- case ACTIVE:
- if (aas->oldState == HIDDEN_ACTIVE) {
- char setting[128];
- char *szProto;
-
- szProto = db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)?SETTING_ALL:aas->protocolSetting->szName;
- _snprintf(setting, sizeof(setting), "%s_Lv1Status", szProto);
- if ( (aas->protocolSetting->lastStatus == db_get_w(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) {
- bReport = TRUE;
- }
-
- _snprintf(setting, sizeof(setting), "%s_Lv2Status", szProto);
- if ( (aas->protocolSetting->lastStatus == db_get_w(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) {
- bReport = TRUE;
- }
- }
- break;
- }
- if (!bReport) {
- continue;
- }
- ZeroMemory(&td, sizeof(td));
- td.cbSize = sizeof(td);
- td.dFlags = DF_PROTO|DF_STATUS|DF_TEXT;
- td.szProto = td.szText = aas->protocolSetting->szName;
- td.status = aas->protocolSetting->status;
- ZeroMemory(&ri, sizeof(REPORTINFO));
- ri.cbSize = sizeof(REPORTINFO);
- ri.triggerID = triggerID;
- ri.pszName = TRIGGERNAME;
- ri.flags = TRG_PERFORM;
- ri.td = &td;
- CallService(MS_TRIGGER_REPORTEVENT, 0, (LPARAM)&ri);
- } while (triggerID != 0);
-
- return 0;
-}
-
-static INT_PTR CALLBACK DlgProcOptsAAAStateChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
-
- switch (msg) {
- case WM_INITDIALOG: {
- DWORD triggerID;
-
- TranslateDialogDefault(hwndDlg);
- triggerID = (DWORD)lParam;
- CheckDlgButton(hwndDlg, IDC_ENTERFIRST, DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_ENTERFIRST, 0)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ENTERSECOND, DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_ENTERSECOND, 0)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LEAVEFIRST, DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LEAVESECOND, DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BECOMEACTIVE, DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_BECOMEACTIVE, 0)?BST_CHECKED:BST_UNCHECKED);
- break;
- }
-
- case TM_ADDTRIGGER: {
- // wParam = trigger ID
- DWORD triggerID;
-
- triggerID = (DWORD)wParam;
- DBWriteTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_ENTERFIRST, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ENTERFIRST));
- DBWriteTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_ENTERSECOND, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ENTERSECOND));
- DBWriteTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LEAVEFIRST));
- DBWriteTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LEAVESECOND));
- DBWriteTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_BECOMEACTIVE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_BECOMEACTIVE));
- break;
- }
-
- case TM_DELTRIGGER: {
- // wParam = triggerID
- DWORD triggerID;
- REMOVETRIGGERSETTINGS rts;
-
- triggerID = (DWORD)wParam;
- rts.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- rts.prefix = PREFIX_TRIGGERID;
- rts.id = triggerID;
- rts.hContact = NULL;
- rts.szModule = MODULENAME;
- CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&rts);
- break;
- }
- }
-
- return FALSE;
-}
-
-int InitTrigger() {
-
- TRIGGERREGISTER tr;
-
- if (!ServiceExists(MS_TRIGGER_REGISTERTRIGGER)) {
- return -1;
- }
- ZeroMemory(&tr, sizeof(tr));
- tr.cbSize = sizeof(tr);
- tr.pszName = TRIGGERNAME;
- tr.hInstance = hInst;
- tr.pfnDlgProc = DlgProcOptsAAAStateChange;
- tr.pszTemplate = MAKEINTRESOURCEA(IDD_TRG_AAASTATECHANGE);
- tr.dFlags = DF_STATUS|DF_PROTO;
- CallService(MS_TRIGGER_REGISTERTRIGGER, 0, (LPARAM)&tr);
- hAAAStateChangedHook = HookEvent(ME_AAA_STATECHANGED, AAAStateChanged);
-
- return 0;
-}
-
-int DeInitTrigger() {
-
- UnhookEvent(hAAAStateChangedHook);
-
- return 0;
-} \ No newline at end of file
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.h b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.h
deleted file mode 100644
index 52b15edd00..0000000000
--- a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#define TRIGGERNAME "Auto-Away: State change"
-
-#define SETTING_ENTERFIRST "trigger_EnterFirst"
-#define SETTING_ENTERSECOND "trigger_EnterSecond"
-#define SETTING_LEAVEFIRST "trigger_LeaveFirst"
-#define SETTING_LEAVESECOND "trigger_LeaveSecond"
-#define SETTING_BECOMEACTIVE "trigger_BecomeActive" \ No newline at end of file