From 2850a08595f1bc86384d230a85de29ac794f97ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 10 Jul 2012 20:15:30 +0000 Subject: Added SmartAutoAway (not adopted yet) git-svn-id: http://svn.miranda-ng.org/main/trunk@894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmartAutoAway/globals.cpp | 113 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 plugins/SmartAutoAway/globals.cpp (limited to 'plugins/SmartAutoAway/globals.cpp') diff --git a/plugins/SmartAutoAway/globals.cpp b/plugins/SmartAutoAway/globals.cpp new file mode 100644 index 0000000000..82f2087b3d --- /dev/null +++ b/plugins/SmartAutoAway/globals.cpp @@ -0,0 +1,113 @@ +/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-2006 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +#include "globals.h" + +HANDLE hIdleEvent = NULL; +HANDLE hNetlib; +UINT hIdleTimer = 0; + +BOOL starting=1; // this flag will be cleared later + +#ifdef UNICODE +bool *protoHasAwayMessageW=0; +bool HasAwayMessageW=0; +#endif + +int *isWaitingForRestoreStatusMessage=0; + + int *reqStatus=0; + int *courStatus=0; + int *courAwayStatus=0; + + int *protoModes=0; + + short int *awayStatusesPerm=0; + long *onlyIfBitsPerm=0; + short int *awayStatuses=0; + long *onlyIfBits=0; + + int aa_Status[] = { + ID_STATUS_OFFLINE, + ID_STATUS_ONLINE, + ID_STATUS_AWAY, + ID_STATUS_NA, + ID_STATUS_OCCUPIED, + ID_STATUS_DND, + ID_STATUS_FREECHAT, + ID_STATUS_INVISIBLE, + ID_STATUS_ONTHEPHONE, + ID_STATUS_OUTTOLUNCH +}; + + int numStatuses = sizeof(aa_Status)/sizeof(aa_Status[0]); + +HWND theDialog = 0; +HWND theDialogReconnect=0; +HWND theDialogIdle=0; +HWND theDialogIdleMessages=0; +HWND theDialogAA=0; + + +PROTOCOLDESCRIPTOR **proto=0; +int protoCount=0; +int courProtocolSelection = 0; + +int localeID=0; +int codePage=0; + + +TCHAR *VariableList[][2]={ + {NULL,LPGENT("Date")}, + {_T("Y"),LPGENT("year (4 digits)")}, + {_T("y"),LPGENT("year (2 digits)")}, + {_T("m"),LPGENT("month")}, + {_T("E"),LPGENT("name of month")}, + {_T("e"),LPGENT("short name of month")}, + {_T("d"),LPGENT("day")}, + {_T("W"),LPGENT("weekday (full)")}, + {_T("w"),LPGENT("weekday (abbreviated)")}, + {_T("L"),LPGENT("Localized Date (Long)")}, + {_T("l"),LPGENT("Localized Date (Short)")}, + {NULL,LPGENT("Time")}, + {_T("H"),LPGENT("hours (24)")}, + {_T("h"),LPGENT("hours (12)")}, + {_T("p"),LPGENT("AM/PM")}, + {_T("M"),LPGENT("minutes")}, + {_T("S"),LPGENT("seconds")}, + {_T("K"),LPGENT("Localized Time (Long)")}, + {_T("k"),LPGENT("Localized Time (no Seconds)")}, + {NULL,LPGENT("Time Zone")}, + {_T("z"),LPGENT("total bias")}, + {_T("Z"),LPGENT("time zone name")}, + {NULL,LPGENT("Format")}, + {_T("t"),LPGENT("tabulator")}, + {_T("b"),LPGENT("line break")}, +}; + +HOTKEYDESC hotkeydescs[] = { + {sizeof(HOTKEYDESC), "saa_benotidle", "Not Idle", SECTIONNAME, AA_IDLE_BENOTIDLESERVICE, 0, 0}, + {sizeof(HOTKEYDESC), "saa_beshortidle", "Short Idle", SECTIONNAME, AA_IDLE_BESHORTIDLESERVICE, 0, 0}, + {sizeof(HOTKEYDESC), "saa_belongidle", "Long Idle", SECTIONNAME, AA_IDLE_BELONGIDLESERVICE, 0, 0}, + {sizeof(HOTKEYDESC), "saa_reconnect", "Reconnect", SECTIONNAME, AA_IDLE_RECONNECTSERVICE, 0, 0}, + }; + -- cgit v1.2.3